Fixed "no resources on coast" - thanks ninjatao!
This commit is contained in:
parent
de4c042dd5
commit
43ec085b89
1 changed files with 4 additions and 1 deletions
|
@ -27,6 +27,7 @@ class PerlinNoiseRandomMapGenerator:SeedRandomMapGenerator(){
|
|||
}
|
||||
|
||||
setWaterTiles(mapToReturn)
|
||||
|
||||
for(tile in mapToReturn.values) randomizeTile(tile)
|
||||
|
||||
return mapToReturn
|
||||
|
@ -281,8 +282,10 @@ open class RandomMapGenerator {
|
|||
|
||||
fun setWaterTiles(map: HashMap<String, TileInfo>) {
|
||||
for (tile in map.values.filter { it.baseTerrain == "Ocean" }) {
|
||||
if (HexMath().getVectorsInDistance(tile.position,2).any { hasWaterTile(map,it) })
|
||||
if (HexMath().getVectorsInDistance(tile.position,2).any { hasWaterTile(map,it) }) {
|
||||
tile.baseTerrain = "Coast"
|
||||
tile.setTransients()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue