Have a separate container vs. item loot for the different situations where you're pick items out of a container vs. an item on the ground.
This commit is contained in:
parent
7db64b73c5
commit
af933c827a
4 changed files with 30 additions and 23 deletions
|
@ -335,7 +335,7 @@ void System::pickup(GameLevel &level, DinkyECS::Entity entity) {
|
|||
// NOTE: chests are different from say a torch, maybe 2 events or the
|
||||
// GUI figures out which it is, then when you click either pick it up
|
||||
// and move it or show the loot container UI
|
||||
world.send<Events::GUI>(Events::GUI::LOOT, entity, item);
|
||||
world.send<Events::GUI>(Events::GUI::LOOT_ITEM, entity, item);
|
||||
}
|
||||
} else if(world.has<Device>(entity)) {
|
||||
System::device(world, player.entity, entity);
|
||||
|
@ -354,8 +354,8 @@ void System::device(DinkyECS::World &world, DinkyECS::Entity actor, DinkyECS::En
|
|||
world.send<Events::GUI>(Events::GUI::STAIRS_UP, actor, device);
|
||||
} else if(event == "TRAP") {
|
||||
world.send<Events::GUI>(Events::GUI::TRAP, actor, device);
|
||||
} else if(event == "LOOT_OPEN") {
|
||||
world.send<Events::GUI>(Events::GUI::LOOT, actor, device);
|
||||
} else if(event == "LOOT_CONTAINER") {
|
||||
world.send<Events::GUI>(Events::GUI::LOOT_CONTAINER, actor, device);
|
||||
} else {
|
||||
dbc::log(fmt::format(
|
||||
"INVALID EVENT {} for device {}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue