diff --git a/core/src/com/unciv/models/ruleset/PolicyBranch.kt b/core/src/com/unciv/models/ruleset/PolicyBranch.kt index e3127a0e24..92bc6be7a3 100644 --- a/core/src/com/unciv/models/ruleset/PolicyBranch.kt +++ b/core/src/com/unciv/models/ruleset/PolicyBranch.kt @@ -3,5 +3,5 @@ package com.unciv.models.ruleset class PolicyBranch : Policy() { var policies: ArrayList = arrayListOf() var priorities: HashMap = HashMap() - lateinit var era: String + var era: String = "" } diff --git a/core/src/com/unciv/models/ruleset/Ruleset.kt b/core/src/com/unciv/models/ruleset/Ruleset.kt index 1759f79dd4..5ebc80bd65 100644 --- a/core/src/com/unciv/models/ruleset/Ruleset.kt +++ b/core/src/com/unciv/models/ruleset/Ruleset.kt @@ -813,6 +813,11 @@ class Ruleset { checkUniques(policy, lines, rulesetSpecific, forOptionsPopup) } + for (branch in policyBranches.values) + if (branch.era !in eras) + lines += "${branch.name} requires era ${branch.era} which does not exist!" + + for (policy in policyBranches.values.flatMap { it.policies + it }) if (policy != policies[policy.name]) lines += "More than one policy with the name ${policy.name} exists!"