Made the components module work like textures and sound so that there's just one constant map of components.

This commit is contained in:
Zed A. Shaw 2025-06-02 23:33:59 -04:00
parent ab391aaa97
commit f208ca946e
10 changed files with 42 additions and 41 deletions

View file

@ -162,7 +162,7 @@ void System::distribute_loot(DinkyECS::World &world, DinkyECS::Entity& ent, nloh
world.set<ritual::JunkPile>(ent, pile);
}
void System::death(GameLevel &level, components::ComponentMap& components) {
void System::death(GameLevel &level) {
auto &world = *level.world;
auto player = world.get_the<Player>();
auto& config = world.get_the<GameConfig>();
@ -207,7 +207,7 @@ void System::death(GameLevel &level, components::ComponentMap& components) {
}
auto entity_data = config.items["GRAVE_STONE"];
components::configure_entity(components, world, ent, entity_data["components"]);
components::configure_entity(world, ent, entity_data["components"]);
if(entity_data["inventory_count"] > 0) {
System::distribute_loot(world, ent, entity_data);
}