made the switch to using bracket-lib directly, instead of rltk wrapper
this should solve the build issues; it makes using the non-crashing github build a lot easier, because it lets the explicit rltk dependency be removed.
This commit is contained in:
parent
455b8f2d80
commit
85efe13dc5
93 changed files with 1528 additions and 770 deletions
|
|
@ -1,5 +1,12 @@
|
|||
use super::{ effects::{ add_effect, EffectType, Targets }, gamelog, Clock, HungerClock, HungerState, TakingTurn };
|
||||
use rltk::prelude::*;
|
||||
use super::{
|
||||
effects::{ add_effect, EffectType, Targets },
|
||||
gamelog,
|
||||
Clock,
|
||||
HungerClock,
|
||||
HungerState,
|
||||
TakingTurn,
|
||||
};
|
||||
use bracket_lib::prelude::*;
|
||||
use specs::prelude::*;
|
||||
use crate::config::CONFIG;
|
||||
|
||||
|
|
@ -69,11 +76,18 @@ impl<'a> System<'a> for HungerSystem {
|
|||
let initial_state = hunger_clock.state;
|
||||
hunger_clock.state = get_hunger_state(hunger_clock.duration);
|
||||
if hunger_clock.state == HungerState::Starving {
|
||||
add_effect(None, EffectType::Damage { amount: 1 }, Targets::Entity { target: entity });
|
||||
add_effect(
|
||||
None,
|
||||
EffectType::Damage { amount: 1 },
|
||||
Targets::Entity { target: entity }
|
||||
);
|
||||
}
|
||||
if CONFIG.logging.log_ticks && entity == *player_entity {
|
||||
rltk::console::log(
|
||||
format!("HUNGER SYSTEM: Ticked for player entity. [clock: {}]", hunger_clock.duration)
|
||||
console::log(
|
||||
format!(
|
||||
"HUNGER SYSTEM: Ticked for player entity. [clock: {}]",
|
||||
hunger_clock.duration
|
||||
)
|
||||
);
|
||||
}
|
||||
if hunger_clock.state == initial_state {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue