mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
Replaced units are not shown in tech button even when replacing unique unit is in a different tech
This commit is contained in:
parent
ad89286476
commit
75c6ab8acb
@ -86,7 +86,8 @@ class Technology {
|
|||||||
it.requiredTech == name &&
|
it.requiredTech == name &&
|
||||||
(it.uniqueTo == null || it.uniqueTo == civInfo.civName)
|
(it.uniqueTo == null || it.uniqueTo == civInfo.civName)
|
||||||
}
|
}
|
||||||
val replacedUnits = enabledUnits.mapNotNull { it.replaces }
|
val replacedUnits = civInfo.gameInfo.ruleSet.units.values.filter { it.uniqueTo==civInfo.civName }
|
||||||
|
.mapNotNull { it.replaces }
|
||||||
enabledUnits = enabledUnits.filter { it.name !in replacedUnits }
|
enabledUnits = enabledUnits.filter { it.name !in replacedUnits }
|
||||||
|
|
||||||
if (!civInfo.gameInfo.gameParameters.nuclearWeaponsEnabled)
|
if (!civInfo.gameInfo.gameParameters.nuclearWeaponsEnabled)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user