Worked out the status UI more, setup the color scheme, and fixed various small problems with looting causing a crash.
This commit is contained in:
parent
db60f75bd9
commit
36a49ef768
6 changed files with 48 additions and 40 deletions
|
|
@ -167,16 +167,15 @@ void System::distribute_loot(Position target_pos) {
|
|||
auto loot_entity = world.entity();
|
||||
|
||||
if(inventory_count > 0) {
|
||||
auto& entity_data = config.devices["DEAD_BODY_LOOTABLE"];
|
||||
components::configure_entity(world, loot_entity, entity_data["components"]);
|
||||
// BUG: inventory_count here isn't really used to remove it
|
||||
world.set<InventoryItem>(loot_entity, {inventory_count, entity_data});
|
||||
} else {
|
||||
// this creates a dead body on the ground
|
||||
auto& entity_data = config.devices["DEAD_BODY"];
|
||||
components::configure_entity(world, loot_entity, entity_data["components"]);
|
||||
dbc::log("!!!!!!!!!!!!!!!! ============= LOOTING BODIES NOT READY");
|
||||
}
|
||||
|
||||
// NOTE: refer to the code in raycaster for this
|
||||
|
||||
// this creates a dead body on the ground
|
||||
auto& entity_data = config.devices["DEAD_BODY"];
|
||||
components::configure_entity(world, loot_entity, entity_data["components"]);
|
||||
|
||||
set_position(world, *level.collision, loot_entity, target_pos);
|
||||
level.world->send<game::Event>(game::Event::ENTITY_SPAWN, loot_entity, {});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue