From 3a16595ca7adfed3b7b8c48f0225b1936e19d569 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Sat, 18 Jan 2025 14:44:46 -0500 Subject: [PATCH] A few small changes so that the player's lightsource is just like any other entity lightsource components. --- assets/config.json | 4 ++-- assets/enemies.json | 1 + worldbuilder.cpp | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/config.json b/assets/config.json index 055ba27..5b289aa 100644 --- a/assets/config.json +++ b/assets/config.json @@ -6,8 +6,8 @@ }, "worldgen": { - "enemy_probability": 20, - "empty_room_probability": 20, + "enemy_probability": 10, + "empty_room_probability": 60, "device_probability": 100 } } diff --git a/assets/enemies.json b/assets/enemies.json index b7e72d4..13c03a3 100644 --- a/assets/enemies.json +++ b/assets/enemies.json @@ -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}} ] }, diff --git a/worldbuilder.cpp b/worldbuilder.cpp index d3595e6..4bf65c7 100644 --- a/worldbuilder.cpp +++ b/worldbuilder.cpp @@ -231,7 +231,6 @@ void WorldBuilder::place_entities(DinkyECS::World &world) { // configure player in the world Player player{player_ent}; world.set_the(player); - world.set(player.entity, {50,1.0}); world.set(player.entity, {5}); randomize_entities(world, config);