More notes on the next things to do.

This commit is contained in:
Zed A. Shaw 2024-11-07 02:06:22 -05:00
parent 011fee4872
commit 0e79288afc
8 changed files with 31 additions and 6 deletions

View file

@ -127,6 +127,11 @@ void System::combat(DinkyECS::World &world, Player &player) {
}
} else if(world.has<Loot>(entity)) {
world.send<eGUI>(eGUI::LOOT, entity);
auto &loot = world.get<Loot>(entity);
auto &loot_pos = world.get<Position>(entity);
auto &inventory = world.get<Inventory>(player.entity);
inventory.gold += loot.amount;
collider.remove(loot_pos.location);
} else {
println("UNKNOWN COLLISION TYPE {}", entity);
}