From 8594568ff45b12dd6348e29cc50757a3685c6dbe Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Sun, 10 Aug 2025 12:29:24 -0400 Subject: [PATCH] Slight clean up. --- systems.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/systems.cpp b/systems.cpp index eb0fc92..daec0df 100644 --- a/systems.cpp +++ b/systems.cpp @@ -146,22 +146,19 @@ void System::distribute_loot(GameLevel &level, Position target_pos) { if(inventory_count > 0) { auto pile = ritual::random_junk(config, inventory_count); - auto entity_data = config.devices["GRAVE_STONE"]; + auto entity_data = config.devices["DEAD_BODY_LOOTABLE"]; components::configure_entity(world, loot_entity, entity_data["components"]); world.set(loot_entity, pile); // BUG: inventory_count here isn't really used to remove it world.set(loot_entity, {inventory_count, entity_data}); - - set_position(world, *level.collision, loot_entity, target_pos); - - level.world->send(Events::GUI::ENTITY_SPAWN, loot_entity, {}); } 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"]); - set_position(world, *level.collision, loot_entity, target_pos); - level.world->send(Events::GUI::ENTITY_SPAWN, loot_entity, {}); } + + set_position(world, *level.collision, loot_entity, target_pos); + level.world->send(Events::GUI::ENTITY_SPAWN, loot_entity, {}); } void System::death(GameLevel &level) {