A few small changes so that the player's lightsource is just like any other entity lightsource components.

This commit is contained in:
Zed A. Shaw 2025-01-18 14:44:46 -05:00
parent fc61ef42ac
commit 3a16595ca7
3 changed files with 3 additions and 3 deletions

View file

@ -6,8 +6,8 @@
},
"worldgen": {
"enemy_probability": 20,
"empty_room_probability": 20,
"enemy_probability": 10,
"empty_room_probability": 60,
"device_probability": 100
}
}

View file

@ -6,6 +6,7 @@
{"type": "Tile", "config": {"chr": "\ua66b"}},
{"type": "Combat", "config": {"hp": 200, "damage": 15}},
{"type": "Motion", "config": {"dx": 0, "dy": 0, "random": false}},
{"type": "LightSource", "config": {"strength": 70, "radius": 2}},
{"type": "EnemyConfig", "config": {"hearing_distance": 5}}
]
},

View file

@ -231,7 +231,6 @@ void WorldBuilder::place_entities(DinkyECS::World &world) {
// configure player in the world
Player player{player_ent};
world.set_the<Player>(player);
world.set<LightSource>(player.entity, {50,1.0});
world.set<Inventory>(player.entity, {5});
randomize_entities(world, config);