Cleaned up the move operation more so that I can use it in the other places that I need it.
This commit is contained in:
parent
f559b5a39d
commit
6ff1919587
5 changed files with 52 additions and 8 deletions
|
@ -117,7 +117,6 @@ namespace gui {
|
|||
|
||||
bool StatusUI::drop_item(DinkyECS::Entity item_id) {
|
||||
bool dropped = System::drop_item($level, item_id);
|
||||
$level.world->not_constant(item_id);
|
||||
if(dropped) update();
|
||||
return dropped;
|
||||
}
|
||||
|
@ -128,6 +127,7 @@ namespace gui {
|
|||
// ground or moving from one container or another, so when loot_ui
|
||||
// moves to use an ECS id to a container I can have the System
|
||||
// do it.
|
||||
dbc::log(fmt::format("removing slot: {}", slot_id));
|
||||
auto& slot_name = $slot_to_name.at(slot_id);
|
||||
auto& inventory = $level.world->get_the<inventory::Model>();
|
||||
inventory.remove(slot_name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue