diff --git a/android/Images/UnitPromotionIcons/Anti-Armor.png b/android/Images/UnitPromotionIcons/Anti-Armor.png new file mode 100644 index 0000000000..e9e79f657b Binary files /dev/null and b/android/Images/UnitPromotionIcons/Anti-Armor.png differ diff --git a/android/assets/ExtraImages/LoadScreen.png b/android/assets/ExtraImages/LoadScreen.png new file mode 100644 index 0000000000..65afa61d54 Binary files /dev/null and b/android/assets/ExtraImages/LoadScreen.png differ diff --git a/android/assets/jsons/Civ V - Vanilla/UnitPromotions.json b/android/assets/jsons/Civ V - Vanilla/UnitPromotions.json index 76623dc11e..87dda583b2 100644 --- a/android/assets/jsons/Civ V - Vanilla/UnitPromotions.json +++ b/android/assets/jsons/Civ V - Vanilla/UnitPromotions.json @@ -422,13 +422,14 @@ }, { "name": "Anti-Armor I", - "uniques": ["+[25]% vs [Armored]"], - "unitTypes:": ["Helicopter"] + "uniques": ["+[25]% Strength vs [Armored]"], + "unitTypes": ["Helicopter"] }, { "name": "Anti-Armor II", - "uniques": ["+[25]% vs [Armored]"], - "unitTypes:": ["Helicopter"] + "prerequisites": ["Anti-Armor I"], + "uniques": ["+[25]% Strength vs [Armored]"], + "unitTypes": ["Helicopter"] }, // Mixed @@ -473,13 +474,13 @@ { "name": "Ambush I", - "uniques": ["+[33]% Strength vs [Armored]"], + "uniques": ["+[25]% Strength vs [Armored]"], "unitTypes": ["Sword","Gunpowder","Fighter","Bomber"] }, { "name": "Ambush II", "prerequisites": ["Ambush I"], - "uniques": ["+[33]% Strength vs [Armored]"], + "uniques": ["+[25]% Strength vs [Armored]"], "unitTypes": ["Sword","Gunpowder","Fighter","Bomber"] }, diff --git a/core/src/com/unciv/UncivGame.kt b/core/src/com/unciv/UncivGame.kt index b17a18ff6b..38712db4e2 100644 --- a/core/src/com/unciv/UncivGame.kt +++ b/core/src/com/unciv/UncivGame.kt @@ -84,8 +84,10 @@ class UncivGame(parameters: UncivGameParameters) : Game() { * - Skin (hence CameraStageBaseScreen.setSkin()) * - Font (hence Fonts.resetFont() inside setSkin()) */ - ImageGetter.resetAtlases() settings = GameSaver.getGeneralSettings() // needed for the screen + screen = LoadingScreen() // NOT dependent on any atlas or skin + + ImageGetter.resetAtlases() ImageGetter.setNewRuleset(ImageGetter.ruleset) // This needs to come after the settings, since we may have default visual mods if(settings.tileSet !in ImageGetter.getAvailableTilesets()) { // If one of the tilesets is no longer available, default back settings.tileSet = "FantasyHex" @@ -94,8 +96,6 @@ class UncivGame(parameters: UncivGameParameters) : Game() { CameraStageBaseScreen.setSkin() // needs to come AFTER the Texture reset, since the buttons depend on it Gdx.graphics.isContinuousRendering = settings.continuousRendering - screen = LoadingScreen() - thread(name = "LoadJSON") { RulesetCache.loadRulesets(printOutput = true) @@ -206,9 +206,9 @@ class UncivGame(parameters: UncivGameParameters) : Game() { } } -class LoadingScreen:CameraStageBaseScreen() { +private class LoadingScreen : CameraStageBaseScreen() { init { - val happinessImage = ImageGetter.getImage("StatIcons/Happiness") + val happinessImage = ImageGetter.getExternalImage("LoadScreen.png") happinessImage.center(stage) happinessImage.setOrigin(Align.center) happinessImage.addAction(Actions.sequence( diff --git a/core/src/com/unciv/logic/map/TileInfo.kt b/core/src/com/unciv/logic/map/TileInfo.kt index 04dcf40c6a..358635d8fb 100644 --- a/core/src/com/unciv/logic/map/TileInfo.kt +++ b/core/src/com/unciv/logic/map/TileInfo.kt @@ -230,7 +230,7 @@ open class TileInfo { else stats.add(terrainFeatureBase) } - + if (city != null) { var tileUniques = city.getMatchingUniques("[] from [] tiles []") .filter { city.matchesFilter(it.params[2]) } @@ -244,7 +244,7 @@ open class TileInfo { stats.add(unique.stats) } } - + for (unique in city.getMatchingUniques("[] from [] tiles without [] []")) if ( matchesTerrainFilter(unique.params[1]) && @@ -280,7 +280,8 @@ open class TileInfo { if (stats.gold != 0f && observingCiv.goldenAges.isGoldenAge()) stats.gold++ - if (stats.production < 0) stats.production = 0f + for ((stat, value) in stats) + if (value < 0f) stats[stat] = 0f return stats } diff --git a/core/src/com/unciv/ui/cityscreen/YieldGroup.kt b/core/src/com/unciv/ui/cityscreen/YieldGroup.kt index ebf190b088..091f92a83f 100644 --- a/core/src/com/unciv/ui/cityscreen/YieldGroup.kt +++ b/core/src/com/unciv/ui/cityscreen/YieldGroup.kt @@ -19,7 +19,8 @@ class YieldGroup : HorizontalGroup() { currentStats = stats clearChildren() for ((stat, amount) in stats) { - addActor(getStatIconsTable(stat.name, amount.toInt())) + if (amount > 0f) // Defense against upstream bugs - negatives would show as "lots" + addActor(getStatIconsTable(stat.name, amount.toInt())) } pack() } diff --git a/core/src/com/unciv/ui/utils/ImageGetter.kt b/core/src/com/unciv/ui/utils/ImageGetter.kt index 40a5e16e5c..50fcffcd44 100644 --- a/core/src/com/unciv/ui/utils/ImageGetter.kt +++ b/core/src/com/unciv/ui/utils/ImageGetter.kt @@ -3,6 +3,7 @@ package com.unciv.ui.utils import com.badlogic.gdx.Gdx import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.graphics.Texture +import com.badlogic.gdx.graphics.Texture.TextureFilter import com.badlogic.gdx.graphics.g2d.NinePatch import com.badlogic.gdx.graphics.g2d.TextureAtlas import com.badlogic.gdx.graphics.g2d.TextureRegion @@ -16,7 +17,6 @@ import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable import com.badlogic.gdx.utils.Align import com.unciv.Constants import com.unciv.UncivGame -import com.unciv.logic.map.TileMap import com.unciv.models.ruleset.Era import com.unciv.models.ruleset.Nation import com.unciv.models.ruleset.Ruleset @@ -153,7 +153,12 @@ object ImageGetter { fun getDot(dotColor: Color) = getWhiteDot().apply { color = dotColor } fun getExternalImage(fileName: String): Image { - return Image(TextureRegion(Texture("ExtraImages/$fileName"))) + // Since these are not packed in an atlas, they have no scaling filter metadata and + // default to Nearest filter, anisotropic level 1. Use Linear instead, helps + // loading screen and Tutorial.WorldScreen quite a bit. More anisotropy barely helps. + val texture = Texture("ExtraImages/$fileName") + texture.setFilter(TextureFilter.Linear, TextureFilter.Linear) + return Image(TextureRegion(texture)) } fun getImage(fileName: String): Image {