Made a curative component really quick.

This commit is contained in:
Zed A. Shaw 2025-01-09 14:38:07 -05:00
parent d6916b675e
commit ee304c30e3
3 changed files with 24 additions and 0 deletions

View file

@ -165,6 +165,12 @@ void System::collision(DinkyECS::World &world, Player &player) {
world.remove<Loot>(entity);
}
if(world.has<Curative>(entity)) {
auto& cure = world.get<Curative>(entity);
player_combat.hp += cure.hp;
world.remove<Curative>(entity);
}
collider.remove(item_pos.location);
world.remove<Tile>(entity);
world.remove<InventoryItem>(entity);