|
|
|
@ -302,8 +302,6 @@ void System::collision(GameLevel &level) { |
|
|
|
|
world.send<Events::GUI>(Events::GUI::COMBAT_START, entity, entity); |
|
|
|
|
} |
|
|
|
|
} else if(world.has<InventoryItem>(entity)) { |
|
|
|
|
// BUG: this should really be part of the inventory API and I just
|
|
|
|
|
// call into that to work it, rather than this hard coded crap
|
|
|
|
|
auto item = world.get<InventoryItem>(entity); |
|
|
|
|
auto& item_pos = world.get<Position>(entity); |
|
|
|
|
|
|
|
|
@ -318,9 +316,6 @@ void System::collision(GameLevel &level) { |
|
|
|
|
|
|
|
|
|
collider.remove(item_pos.location); |
|
|
|
|
world.remove<Tile>(entity); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fmt::println("LOOT EVENT, picking up {}", int(entity)); |
|
|
|
|
world.send<Events::GUI>(Events::GUI::LOOT, entity, item); |
|
|
|
|
} else if(world.has<Device>(entity)) { |
|
|
|
|
System::device(world, player.entity, entity); |
|
|
|
|