Expands cheat menu

This commit is contained in:
Llywelwyn 2023-08-13 16:22:30 +01:00
parent 0344f87da8
commit 71f5c2ac9f
10 changed files with 66 additions and 10 deletions

View file

@ -3,6 +3,8 @@ use rltk::prelude::*;
use specs::prelude::*;
use std::collections::HashMap;
pub const CARRY_CAPACITY_PER_STRENGTH: i32 = 8;
pub struct EncumbranceSystem {}
impl<'a> System<'a> for EncumbranceSystem {
@ -49,7 +51,8 @@ impl<'a> System<'a> for EncumbranceSystem {
if let Some(pool) = pools.get_mut(*entity) {
pool.weight = *weight;
if let Some(attr) = attributes.get(*entity) {
let carry_capacity_lbs = (attr.strength.base + attr.strength.modifiers) * 10;
let carry_capacity_lbs =
(attr.strength.base + attr.strength.modifiers) * CARRY_CAPACITY_PER_STRENGTH;
if pool.weight as i32 > 3 * carry_capacity_lbs {
// Overloaded
burdened

View file

@ -7,4 +7,4 @@ pub use quip_system::QuipSystem;
mod regen_system;
pub use regen_system::RegenSystem;
mod encumbrance_system;
pub use encumbrance_system::EncumbranceSystem;
pub use encumbrance_system::{EncumbranceSystem, CARRY_CAPACITY_PER_STRENGTH};