mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-30 15:30:43 -04:00
Fixed all renamed units being called 'instanceName' (#5140)
* Fixed all renamed units being called 'instanceName' * Removed extreneous square brackets resulting in incorrect translations * Fixed translation problems
This commit is contained in:
parent
69e2828a0e
commit
9a29ce8422
@ -495,7 +495,7 @@ object UnitAutomation {
|
|||||||
if (unit.isDestroyed) return // Opening ruins _might_ have upgraded us to another unit
|
if (unit.isDestroyed) return // Opening ruins _might_ have upgraded us to another unit
|
||||||
if (unit.health < 80 && tryHealUnit(unit)) return
|
if (unit.health < 80 && tryHealUnit(unit)) return
|
||||||
if (tryExplore(unit)) return
|
if (tryExplore(unit)) return
|
||||||
unit.civInfo.addNotification("[${unit.displayName()}] finished exploring.", unit.currentTile.position, unit.name, "OtherIcons/Sleep")
|
unit.civInfo.addNotification("${unit.shortDisplayName()} finished exploring.", unit.currentTile.position, unit.name, "OtherIcons/Sleep")
|
||||||
unit.action = null
|
unit.action = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ class WorkerAutomation(
|
|||||||
|
|
||||||
if (WorkerAutomationConst.consoleOutput)
|
if (WorkerAutomationConst.consoleOutput)
|
||||||
println("WorkerAutomation: ${unit.label()} -> nothing to do")
|
println("WorkerAutomation: ${unit.label()} -> nothing to do")
|
||||||
unit.civInfo.addNotification("[${unit.displayName()}] has no work to do.", currentTile.position, unit.name, "OtherIcons/Sleep")
|
unit.civInfo.addNotification("${unit.shortDisplayName()} has no work to do.", currentTile.position, unit.name, "OtherIcons/Sleep")
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -644,8 +644,8 @@ class CivilizationInfo {
|
|||||||
val unitToDisband = civMilitaryUnits.first()
|
val unitToDisband = civMilitaryUnits.first()
|
||||||
unitToDisband.disband()
|
unitToDisband.disband()
|
||||||
civMilitaryUnits -= unitToDisband
|
civMilitaryUnits -= unitToDisband
|
||||||
val unitName = unitToDisband.displayName()
|
val unitName = unitToDisband.shortDisplayName()
|
||||||
addNotification("Cannot provide unit upkeep for [$unitName] - unit has been disbanded!", unitName, NotificationIcon.Death)
|
addNotification("Cannot provide unit upkeep for $unitName - unit has been disbanded!", unitName, NotificationIcon.Death)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -111,12 +111,17 @@ class MapUnit {
|
|||||||
fun displayName(): String {
|
fun displayName(): String {
|
||||||
val baseName =
|
val baseName =
|
||||||
if (instanceName == null) "[$name]"
|
if (instanceName == null) "[$name]"
|
||||||
else "instanceName ([$name])"
|
else "$instanceName ([$name])"
|
||||||
|
|
||||||
return if (religion == null) baseName
|
return if (religion == null) baseName
|
||||||
else "$baseName ([${getReligionDisplayName()}])"
|
else "$baseName ([${getReligionDisplayName()}])"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun shortDisplayName(): String {
|
||||||
|
return if (instanceName != null) "[$instanceName]"!!
|
||||||
|
else "[$name]"
|
||||||
|
}
|
||||||
|
|
||||||
var currentMovement: Float = 0f
|
var currentMovement: Float = 0f
|
||||||
var health: Int = 100
|
var health: Int = 100
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user