mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-07 14:02:48 +07:00
Added check for belief.type (#10711)
* Added check for belief.type * Removed check for BeliefType.None Not needed if check beforehand checks for it * Update RulesetValidator.kt * Update Belief.kt * Update Belief.kt
This commit is contained in:
parent
9c4ba059ca
commit
16893ced68
@ -8,6 +8,7 @@ import com.unciv.json.fromJsonFile
|
||||
import com.unciv.json.json
|
||||
import com.unciv.logic.map.tile.RoadStatus
|
||||
import com.unciv.models.metadata.BaseRuleset
|
||||
import com.unciv.models.ruleset.BeliefType
|
||||
import com.unciv.models.ruleset.Building
|
||||
import com.unciv.models.ruleset.Ruleset
|
||||
import com.unciv.models.ruleset.RulesetCache
|
||||
@ -230,6 +231,8 @@ class RulesetValidator(val ruleset: Ruleset) {
|
||||
tryFixUnknownUniques: Boolean
|
||||
) {
|
||||
for (belief in ruleset.beliefs.values) {
|
||||
if (belief.type == BeliefType.Any || belief.type == BeliefType.None)
|
||||
lines += "${belief.name} type is {belief.type}, which is not allowed!"
|
||||
uniqueValidator.checkUniques(belief, lines, true, tryFixUnknownUniques)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user