mirror of
https://github.com/yairm210/Unciv.git
synced 2025-10-02 08:22:08 -04:00
Ruleset checks allow for unit types to be defined in default ruleset, since it's copied to all complex rulesets if no unit types are there
This commit is contained in:
parent
8fec3b8345
commit
2ee4598e70
@ -324,6 +324,7 @@ class Ruleset {
|
|||||||
|
|
||||||
if (!modOptions.isBaseRuleset) return CheckModLinksResult(warningCount, lines)
|
if (!modOptions.isBaseRuleset) return CheckModLinksResult(warningCount, lines)
|
||||||
|
|
||||||
|
val baseRuleset = RulesetCache.getBaseRuleset()
|
||||||
|
|
||||||
for (unit in units.values) {
|
for (unit in units.values) {
|
||||||
if (unit.requiredTech != null && !technologies.containsKey(unit.requiredTech!!))
|
if (unit.requiredTech != null && !technologies.containsKey(unit.requiredTech!!))
|
||||||
@ -340,7 +341,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))
|
if (!unitTypes.containsKey(unit.unitType) && !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!"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user