Standardized on using only DinkyECS:Entity for most inventory:::Model operations, then create swap based on the same entities.
This commit is contained in:
parent
8c8d6dc9e7
commit
784f753e72
6 changed files with 62 additions and 53 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue