World builder now loads the tile map json and usese the keys to figure out how to randomize the floor configurations.

This commit is contained in:
Zed A. Shaw 2024-12-28 13:25:23 -05:00
parent 6b4bc6cc11
commit 03c5546cdf
12 changed files with 45 additions and 39 deletions

View file

@ -155,10 +155,7 @@ void WorldBuilder::generate() {
$map.expand();
$map.load_tiles();
std::array<string, 6> room_types{
"WATER_TILE", "SAND_TILE", "MOSAIC_TILE_1",
"MOSAIC_TILE_2", "MOSAIC_TILE_3", "GRASS_TILE"
};
auto room_types = $map.$tiles.tile_names();
for(size_t i = 0; i < $map.$rooms.size() - 1; i++) {
size_t room_type = Random::uniform<size_t>(0, room_types.size() - 1);