From debb53a52029374470c7bd87cc16f39f358b1db3 Mon Sep 17 00:00:00 2001 From: Mahtra <93822896+MahtraDR@users.noreply.github.com> Date: Thu, 14 Nov 2024 18:31:45 +1300 Subject: [PATCH] [scripts][validate]Checks deprecated and invalid gear settings --- validate.lic | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/validate.lic b/validate.lic index 08d99675bd..8bf4f73f28 100644 --- a/validate.lic +++ b/validate.lic @@ -141,6 +141,28 @@ class DRYamlValidator error("gem_pouch_low_value defined, but no low_value_gem_pouch_container for low value pouches to go into") end + def assert_that_gear_has_deprecated_is_leather_entry(settings) + warn_gear_entries = [] + settings.gear.each { |key| warn_gear_entries << key if key[:is_leather] } + + unless warn_gear_entries.none? + warn_gear_entries.each do |entry| + warn("Gear entry #{entry} has deprecated is_leather setting.") + end + end + end + + def assert_that_gear_has_incorrect_worn_entry(settings) + error_gear_entries = [] + settings.gear.each { |key| error_gear_entries << key if key[:worn] } + + unless error_gear_entries.none? + error_gear_entries.each do |entry| + error("Gear entry #{entry} has incorrect worn setting. The correct setting name is is_worn.") + end + end + end + def assert_that_sorcery_is_dangerous(settings) return unless settings.crafting_training_spells_enable_sorcery return if settings.crafting_training_spells_enable_sorcery_squelch_warning