mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-26 05:14:32 -04:00
Added test for branches which require missing eras
This commit is contained in:
parent
ec6b4dc017
commit
86f2560d7e
@ -3,5 +3,5 @@ package com.unciv.models.ruleset
|
||||
class PolicyBranch : Policy() {
|
||||
var policies: ArrayList<Policy> = arrayListOf()
|
||||
var priorities: HashMap<String, Int> = HashMap()
|
||||
lateinit var era: String
|
||||
var era: String = ""
|
||||
}
|
||||
|
@ -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!"
|
||||
|
Loading…
x
Reference in New Issue
Block a user