Fixed worldgen to only use tiles without collision in filling rooms, then a couple more changes to lighting so that if the light is <= 1 it just assumes the base light strength which ends up looking nicer and more like the kind of light I want.
This commit is contained in:
parent
59bbae0af0
commit
28d19d80a2
8 changed files with 36 additions and 29 deletions
|
@ -155,16 +155,14 @@ void WorldBuilder::generate() {
|
|||
$map.expand();
|
||||
$map.load_tiles();
|
||||
|
||||
auto room_types = $map.$tiles.tile_names();
|
||||
// get only the tiles with no collision to fill rooms
|
||||
auto room_types = $map.$tiles.tile_names(false);
|
||||
|
||||
for(size_t i = 0; i < $map.$rooms.size() - 1; i++) {
|
||||
size_t room_type = Random::uniform<size_t>(0, room_types.size() - 1);
|
||||
int room_size = Random::uniform<int>(100, 800);
|
||||
string tile_name = room_types[room_type];
|
||||
// BUG: really tiles should be configured as collision or not
|
||||
if(tile_name != "WALL_TILE") {
|
||||
stylize_room(i, tile_name, room_size * 0.01f);
|
||||
}
|
||||
stylize_room(i, tile_name, room_size * 0.01f);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue