mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-20 09:17:47 +07:00
City construction queue: Subsequent units no longer displays construction progress towards first unit of its kind
This commit is contained in:
parent
c45ecebb0c
commit
bc1405cdb3
@ -123,7 +123,7 @@ class CityConstructions {
|
||||
val construction = getConstruction(constructionName)
|
||||
val cost = construction.getProductionCost(cityInfo.civInfo)
|
||||
val turnsToConstruction = turnsToConstruction(constructionName, useStoredProduction)
|
||||
val currentProgress = getWorkDone(constructionName)
|
||||
val currentProgress = if (useStoredProduction) getWorkDone(constructionName) else 0
|
||||
if (currentProgress == 0) return "\n$cost${Fonts.production} $turnsToConstruction${Fonts.turn}"
|
||||
else return "\n$currentProgress/$cost${Fonts.production}\n$turnsToConstruction${Fonts.turn}"
|
||||
}
|
||||
|
@ -323,7 +323,7 @@ class Ruleset {
|
||||
fun getPrereqTree(technologyName: String): Sequence<String> {
|
||||
val technology = technologies[technologyName]
|
||||
if (technology == null) return sequenceOf()
|
||||
return technology.prerequisites.asSequence() + technology.prerequisites.flatMap { getPrereqTree(it) }
|
||||
return technology.prerequisites.asSequence() + technology.prerequisites.asSequence().flatMap { getPrereqTree(it) }
|
||||
}
|
||||
|
||||
val allOtherPrereqs = tech.prerequisites.asSequence().filterNot { it == prereq }.flatMap { getPrereqTree(it) }
|
||||
|
@ -220,7 +220,7 @@ class CityConstructionsTable(val cityScreen: CityScreen) : Table(CameraStageBase
|
||||
|
||||
var text = constructionName.tr() +
|
||||
if (constructionName in PerpetualConstruction.perpetualConstructionsMap) "\n∞"
|
||||
else cityConstructions.getTurnsToConstructionString(constructionName)
|
||||
else cityConstructions.getTurnsToConstructionString(constructionName, isFirstConstructionOfItsKind)
|
||||
|
||||
val constructionResource = cityConstructions.getConstruction(constructionName).getResourceRequirements()
|
||||
for ((resource, amount) in constructionResource)
|
||||
|
Loading…
Reference in New Issue
Block a user