From 18a86bf472aa44072483304d0f6a588b0903ff78 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Tue, 1 Feb 2022 17:18:58 +0200 Subject: [PATCH] Don't generate ice if it isn't in the ruleset --- core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt b/core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt index 436acbf068..c22f886690 100644 --- a/core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt +++ b/core/src/com/unciv/logic/map/mapgenerator/MapGenerator.kt @@ -465,6 +465,7 @@ class MapGenerator(val ruleset: Ruleset) { * [MapParameters.temperatureExtremeness] as in [applyHumidityAndTemperature] */ private fun spawnIce(tileMap: TileMap) { + if (!ruleset.terrains.containsKey(Constants.ice)) return // I can't think of how to make this nicely moddable tileMap.setTransients(ruleset) val temperatureSeed = randomness.RNG.nextInt().toDouble() for (tile in tileMap.values) {