From 43ec085b89512e258f87cd74b41fa07ee01c266c Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Wed, 28 Nov 2018 17:32:49 +0200 Subject: [PATCH] Fixed "no resources on coast" - thanks ninjatao! --- core/src/com/unciv/logic/map/RandomMapGenerator.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/map/RandomMapGenerator.kt b/core/src/com/unciv/logic/map/RandomMapGenerator.kt index 7777b77129..d9d896def2 100644 --- a/core/src/com/unciv/logic/map/RandomMapGenerator.kt +++ b/core/src/com/unciv/logic/map/RandomMapGenerator.kt @@ -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) { 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() + } } }