mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 14:24:43 -04:00
Added mod check for upgrading to a unit with no required tech
This commit is contained in:
parent
cea8bdf12c
commit
fb3048442c
@ -241,10 +241,12 @@ class Ruleset {
|
|||||||
if (unit.upgradesTo != null && !units.containsKey(unit.upgradesTo!!))
|
if (unit.upgradesTo != null && !units.containsKey(unit.upgradesTo!!))
|
||||||
lines += "${unit.name} upgrades to unit ${unit.upgradesTo} which does not exist!"
|
lines += "${unit.name} upgrades to unit ${unit.upgradesTo} which does not exist!"
|
||||||
if (unit.replaces != null && !units.containsKey(unit.replaces!!))
|
if (unit.replaces != null && !units.containsKey(unit.replaces!!))
|
||||||
lines += "${unit.replaces} replaces ${unit.replaces} which does not exist!"
|
lines += "${unit.name} replaces ${unit.replaces} which does not exist!"
|
||||||
for (promotion in unit.promotions)
|
for (promotion in unit.promotions)
|
||||||
if (!unitPromotions.containsKey(promotion))
|
if (!unitPromotions.containsKey(promotion))
|
||||||
lines += "${unit.replaces} contains promotion $promotion which does not exist!"
|
lines += "${unit.replaces} contains promotion $promotion which does not exist!"
|
||||||
|
if (unit.upgradesTo != null && units.containsKey(unit.upgradesTo!!) && units[unit.upgradesTo!!]!!.requiredTech == null)
|
||||||
|
lines += "${unit.name} upgrades to ${unit.upgradesTo} which has no required tech!"
|
||||||
}
|
}
|
||||||
|
|
||||||
for (building in buildings.values) {
|
for (building in buildings.values) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user