A few small changes so that the player's lightsource is just like any other entity lightsource components.
This commit is contained in:
parent
fc61ef42ac
commit
3a16595ca7
3 changed files with 3 additions and 3 deletions
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
"worldgen": {
|
"worldgen": {
|
||||||
"enemy_probability": 20,
|
"enemy_probability": 10,
|
||||||
"empty_room_probability": 20,
|
"empty_room_probability": 60,
|
||||||
"device_probability": 100
|
"device_probability": 100
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
{"type": "Tile", "config": {"chr": "\ua66b"}},
|
{"type": "Tile", "config": {"chr": "\ua66b"}},
|
||||||
{"type": "Combat", "config": {"hp": 200, "damage": 15}},
|
{"type": "Combat", "config": {"hp": 200, "damage": 15}},
|
||||||
{"type": "Motion", "config": {"dx": 0, "dy": 0, "random": false}},
|
{"type": "Motion", "config": {"dx": 0, "dy": 0, "random": false}},
|
||||||
|
{"type": "LightSource", "config": {"strength": 70, "radius": 2}},
|
||||||
{"type": "EnemyConfig", "config": {"hearing_distance": 5}}
|
{"type": "EnemyConfig", "config": {"hearing_distance": 5}}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -231,7 +231,6 @@ void WorldBuilder::place_entities(DinkyECS::World &world) {
|
||||||
// configure player in the world
|
// configure player in the world
|
||||||
Player player{player_ent};
|
Player player{player_ent};
|
||||||
world.set_the<Player>(player);
|
world.set_the<Player>(player);
|
||||||
world.set<LightSource>(player.entity, {50,1.0});
|
|
||||||
world.set<Inventory>(player.entity, {5});
|
world.set<Inventory>(player.entity, {5});
|
||||||
|
|
||||||
randomize_entities(world, config);
|
randomize_entities(world, config);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue