improved logging (debug stuff)

This commit is contained in:
Llywelwyn 2023-07-31 05:39:09 +01:00
parent aac6e0ad02
commit c00418f7c8
4 changed files with 24 additions and 38 deletions

View file

@ -1,4 +1,4 @@
use super::{gamelog, HungerClock, HungerState, SufferDamage};
use super::{gamelog, HungerClock, HungerState, SufferDamage, LOG_TICKS};
use specs::prelude::*;
pub struct HungerSystem {}
@ -12,8 +12,8 @@ impl<'a> System<'a> for HungerSystem {
let (entities, mut hunger_clock, player_entity, mut inflict_damage) = data;
for (entity, mut clock) in (&entities, &mut hunger_clock).join() {
if entity == *player_entity {
rltk::console::log(format!("HUNGER TICK for Player [current clock: {}]", clock.duration));
if LOG_TICKS && entity == *player_entity {
rltk::console::log(format!("HUNGER SYSTEM: Ticked for player entity. [clock: {}]", clock.duration));
}
clock.duration -= 1;
if clock.duration > 0 {