Standardized on using only DinkyECS:Entity for most inventory:::Model operations, then create swap based on the same entities.

This commit is contained in:
Zed A. Shaw 2025-07-02 14:25:44 -04:00
parent 8c8d6dc9e7
commit 784f753e72
6 changed files with 62 additions and 53 deletions

View file

@ -548,7 +548,8 @@ bool System::place_in_container(World& world, Entity cont_id, const std::string&
}
}
void System::remove_from_container(World& world, Entity cont_id, const std::string& name) {
void System::remove_from_container(World& world, Entity cont_id, const std::string& slot_id) {
auto& container = world.get<inventory::Model>(cont_id);
container.remove(name);
auto entity = container.get(slot_id);
container.remove(entity);
}