Resolved #10621 - Ruleset validation for negative-weight ruin rewards

This commit is contained in:
Yair Morgenstern 2023-11-29 19:56:38 +02:00
parent 5b29a0234b
commit dfd8d5cbc9

View File

@ -178,6 +178,7 @@ class RulesetValidator(val ruleset: Ruleset) {
tryFixUnknownUniques: Boolean
) {
for (reward in ruleset.ruinRewards.values) {
if (reward.weight < 0) lines += "${reward.name} has a negative weight, which is not allowed!"
for (difficulty in reward.excludedDifficulties)
if (!ruleset.difficulties.containsKey(difficulty))
lines += "${reward.name} references difficulty ${difficulty}, which does not exist!"