From 85ea92cf7213d76a375b6a1d04e217e66dc26406 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Wed, 26 Feb 2020 22:00:25 +0200 Subject: [PATCH] Resolved #2012 - manually place starting locations are no longer visible in-game --- core/src/com/unciv/logic/GameStarter.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/GameStarter.kt b/core/src/com/unciv/logic/GameStarter.kt index 889f9f74e4..1401be344e 100644 --- a/core/src/com/unciv/logic/GameStarter.kt +++ b/core/src/com/unciv/logic/GameStarter.kt @@ -75,9 +75,9 @@ class GameStarter { gameInfo.civilizations.add(playerCiv) } - val cityStatesWithStartingLocations = - gameInfo.tileMap.values.filter { it.improvement != null && it.improvement!!.startsWith("StartingLocation ") } + gameInfo.tileMap.values + .filter { it.improvement != null && it.improvement!!.startsWith("StartingLocation ") } .map { it.improvement!!.replace("StartingLocation ", "") } val availableCityStatesNames = Stack() @@ -90,6 +90,12 @@ class GameStarter { val civ = CivilizationInfo(cityStateName) gameInfo.civilizations.add(civ) } + + // remove starting locations one we're done + for(tile in gameInfo.tileMap.values){ + if(tile.improvement!=null && tile.improvement!!.startsWith("StartingLocation ")) + tile.improvement=null + } } private fun addCivStartingUnits(gameInfo: GameInfo) {