Skip to content

added 2 unique to change name/appearance of civ #13105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 80 commits into from
Closed
Show file tree
Hide file tree
Changes from 70 commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
9dd38f5
Settler settle best tile when not escort and dangerous Tiles instead …
Emandac Oct 22, 2024
ab36bac
Merge branch 'master' of https://github.com/Emandac/Unciv
Emandac Oct 24, 2024
3a67ef7
Merge branch 'yairm210:master' into master
Emandac Oct 27, 2024
919a082
Update WorkerAutomation.kt
Emandac Oct 30, 2024
ed21943
Update SpecificUnitAutomation.kt
Emandac Oct 30, 2024
b9a832a
Update WorkerAutomation.kt
Emandac Oct 30, 2024
5edf4b7
Update SpecificUnitAutomation.kt
Emandac Oct 30, 2024
545572f
Merge branch 'yairm210:master' into master
Emandac Nov 10, 2024
904e5a8
Merge branch 'yairm210:master' into master
Emandac Nov 15, 2024
938091f
Merge branch 'yairm210:master' into master
Emandac Dec 14, 2024
6faa088
Merge branch 'master' of https://github.com/Emandac/Unciv
Emandac Dec 30, 2024
aaabab0
Now city states get mad when you steal their Lands
Emandac Dec 30, 2024
cb96cff
new version
Emandac Dec 31, 2024
e400964
change to getDiplomacyManagerOrMeet
Emandac Dec 31, 2024
61f90fa
added text to template.properties and changed AlertPopup.kt
Emandac Dec 31, 2024
ff67bb7
Update template.properties
Emandac Dec 31, 2024
467e725
with period at the end :b
Emandac Dec 31, 2024
aa532e9
add flag now
Emandac Jan 1, 2025
5ee629f
Merge branch 'yairm210:master' into master
Emandac Jan 1, 2025
b300c51
Made Option to declare war when a city state is bullied unavailable
Emandac Jan 2, 2025
342d56a
Merge branch 'yairm210:master' into master
Emandac Jan 2, 2025
04f6be5
Merge branch 'yairm210:master' into master
Emandac Jan 10, 2025
1623290
added option to change the Maximum Autosave turns stored
Emandac Jan 11, 2025
4edcd24
remove print
Emandac Jan 11, 2025
0d5295e
change letter
Emandac Jan 11, 2025
1599dd2
should fix issue with building test
Emandac Jan 11, 2025
eab98f2
update with changes
Emandac Jan 11, 2025
bd60cc4
Merge branch 'yairm210:master' into master
Emandac Jan 19, 2025
4fadce6
Added UniqueType.FoundPuppetCity
Emandac Jan 19, 2025
9d0ac5f
Merge branch 'yairm210:master' into master
Emandac Jan 31, 2025
a7a2e75
Added save promotion
Emandac Feb 1, 2025
48d4770
Merge branch 'master' of https://github.com/Emandac/Unciv
Emandac Feb 1, 2025
eb54ab4
Merge branch 'yairm210:master' into master
Emandac Feb 7, 2025
dc00ad5
Updated for PR
Emandac Feb 7, 2025
ef0bb39
Updated with requested changes
Emandac Feb 8, 2025
fe66e04
Removed unnecessary check
Emandac Feb 8, 2025
bb78c9e
updated PR
Emandac Feb 9, 2025
b02d9cb
Merge branch 'yairm210:master' into master
Emandac Feb 11, 2025
74aa1ff
Update PromotionPickerScreen.kt to save promotion cells too
Emandac Feb 11, 2025
547a393
change name and added !
Emandac Feb 13, 2025
503fbe1
updated name of variable
Emandac Feb 13, 2025
5ca4104
Merge branch 'yairm210:master' into master
Emandac Feb 14, 2025
58c806c
updated version from unitType to BaseUnit
Emandac Feb 14, 2025
94b21ca
updated variable name
Emandac Feb 14, 2025
343ef4e
Added unitType to reduce the xp cost of promotions for all units in a…
Emandac Feb 14, 2025
e46afa6
Merge branch 'yairm210:master' into master
Emandac Feb 14, 2025
0185096
updated name
Emandac Feb 15, 2025
77bf114
remove UniqueTarget.FollowerBelief
Emandac Feb 15, 2025
81423e8
Experience from to XP
Emandac Feb 19, 2025
0ac103b
fix ?
Emandac Feb 19, 2025
aabe698
XP
Emandac Feb 19, 2025
b71a2d9
change it back to Experience because it didn't want to build on git :(
Emandac Feb 19, 2025
a593037
back to XP then
Emandac Feb 19, 2025
75ce273
Merge branch 'yairm210:master' into master
Emandac Feb 19, 2025
ae116f1
update auto promotion and fix negative XP on unit
Emandac Feb 20, 2025
90b4779
Fix build issues and remove the XPForPromotionModifier from xpForNext…
Emandac Feb 20, 2025
0ffd85b
remove XPForPromotionModifier
Emandac Feb 21, 2025
f422292
Merge branch 'master' into master
Emandac Feb 21, 2025
75e385e
re added Statuses and remove duplicate comment
Emandac Feb 21, 2025
4fa37e3
remove some white space and 1 used import "com.unciv.ui.components.ex…
Emandac Feb 21, 2025
74e3e0c
remove unique from uniques.md
Emandac Feb 21, 2025
d54b66f
Merge branch 'yairm210:master' into master
Emandac Mar 1, 2025
8ae7456
Merge branch 'yairm210:master' into master
Emandac Mar 7, 2025
0acef7c
Merge branch 'yairm210:master' into change-appearance-of-civ
Emandac Mar 26, 2025
b59c5e0
start update
Emandac Mar 26, 2025
4eee5f8
update
Emandac Mar 27, 2025
460e6a4
more updates
Emandac Mar 27, 2025
69124a8
updates
Emandac Mar 27, 2025
01b567e
fix build error
Emandac Mar 27, 2025
c168b01
fix build error
Emandac Mar 27, 2025
871fe2f
updatate
Emandac Mar 28, 2025
b16aa30
Change displayCivName to getDisplayCivName()
Emandac Mar 28, 2025
9d02066
refactor ChangeCivilizationNation to ChangeCivilizationColors
Emandac Mar 28, 2025
d7fd525
added displayNation and remove white space
Emandac Mar 29, 2025
90f7833
Merge branch 'yairm210:master' into change-appearance-of-civ
Emandac Apr 4, 2025
99be5d5
updated some nation.name to getDisplayNationName()
Emandac Apr 4, 2025
0509f6d
Merge branch 'yairm210:master' into change-appearance-of-civ
Emandac Apr 8, 2025
15affa7
Merge branch 'yairm210:master' into change-appearance-of-civ
Emandac Apr 13, 2025
e933bd2
added setDisplayColorTransients
Emandac Apr 13, 2025
8be1243
last update before a while.
Emandac Apr 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ object NextTurnAutomation {
if (civInfo.diplomacyFunctions.canSignDeclarationOfFriendshipWith(requestingCiv)
&& DiplomacyAutomation.wantsToSignDeclarationOfFrienship(civInfo,requestingCiv)) {
diploManager.signDeclarationOfFriendship()
requestingCiv.addNotification("We have signed a Declaration of Friendship with [${civInfo.civName}]!", NotificationCategory.Diplomacy, NotificationIcon.Diplomacy, civInfo.civName)
requestingCiv.addNotification("We have signed a Declaration of Friendship with [${civInfo.displayCivName}]!", NotificationCategory.Diplomacy, NotificationIcon.Diplomacy, civInfo.displayCivName)
} else {
diploManager.otherCivDiplomacy().setFlag(DiplomacyFlags.DeclinedDeclarationOfFriendship, 10)
requestingCiv.addNotification("[${civInfo.civName}] has denied our Declaration of Friendship!", NotificationCategory.Diplomacy, NotificationIcon.Diplomacy, civInfo.civName)
requestingCiv.addNotification("[${civInfo.displayCivName}] has denied our Declaration of Friendship!", NotificationCategory.Diplomacy, NotificationIcon.Diplomacy, civInfo.displayCivName)
}
}
}
Expand Down Expand Up @@ -602,15 +602,15 @@ object NextTurnAutomation {
diplomacyManager.hasFlag(DiplomacyFlags.IgnoreThemSettlingNearUs) -> {
}
diplomacyManager.hasFlag(DiplomacyFlags.AgreedToNotSettleNearUs) -> {
otherCiv.popupAlerts.add(PopupAlert(AlertType.CitySettledNearOtherCivDespiteOurPromise, civInfo.civName))
otherCiv.popupAlerts.add(PopupAlert(AlertType.CitySettledNearOtherCivDespiteOurPromise, civInfo.displayCivName))
diplomacyManager.setFlag(DiplomacyFlags.IgnoreThemSettlingNearUs, 100)
diplomacyManager.setModifier(DiplomaticModifiers.BetrayedPromiseToNotSettleCitiesNearUs, -20f)
diplomacyManager.removeFlag(DiplomacyFlags.AgreedToNotSettleNearUs)
}
else -> {
val threatLevel = Automation.threatAssessment(civInfo, otherCiv)
if (threatLevel < ThreatLevel.High) // don't piss them off for no reason please.
otherCiv.popupAlerts.add(PopupAlert(AlertType.DemandToStopSettlingCitiesNear, civInfo.civName))
otherCiv.popupAlerts.add(PopupAlert(AlertType.DemandToStopSettlingCitiesNear, civInfo.displayCivName))
}
}
diplomacyManager.removeFlag(DiplomacyFlags.SettledCitiesNearUs)
Expand All @@ -621,15 +621,15 @@ object NextTurnAutomation {
when {
diplomacyManager.hasFlag(DiplomacyFlags.IgnoreThemSpreadingReligion) -> {}
diplomacyManager.hasFlag(DiplomacyFlags.AgreedToNotSpreadReligion) -> {
otherCiv.popupAlerts.add(PopupAlert(AlertType.ReligionSpreadDespiteOurPromise, civInfo.civName))
otherCiv.popupAlerts.add(PopupAlert(AlertType.ReligionSpreadDespiteOurPromise, civInfo.displayCivName))
diplomacyManager.setFlag(DiplomacyFlags.IgnoreThemSpreadingReligion, 100)
diplomacyManager.setModifier(DiplomaticModifiers.BetrayedPromiseToNotSpreadReligionToUs, -20f)
diplomacyManager.removeFlag(DiplomacyFlags.AgreedToNotSpreadReligion)
}
else -> {
val threatLevel = Automation.threatAssessment(civInfo, otherCiv)
if (threatLevel < ThreatLevel.High) // don't piss them off for no reason please.
otherCiv.popupAlerts.add(PopupAlert(AlertType.DemandToStopSpreadingReligion, civInfo.civName))
otherCiv.popupAlerts.add(PopupAlert(AlertType.DemandToStopSpreadingReligion, civInfo.displayCivName))
}
}
diplomacyManager.removeFlag(DiplomacyFlags.SpreadReligionInOurCities)
Expand Down
12 changes: 10 additions & 2 deletions core/src/com/unciv/logic/civilization/Civilization.kt
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ class Civilization : IsPartOfGameInfoSerialization {
*/
var civName = ""
private set
var displayCivName = ""
private set

var tech = TechManager()
var policies = PolicyManager()
Expand Down Expand Up @@ -259,6 +261,7 @@ class Civilization : IsPartOfGameInfoSerialization {

constructor(civName: String) {
this.civName = civName
this.displayCivName = civName
}

fun clone(): Civilization {
Expand All @@ -267,6 +270,7 @@ class Civilization : IsPartOfGameInfoSerialization {
toReturn.playerType = playerType
toReturn.playerId = playerId
toReturn.civName = civName
toReturn.displayCivName = displayCivName
toReturn.tech = tech.clone()
toReturn.policies = policies.clone()
toReturn.civConstructions = civConstructions.clone()
Expand Down Expand Up @@ -775,8 +779,8 @@ class Civilization : IsPartOfGameInfoSerialization {
* And if the civs don't yet know who they are then they don't know if they're barbarians =\
* */
fun setNationTransient() {
nation = gameInfo.ruleset.nations[civName]
?: throw UncivShowableException("Nation $civName is not found!")
nation = gameInfo.ruleset.nations[displayCivName]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope - the nation lookup key shouldn't change

?: throw UncivShowableException("Nation $displayCivName is not found!")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... but this is right.

}

fun setTransients() {
Expand Down Expand Up @@ -1070,6 +1074,10 @@ class Civilization : IsPartOfGameInfoSerialization {
else
lastSeenImprovement[position] = improvement
}

fun changeDisplayCivName(name: String) {
this.displayCivName = name
}
}

/**
Expand Down
23 changes: 23 additions & 0 deletions core/src/com/unciv/logic/civilization/managers/TechManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,29 @@ class TechManager : IsPartOfGameInfoSerialization {
unique,
civInfo,
triggerNotificationText = "due to entering the [${currentEra.name}]")
for (unique in era.getMatchingUniques(UniqueType.ChangeCivilizationName)) {
/*
check if there is any civ with this name.
And this try-catch setement to not crash the game if the civ is not playing
*/

if (civInfo.gameInfo.civilizations.firstOrNull{ it.civName == unique.params[0] } != null) {
val civ = civInfo.gameInfo.getCivilization(unique.params[0])
civ.changeDisplayCivName(unique.params[1])
}
}

for (unique in era.getMatchingUniques(UniqueType.ChangeCivilizationNation)) {
// check if there is any civ with this name.
if (civInfo.gameInfo.civilizations.firstOrNull{ it.civName == unique.params[0] } != null) {
val civ = civInfo.gameInfo.getCivilization(unique.params[0])
val dummyNation = civInfo.gameInfo.ruleset.nations[unique.params[1]]
if (dummyNation != null) {
civ.changeDisplayCivName(unique.params[1])
civ.nation = dummyNation
}
}
}
}

private fun updateEra() {
Expand Down
6 changes: 5 additions & 1 deletion core/src/com/unciv/models/ruleset/unique/UniqueType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@ enum class UniqueType(
TriggersVictory("Triggers victory", UniqueTarget.Global),
TriggersCulturalVictory("Triggers a Cultural Victory upon completion", UniqueTarget.Global),

// Civ appearance
ChangeCivilizationName("Change civilization [civFilter] name to [civFilter]",UniqueTarget.Era),
ChangeCivilizationNation("Change civilization [civFilter] nation to [civFilter]",UniqueTarget.Era),

/// Misc.
MayBuyConstructionsInPuppets("May buy items in puppet cities", UniqueTarget.Global),
MayNotAnnexCities("May not annex cities", UniqueTarget.Global),
Expand Down Expand Up @@ -602,7 +606,7 @@ enum class UniqueType(
RoughTerrain("Rough terrain", UniqueTarget.Terrain),

ExcludedFromMapEditor("Excluded from map editor", UniqueTarget.Terrain, UniqueTarget.Improvement, UniqueTarget.Resource, UniqueTarget.Nation, flags = UniqueFlag.setOfHiddenToUsers),

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't introduce trailing blanks, especially not where it's not your changes

/////// Resource uniques
ResourceAmountOnTiles("Deposits in [tileFilter] tiles always provide [amount] resources", UniqueTarget.Resource),
CityStateOnlyResource("Can only be created by Mercantile City-States", UniqueTarget.Resource),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class CityStateDiplomacyTable(private val diplomacyScreen: DiplomacyScreen) {
val nextLevelString = when {
atWar -> ""
otherCivDiplomacyManager.getInfluence().toInt() < 30 -> "Reach 30 for friendship."
ally == viewingCiv.civName -> ""
ally == viewingCiv.displayCivName-> ""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should stay the unique key as well - or you'd lose your CS allies when you change name

else -> "Reach highest influence above 60 for alliance."
}
diplomacyTable.add(diplomacyScreen.getRelationshipTable(otherCivDiplomacyManager)).row()
Expand Down Expand Up @@ -472,8 +472,8 @@ class CityStateDiplomacyTable(private val diplomacyScreen: DiplomacyScreen) {
val warTable = Table()
warTable.defaults().pad(10f)

val title = "War against [${target.civName}]"
val description = "We need you to help us defend against [${target.civName}]. Killing [${otherCiv.questManager.unitsToKill(target)}] of their military units would slow their offensive."
val title = "War against [${target.displayCivName}]"
val description = "We need you to help us defend against [${target.displayCivName}]. Killing [${otherCiv.questManager.unitsToKill(target)}] of their military units would slow their offensive."
val progress = if (viewingCiv.knows(target)) "Currently you have killed [${otherCiv.questManager.unitsKilledSoFar(target, viewingCiv)}] of their military units."
else "You need to find them first!"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class DiplomacyScreen(
questIcon.x = floor(civIndicator.width - questIcon.width)
}

val civNameLabel = civ.civName.toLabel(hideIcons = true)
val civNameLabel = civ.displayCivName.toLabel(hideIcons = true)

// The wrapper serves only to highlight the selected civ better
val civButton = Table().apply {
Expand Down Expand Up @@ -275,7 +275,7 @@ class DiplomacyScreen(

private fun getDeclareWarButtonText(otherCiv: Civilization): String {
val messageLines = arrayListOf<String>()
messageLines += "Declare war on [${otherCiv.civName}]?"
messageLines += "Declare war on [${otherCiv.displayCivName}]?"
// Tell the player who all will join the other side from defensive pacts
val otherCivDefensivePactList = otherCiv.diplomacy.values.filter {
otherCivDiploManager -> otherCivDiploManager.otherCiv() != viewingCiv
Expand All @@ -286,7 +286,7 @@ class DiplomacyScreen(
// Defensive pact chains are not allowed now
for (civ in otherCivDefensivePactList) {
messageLines += if (viewingCiv.knows(civ)) {
"[${civ.civName}] will also join them in the war"
"[${civ.displayCivName}] will also join them in the war"
} else {
"An unknown civilization will also join them in the war"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class MajorCivDiplomacyTable(private val diplomacyScreen: DiplomacyScreen) {
): TextButton {
val denounceButton = "Denounce ([30] turns)".toTextButton()
denounceButton.onClick {
ConfirmPopup(diplomacyScreen, "Denounce [${otherCiv.civName}]?", "Denounce ([30] turns)") {
ConfirmPopup(diplomacyScreen, "Denounce [${otherCiv.displayCivName}]?", "Denounce ([30] turns)") {
diplomacyManager.denounce()
diplomacyScreen.updateLeftSideTable(otherCiv)
diplomacyScreen.setRightSideFlavorText(otherCiv, "We will remember this.", "Very well.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ class OfferColumnsTable(
if (!isPortraitMode) {
// In landscape, arrange in 4 panels: ours left / theirs right ; items top / offers bottom.
add("Our items".tr())
add("[${tradeLogic.otherCivilization.civName}]'s items".tr()).row()
add("[${tradeLogic.otherCivilization.displayCivName}]'s items".tr()).row()

add(ourAvailableOffersTable).prefSize(columnWidth, screen.stage.height / 2)
add(theirAvailableOffersTable).prefSize(columnWidth, screen.stage.height / 2).row()

addSeparator().height(2f)

add("Our trade offer".tr())
add("[${tradeLogic.otherCivilization.civName}]'s trade offer".tr()).row()
add("[${tradeLogic.otherCivilization.displayCivName}]'s trade offer".tr()).row()
add(ourOffersTable).size(columnWidth, screen.stage.height / 3)
add(theirOffersTable).size(columnWidth, screen.stage.height / 3)
} else {
Expand All @@ -85,13 +85,13 @@ class OfferColumnsTable(

addSeparator().height(2f)

add("[${tradeLogic.otherCivilization.civName}]'s items".tr()).colspan(2).row()
add("[${tradeLogic.otherCivilization.displayCivName}]'s items".tr()).colspan(2).row()
add(theirAvailableOffersTable).height(screen.stage.height / 4f).colspan(2).row()

addSeparator().height(5f)

add("Our trade offer".tr())
add("[${tradeLogic.otherCivilization.civName}]'s trade offer".tr()).row()
add("[${tradeLogic.otherCivilization.displayCivName}]'s trade offer".tr()).row()
add(ourOffersTable).height(screen.stage.height / 4f).width(columnWidth)
add(theirOffersTable).height(screen.stage.height / 4f).width(columnWidth)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import com.unciv.logic.civilization.PlayerType
import com.unciv.models.metadata.GameSettings.NationPickerListMode
import com.unciv.models.metadata.Player
import com.unciv.models.ruleset.nation.Nation
import com.unciv.models.ruleset.unique.UniqueType
import com.unciv.models.translations.tr
import com.unciv.ui.audio.MusicMood
import com.unciv.ui.audio.MusicTrackChooserFlags
Expand Down Expand Up @@ -176,7 +177,7 @@ internal class NationPickerPopup(

// Decide by listMode how each block is built -
// for each a factory producing an Actor and info on how to select it
fun getListModeNationActor(element: NationIterationElement): Pair<WidgetGroup, SelectInfo> {
fun getListModeNationActor(element: NationIterationElement): Pair<NationTable, SelectInfo> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems unrelated. A simple explanation probably?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should change it back 😅

val currentSelectInfo = SelectInfo(element.nation, currentY)
val nationTable = NationTable(element.nation, civBlocksWidth, 0f) // no need for min height
val cell = nationListTable.add(nationTable)
Expand Down Expand Up @@ -215,7 +216,7 @@ internal class NationPickerPopup(

for (element in getSortedNations()) {
val (nationActor, currentSelectInfo) = nationActorFactory(element)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More trailing blanks. You don't let Android Studio clean them for you?
At least Ctrl-R, check regex, search=[ \t]+$, replace with ``, Replace all... Only in the files you worked on of course.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use intelij 😅

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surely has a comparable setting as it's the same thing just different wrapping.

Copy link
Contributor Author

@Emandac Emandac Mar 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though i didn't manage to remove the white space with it but
It was still useful to replace displayCivName to getDisplayCivName() :D

nationActor.onClick {
highlightNation(currentSelectInfo)
}
Expand All @@ -238,7 +239,7 @@ internal class NationPickerPopup(
nationListTable.keyShortcuts.add(key) { onKeyPress(key) }
}
}
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😬


nationListScroll.layout()
pack()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class GlobalPoliticsOverviewTable(
val civInfoTable = Table(skin)
val leaderName = civ.nation.leaderName
civInfoTable.add(leaderName.toLabel(fontSize = 30)).row()
civInfoTable.add(civ.civName.toLabel(hideIcons = true)).row()
civInfoTable.add(civ.displayCivName.toLabel(hideIcons = true)).row()
civInfoTable.add(civ.tech.era.name.toLabel()).row()
return civInfoTable
}
Expand Down Expand Up @@ -196,7 +196,7 @@ class GlobalPoliticsOverviewTable(

private fun getCivName(otherciv: Civilization): String {
if (viewingPlayer.knows(otherciv) || otherciv.civName == viewingPlayer.civName) {
return otherciv.civName
return otherciv.displayCivName
}
return "an unknown civilization"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ internal class VictoryScreenCivGroup(
val labelText =
if (currentPlayer.knows(civ) || currentPlayer == civ ||
civ.isDefeated() || currentPlayer.isDefeated()) {
if (additionalInfo.isEmpty()) civ.civName
else "{${civ.civName}}$separator{$additionalInfo}"
if (additionalInfo.isEmpty()) civ.displayCivName
else "{${civ.displayCivName}}$separator{$additionalInfo}"
} else Constants.unknownNationName

val civInfo = getCivImageAndColors(civ, currentPlayer, defeatedPlayerStyle)
Expand Down
Loading
Loading