Initial changes to clean up the code.

This commit is contained in:
Zed A. Shaw 2025-01-10 11:12:14 -05:00
parent 8d3ccd935d
commit f3f875ee80
8 changed files with 21 additions and 29 deletions

View file

@ -203,6 +203,9 @@ void System::draw_entities(DinkyECS::World &world, Map &game_map, const Matrix &
}
void System::pickup(DinkyECS::World &world, DinkyECS::Entity actor, DinkyECS::Entity item) {
dbc::pre("System::pickup actor doesn't have inventory", world.has<Inventory>(actor));
dbc::pre("System::pickup item isn't configured with InventoryItem.", world.has<InventoryItem>(item));
auto& inventory = world.get<Inventory>(actor);
auto& invitem = world.get<InventoryItem>(item);