diff --git a/core/src/com/unciv/models/gamebasics/Nation.kt b/core/src/com/unciv/models/gamebasics/Nation.kt index cfca98478f..b4022e40da 100644 --- a/core/src/com/unciv/models/gamebasics/Nation.kt +++ b/core/src/com/unciv/models/gamebasics/Nation.kt @@ -51,10 +51,11 @@ class Nation : INamed { var startBias = ArrayList() - fun getColor(): Color { + fun getOuterColor(): Color { return colorFromRGB(outerColor[0], outerColor[1], outerColor[2]) } - fun getSecondaryColor(): Color { + + fun getInnerColor(): Color { if(innerColor==null) return Color.BLACK return colorFromRGB(innerColor!![0], innerColor!![1], innerColor!![2]) } diff --git a/core/src/com/unciv/ui/EmpireOverviewScreen.kt b/core/src/com/unciv/ui/EmpireOverviewScreen.kt index 877b874068..420539755f 100644 --- a/core/src/com/unciv/ui/EmpireOverviewScreen.kt +++ b/core/src/com/unciv/ui/EmpireOverviewScreen.kt @@ -122,12 +122,12 @@ class EmpireOverviewScreen : CameraStageBaseScreen(){ private fun createOffersTable(civ: CivilizationInfo, offersList: TradeOffersList, numberOfOtherSidesOffers: Int): Table { val table = Table() table.defaults().pad(10f) - table.background = ImageGetter.getBackground(civ.nation.getColor()) - table.add(civ.civName.toLabel().setFontColor(civ.nation.getSecondaryColor())).row() + table.background = ImageGetter.getBackground(civ.nation.getOuterColor()) + table.add(civ.civName.toLabel().setFontColor(civ.nation.getInnerColor())).row() table.addSeparator() for(offer in offersList){ val offerText = offer.getOfferText() - table.add(offerText.toLabel().setFontColor(civ.nation.getSecondaryColor())).row() + table.add(offerText.toLabel().setFontColor(civ.nation.getInnerColor())).row() } for(i in 1..numberOfOtherSidesOffers - offersList.size) table.add("".toLabel()).row() // we want both sides of the general table to have the same number of rows @@ -416,8 +416,8 @@ class EmpireOverviewScreen : CameraStageBaseScreen(){ label.setFontColor(Color.BLACK) } else if (currentPlayer==civ || UnCivGame.Current.viewEntireMapForDebug || currentPlayer.knows(civ)) { civGroup.add(ImageGetter.getNationIndicator(civ.nation, 30f)) - civGroup.background = civGroupBackground.tint(civ.nation.getColor()) - label.setFontColor(civ.nation.getSecondaryColor()) + civGroup.background = civGroupBackground.tint(civ.nation.getOuterColor()) + label.setFontColor(civ.nation.getInnerColor()) } else { civGroup.background = civGroupBackground.tint(Color.DARK_GRAY) label.setText("???") diff --git a/core/src/com/unciv/ui/newgamescreen/NationTable.kt b/core/src/com/unciv/ui/newgamescreen/NationTable.kt index 4cd40e5920..016416db18 100644 --- a/core/src/com/unciv/ui/newgamescreen/NationTable.kt +++ b/core/src/com/unciv/ui/newgamescreen/NationTable.kt @@ -13,18 +13,18 @@ class NationTable(val nation: Nation, width:Float, onClick:()->Unit) : Table(CameraStageBaseScreen.skin){ val innerTable = Table() init { - background = ImageGetter.getBackground(nation.getSecondaryColor()) + background = ImageGetter.getBackground(nation.getInnerColor()) innerTable.pad(10f) - innerTable.background = ImageGetter.getBackground(nation.getColor()) + innerTable.background = ImageGetter.getBackground(nation.getOuterColor()) val titleTable = Table() titleTable.add(ImageGetter.getNationIndicator(nation, 50f)).pad(10f) titleTable.add(nation.getLeaderDisplayName().toLabel() - .apply { setFontColor(nation.getSecondaryColor()); setFontSize(24) }) + .apply { setFontColor(nation.getInnerColor()); setFontSize(24) }) innerTable.add(titleTable).row() innerTable.add(getUniqueLabel(nation) - .apply { setWrap(true);setFontColor(nation.getSecondaryColor()) }) + .apply { setWrap(true);setFontColor(nation.getInnerColor()) }) .width(width) onClick { onClick() diff --git a/core/src/com/unciv/ui/tilegroups/CityButton.kt b/core/src/com/unciv/ui/tilegroups/CityButton.kt index 54c69c915f..6061df332d 100644 --- a/core/src/com/unciv/ui/tilegroups/CityButton.kt +++ b/core/src/com/unciv/ui/tilegroups/CityButton.kt @@ -45,10 +45,10 @@ class CityButton(val city: CityInfo, internal val tileGroup: WorldTileGroup, ski private fun addAirUnitTable() { if (!tileGroup.tileInfo.airUnits.isNotEmpty()) return - val secondarycolor = city.civInfo.nation.getSecondaryColor() + val secondarycolor = city.civInfo.nation.getInnerColor() val airUnitTable = Table().apply { defaults().pad(5f) } airUnitTable.background = ImageGetter.getDrawable("OtherIcons/civTableBackground") - .tint(city.civInfo.nation.getColor()) + .tint(city.civInfo.nation.getOuterColor()) val aircraftImage = ImageGetter.getImage("OtherIcons/Aircraft") aircraftImage.color = secondarycolor airUnitTable.add(aircraftImage).size(15f) @@ -89,11 +89,11 @@ class CityButton(val city: CityInfo, internal val tileGroup: WorldTileGroup, ski } private fun getIconTable(): Table { - val secondaryColor = city.civInfo.nation.getSecondaryColor() + val secondaryColor = city.civInfo.nation.getInnerColor() val iconTable = Table() iconTable.touchable=Touchable.enabled iconTable.background = ImageGetter.getDrawable("OtherIcons/civTableBackground") - .tint(city.civInfo.nation.getColor()) + .tint(city.civInfo.nation.getOuterColor()) if (city.resistanceCounter > 0) { val resistanceImage = ImageGetter.getImage("StatIcons/Resistance") @@ -170,7 +170,7 @@ class CityButton(val city: CityInfo, internal val tileGroup: WorldTileGroup, ski group.addActor(circle) group.addActor(image) - val secondaryColor = cityConstructions.cityInfo.civInfo.nation.getSecondaryColor() + val secondaryColor = cityConstructions.cityInfo.civInfo.nation.getInnerColor() val cityCurrentConstruction = cityConstructions.getCurrentConstruction() if(cityCurrentConstruction !is SpecialConstruction) { val turnsToConstruction = cityConstructions.turnsToConstruction(cityCurrentConstruction.name) diff --git a/core/src/com/unciv/ui/tilegroups/TileGroup.kt b/core/src/com/unciv/ui/tilegroups/TileGroup.kt index 3416816238..d37880d3b0 100644 --- a/core/src/com/unciv/ui/tilegroups/TileGroup.kt +++ b/core/src/com/unciv/ui/tilegroups/TileGroup.kt @@ -278,7 +278,7 @@ open class TileGroup(var tileInfo: TileInfo, var tileSetStrings:TileSetStrings) previousTileOwner = tileOwner if (tileOwner == null) return - val civColor = tileInfo.getOwner()!!.nation.getColor() + val civColor = tileInfo.getOwner()!!.nation.getOuterColor() for (neighbor in tileInfo.neighbors) { val neighborOwner = neighbor.getOwner() if (neighborOwner == tileOwner && borderImages.containsKey(neighbor)) // the neighbor used to not belong to us, but now it's ours diff --git a/core/src/com/unciv/ui/utils/ImageGetter.kt b/core/src/com/unciv/ui/utils/ImageGetter.kt index 807ba90baa..3fbff91353 100644 --- a/core/src/com/unciv/ui/utils/ImageGetter.kt +++ b/core/src/com/unciv/ui/utils/ImageGetter.kt @@ -67,15 +67,15 @@ object ImageGetter { } fun getNationIndicator(nation: Nation, size:Float): IconCircleGroup { - val civIndicator = getCircle().apply { color = nation.getSecondaryColor() } - .surroundWithCircle(size).apply { circle.color = nation.getColor() } + val civIndicator = getCircle().apply { color = nation.getInnerColor() } + .surroundWithCircle(size).apply { circle.color = nation.getOuterColor() } val civIconName = if(nation.isCityState()) "CityState" else nation.name if(nationIconExists(civIconName)){ val cityStateIcon = ImageGetter.getNationIcon(civIconName) cityStateIcon.setSize(size*0.7f,size*0.7f) cityStateIcon.center(civIndicator) - cityStateIcon.color = nation.getColor() + cityStateIcon.color = nation.getOuterColor() civIndicator.addActor(cityStateIcon) } diff --git a/core/src/com/unciv/ui/utils/UnitGroup.kt b/core/src/com/unciv/ui/utils/UnitGroup.kt index 8101835960..be1d2ae8b8 100644 --- a/core/src/com/unciv/ui/utils/UnitGroup.kt +++ b/core/src/com/unciv/ui/utils/UnitGroup.kt @@ -11,12 +11,12 @@ class UnitGroup(val unit: MapUnit, val size: Float): Group() { var blackSpinningCircle:Image?=null init { - val unitBaseImage = ImageGetter.getUnitIcon(unit.name, unit.civInfo.nation.getSecondaryColor()) + val unitBaseImage = ImageGetter.getUnitIcon(unit.name, unit.civInfo.nation.getInnerColor()) .apply { setSize(size * 0.75f, size * 0.75f) } val background = getBackgroundImageForUnit(unit) background.apply { - this.color = unit.civInfo.nation.getColor() + this.color = unit.civInfo.nation.getOuterColor() setSize(size, size) } setSize(size, size) diff --git a/core/src/com/unciv/ui/worldscreen/Minimap.kt b/core/src/com/unciv/ui/worldscreen/Minimap.kt index d3e0825a14..6af1b9fa7f 100644 --- a/core/src/com/unciv/ui/worldscreen/Minimap.kt +++ b/core/src/com/unciv/ui/worldscreen/Minimap.kt @@ -78,9 +78,9 @@ class Minimap(val tileMapHolder: TileMapHolder) : ScrollPane(null){ if (!(UnCivGame.Current.viewEntireMapForDebug || cloneCivilization.exploredTiles.contains(tileInfo.position))) hex.color = Color.DARK_GRAY else if (tileInfo.isCityCenter() && !tileInfo.isWater) - hex.color = tileInfo.getOwner()!!.nation.getSecondaryColor() + hex.color = tileInfo.getOwner()!!.nation.getInnerColor() else if (tileInfo.getCity() != null && !tileInfo.isWater) - hex.color = tileInfo.getOwner()!!.nation.getColor() + hex.color = tileInfo.getOwner()!!.nation.getOuterColor() else hex.color = tileInfo.getBaseTerrain().getColor().lerp(Color.GRAY, 0.5f) } } diff --git a/core/src/com/unciv/ui/worldscreen/PlayerReadyScreen.kt b/core/src/com/unciv/ui/worldscreen/PlayerReadyScreen.kt index 24431ea1af..53922fbd32 100644 --- a/core/src/com/unciv/ui/worldscreen/PlayerReadyScreen.kt +++ b/core/src/com/unciv/ui/worldscreen/PlayerReadyScreen.kt @@ -10,10 +10,10 @@ class PlayerReadyScreen(currentPlayerCiv: CivilizationInfo) : CameraStageBaseScr init { val table= Table() table.touchable= Touchable.enabled - table.background= ImageGetter.getBackground(currentPlayerCiv.nation.getColor()) + table.background= ImageGetter.getBackground(currentPlayerCiv.nation.getOuterColor()) table.add("[$currentPlayerCiv] ready?".toLabel().setFontSize(24) - .setFontColor(currentPlayerCiv.nation.getSecondaryColor())) + .setFontColor(currentPlayerCiv.nation.getInnerColor())) table.onClick { UnCivGame.Current.worldScreen = WorldScreen(currentPlayerCiv)