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

@ -42,7 +42,9 @@ impl<'a> System<'a> for DamageSystem {
for (entity, mut stats, damage) in (&entities, &mut stats, &damage).join() {
for dmg in damage.amount.iter() {
stats.hit_points.current -= dmg.0;
if !stats.god {
stats.hit_points.current -= dmg.0;
}
let pos = positions.get(entity);
if let Some(pos) = pos {
let idx = map.xy_idx(pos.x, pos.y);