mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-07 05:51:12 +07:00
Fixed "no resources on coast" - thanks ninjatao!
This commit is contained in:
parent
de4c042dd5
commit
43ec085b89
@ -27,6 +27,7 @@ class PerlinNoiseRandomMapGenerator:SeedRandomMapGenerator(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
setWaterTiles(mapToReturn)
|
setWaterTiles(mapToReturn)
|
||||||
|
|
||||||
for(tile in mapToReturn.values) randomizeTile(tile)
|
for(tile in mapToReturn.values) randomizeTile(tile)
|
||||||
|
|
||||||
return mapToReturn
|
return mapToReturn
|
||||||
@ -281,8 +282,10 @@ open class RandomMapGenerator {
|
|||||||
|
|
||||||
fun setWaterTiles(map: HashMap<String, TileInfo>) {
|
fun setWaterTiles(map: HashMap<String, TileInfo>) {
|
||||||
for (tile in map.values.filter { it.baseTerrain == "Ocean" }) {
|
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.baseTerrain = "Coast"
|
||||||
|
tile.setTransients()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user