All of the UIs should be cleared out, and that just leaves the tests.
This commit is contained in:
parent
d5ff57e025
commit
564f9842a2
23 changed files with 126 additions and 145 deletions
10
systems.cpp
10
systems.cpp
|
@ -470,8 +470,9 @@ void System::drop_item(Entity item) {
|
|||
}
|
||||
|
||||
// NOTE: I think pickup and this need to be different
|
||||
bool System::place_in_container(World& world, Entity cont_id, const std::string& name, Entity world_entity) {
|
||||
auto& container = world.get<inventory::Model>(cont_id);
|
||||
bool System::place_in_container(Entity cont_id, const std::string& name, Entity world_entity) {
|
||||
auto world = Game::current_world();
|
||||
auto& container = world->get<inventory::Model>(cont_id);
|
||||
|
||||
if(container.has(world_entity)) {
|
||||
fmt::println("container {} already has entity {}, skip", cont_id, world_entity);
|
||||
|
@ -489,8 +490,9 @@ 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& slot_id) {
|
||||
auto& container = world.get<inventory::Model>(cont_id);
|
||||
void System::remove_from_container(Entity cont_id, const std::string& slot_id) {
|
||||
auto world = Game::current_world();
|
||||
auto& container = world->get<inventory::Model>(cont_id);
|
||||
auto entity = container.get(slot_id);
|
||||
container.remove(entity);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue