mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 07:17:50 +07:00
Add BaseUnit.automaticallyUpgradedInProductionToUnitByTech() (#10664)
* Update BaseUnit.kt * Update RulesetValidator.kt * Update BasicTests.kt * Update BaseUnit.kt * Update TechManager.kt * Update BaseUnit.kt * Update BaseUnit.kt
This commit is contained in:
@ -63,12 +63,13 @@ class BasicTests {
|
||||
|
||||
// If there's a unit that obsoletes with no upgrade then when it obsoletes
|
||||
// and we try to work on its upgrade, we'll get an exception - see techManager
|
||||
// But...Scout obsoletes at Scientific Theory with no upgrade...?
|
||||
@Test
|
||||
fun allObsoletingUnitsHaveUpgrades() {
|
||||
val units: Collection<BaseUnit> = ruleset.units.values
|
||||
var allObsoletingUnitsHaveUpgrades = true
|
||||
for (unit in units) {
|
||||
if (unit.techsThatObsoleteThis().any() && unit.upgradesTo == null && unit.name !="Scout" ) {
|
||||
if (unit.techsAtWhichAutoUpgradeInProduction().any() && unit.upgradesTo == null && unit.name !="Scout" ) {
|
||||
debug("%s obsoletes but has no upgrade", unit.name)
|
||||
allObsoletingUnitsHaveUpgrades = false
|
||||
}
|
||||
|
Reference in New Issue
Block a user