mirror of
https://github.com/yairm210/Unciv.git
synced 2025-03-03 22:22:51 +07:00
Fixed old worker speed improvement uniques no longer working (#4162)
This commit is contained in:
parent
11af49e6da
commit
b3f5820cb4
@ -30,13 +30,13 @@ class TileImprovement : NamedStats() {
|
|||||||
var realTurnsToBuild = turnsToBuild.toFloat() * civInfo.gameInfo.gameParameters.gameSpeed.modifier
|
var realTurnsToBuild = turnsToBuild.toFloat() * civInfo.gameInfo.gameParameters.gameSpeed.modifier
|
||||||
for (unique in civInfo.getMatchingUniques("-[]% tile improvement construction time")) {
|
for (unique in civInfo.getMatchingUniques("-[]% tile improvement construction time")) {
|
||||||
realTurnsToBuild *= 1 - unique.params[0].toFloat() / 100f
|
realTurnsToBuild *= 1 - unique.params[0].toFloat() / 100f
|
||||||
// Deprecated since 3.14.17
|
|
||||||
if (civInfo.hasUnique("Worker construction increased 25%"))
|
|
||||||
realTurnsToBuild *= 0.75f
|
|
||||||
if (civInfo.hasUnique("Tile improvement speed +25%"))
|
|
||||||
realTurnsToBuild *= 0.75f
|
|
||||||
//
|
|
||||||
}
|
}
|
||||||
|
// Deprecated since 3.14.17
|
||||||
|
if (civInfo.hasUnique("Worker construction increased 25%"))
|
||||||
|
realTurnsToBuild *= 0.75f
|
||||||
|
if (civInfo.hasUnique("Tile improvement speed +25%"))
|
||||||
|
realTurnsToBuild *= 0.75f
|
||||||
|
//
|
||||||
// In some weird cases it was possible for something to take 0 turns, leading to it instead never finishing
|
// In some weird cases it was possible for something to take 0 turns, leading to it instead never finishing
|
||||||
if (realTurnsToBuild < 1) realTurnsToBuild = 1f
|
if (realTurnsToBuild < 1) realTurnsToBuild = 1f
|
||||||
return realTurnsToBuild.roundToInt()
|
return realTurnsToBuild.roundToInt()
|
||||||
|
Loading…
Reference in New Issue
Block a user