Made the components module work like textures and sound so that there's just one constant map of components.
This commit is contained in:
parent
ab391aaa97
commit
f208ca946e
10 changed files with 42 additions and 41 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue