Skip to content

Commit

Permalink
[scripts][validate]Checks deprecated and invalid gear settings
Browse files Browse the repository at this point in the history
  • Loading branch information
MahtraDR committed Nov 14, 2024
1 parent b00ce3c commit debb53a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions validate.lic
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit debb53a

Please sign in to comment.