mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-12 03:48:16 +07:00
This allows mods to override unique text for nations. This is useful for using uniques but phrasing them differently when shown to the player. (#3166)
The attribute in the nation json to change this is "uniqueText" A mod to test this is here, it changes Babylon's unique text to "Test Babylon Unique Text" https://cdn.discordapp.com/attachments/670547794951405584/757393404924526672/Test_Custom_Nation_Unique_Text.zip
This commit is contained in:
parent
f721f59734
commit
53a836201d
@ -39,6 +39,7 @@ class Nation : INamed {
|
||||
var uniqueName = ""
|
||||
var uniques = HashSet<String>()
|
||||
val uniqueObjects: List<Unique> by lazy { uniques.map { Unique(it) } }
|
||||
var uniqueText = ""
|
||||
var innerColor: List<Int>? = null
|
||||
var startBias = ArrayList<String>()
|
||||
|
||||
@ -92,8 +93,13 @@ class Nation : INamed {
|
||||
}
|
||||
|
||||
if (uniqueName != "") textList += uniqueName.tr() + ":"
|
||||
textList += " " + uniques.joinToString(", ") { it.tr() }
|
||||
textList += ""
|
||||
if (uniqueText != "") {
|
||||
textList += " " + uniqueText.tr()
|
||||
}
|
||||
else {
|
||||
textList += " " + uniques.joinToString(", ") { it.tr() }
|
||||
textList += ""
|
||||
}
|
||||
|
||||
if (startBias.isNotEmpty()) {
|
||||
textList += "Start bias:".tr() + startBias.joinToString(", ", " ") { it.tr() }
|
||||
|
Loading…
Reference in New Issue
Block a user