Skip to content

Commit

Permalink
Add validate check for invalid research skills listed.
Browse files Browse the repository at this point in the history
  • Loading branch information
rcuhljr committed Feb 20, 2017
1 parent 1800379 commit 8b1f92e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions validate.lic
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,16 @@ class DRYamlValidator
.each { |skill| error("Skill in research_skills could not be found in crossing_training. '#{skill}'") }
end

def assert_that_all_research_skills_are_valid(settings)
return unless settings.use_research
return unless settings.crossing_training
return unless settings.research_skills

settings.research_skills
.reject { |skill| @valid_research_skills.include?(skill) }
.each { |skill| error("Skill in research_skills was not a valid research skill. '#{skill}'") }
end

def assert_that_crossing_training_skills_are_valid(settings)
return unless settings.crossing_training

Expand Down Expand Up @@ -350,6 +360,7 @@ class DRYamlValidator
@valid_melee_skills = ['Offhand Weapon', 'Brawling', 'Polearms', 'Large Blunt', 'Twohanded Blunt', 'Staves', 'Small Blunt', 'Small Edged', 'Large Edged', 'Twohanded Edged']
@valid_weapon_skills = @valid_ranged_skills + @valid_melee_skills
@valid_summon_skills = @valid_thrown_skills + @valid_melee_skills - ['Offhand Weapon', 'Brawling']
@valid_research_skills = ['Arcana', 'Life Magic', 'Holy Magic', 'Lunar Magic', 'Elemental Magic', 'Arcane Magic', 'Attunement', 'Warding', 'Augmentation', 'Utility']

@all_skills = ['Scouting', 'Evasion', 'Athletics', 'Stealth', 'Perception', 'Locksmithing', 'First Aid', 'Skinning',
'Outdoorsmanship', 'Thievery', 'Backstab', 'Thanatology', 'Forging', 'Outfitting', 'Engineering',
Expand Down

0 comments on commit 8b1f92e

Please sign in to comment.