mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-22 22:00:24 +07:00
Better check for units with no unitType defined
This commit is contained in:
@ -348,7 +348,7 @@ class Ruleset {
|
|||||||
for (promotion in unit.promotions)
|
for (promotion in unit.promotions)
|
||||||
if (!unitPromotions.containsKey(promotion))
|
if (!unitPromotions.containsKey(promotion))
|
||||||
lines += "${unit.name} contains promotion $promotion which does not exist!"
|
lines += "${unit.name} contains promotion $promotion which does not exist!"
|
||||||
if (!unitTypes.containsKey(unit.unitType) && !baseRuleset.unitTypes.containsKey(unit.unitType))
|
if (!unitTypes.containsKey(unit.unitType) && (unitTypes.isNotEmpty() || !baseRuleset.unitTypes.containsKey(unit.unitType)))
|
||||||
lines += "${unit.name} is of type ${unit.unitType}, which does not exist!"
|
lines += "${unit.name} is of type ${unit.unitType}, which does not exist!"
|
||||||
for (unique in unit.getMatchingUniques("Can construct []")) {
|
for (unique in unit.getMatchingUniques("Can construct []")) {
|
||||||
val improvementName = unique.params[0]
|
val improvementName = unique.params[0]
|
||||||
|
Reference in New Issue
Block a user