From 9725c0f66c0bbd4e71ba116b9c1c852cfd34b66e Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Sun, 8 Dec 2019 18:44:04 +0200 Subject: [PATCH] Facism -> Fascism policy name change in existing save files --- core/src/com/unciv/logic/GameInfo.kt | 6 ++++++ .../com/unciv/ui/utils/CameraStageBaseScreen.kt | 15 +++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/core/src/com/unciv/logic/GameInfo.kt b/core/src/com/unciv/logic/GameInfo.kt index 294f5eff97..1d98a38d37 100644 --- a/core/src/com/unciv/logic/GameInfo.kt +++ b/core/src/com/unciv/logic/GameInfo.kt @@ -224,6 +224,12 @@ class GameInfo { // which in turn leads to us trying to get info on all the building in all the cities... // which can fail if there's an "unregistered" building anywhere for (civInfo in civilizations) { + // As of 3.5. + if(civInfo.policies.adoptedPolicies.contains("Facism")){ + civInfo.policies.adoptedPolicies.remove("Facism") + civInfo.policies.adoptedPolicies.add("Fascism") + } + for (cityInfo in civInfo.cities) { val cityConstructions = cityInfo.cityConstructions diff --git a/core/src/com/unciv/ui/utils/CameraStageBaseScreen.kt b/core/src/com/unciv/ui/utils/CameraStageBaseScreen.kt index 2dcb0897f4..54b575f4f3 100644 --- a/core/src/com/unciv/ui/utils/CameraStageBaseScreen.kt +++ b/core/src/com/unciv/ui/utils/CameraStageBaseScreen.kt @@ -24,15 +24,14 @@ open class CameraStageBaseScreen : Screen { init { val width:Float val height:Float - if(game.settings.resolution=="Auto"){ + if(game.settings.resolution=="Auto") { // lower than 750x500 just doesn't manage to fit all the components into the screen - if(Gdx.graphics.width >= 750 && Gdx.graphics.height.toFloat() >= 500){ - width=Gdx.graphics.width.toFloat() - height=Gdx.graphics.height.toFloat() - } - else{ - width=750f - height=500f + if (Gdx.graphics.width >= 750 && Gdx.graphics.height.toFloat() >= 500) { + width = Gdx.graphics.width.toFloat() + height = Gdx.graphics.height.toFloat() + } else { + width = 750f + height = 500f } } else {