From 0539eac4c6ce66acec211f285c8d14ea33c54345 Mon Sep 17 00:00:00 2001 From: mikejc Date: Sat, 25 May 2024 21:43:22 -0400 Subject: [PATCH] learned - revert prior change, also display 0 exp skills --- learned.lic | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/learned.lic b/learned.lic index 9ce7d62fae..95ee8b42a5 100644 --- a/learned.lic +++ b/learned.lic @@ -22,12 +22,10 @@ class LearnedData [{ name: 'lore', regex: /lore/, description: 'Show exp gained in lore skills.' }], [{ name: 'guild', regex: /guild/, description: 'Show exp gained in your guild skill.' }], [{ name: 'reset', regex: /reset/, description: 'Reset learned experience' }], - [{ name: 'zero', regex: /zero/, description: 'Show only skills with nothing learned' }], [] ] args = parse_args(arg_definitions) - @zero = args.zero ? true : false survival_skills = ['Evasion', 'Athletics', 'Perception', 'Stealth', 'Locksmithing', 'Thievery', 'First Aid', 'Outdoorsmanship', 'Skinning'] lore_skills = ['Alchemy', 'Appraisal', 'Enchanting', 'Forging', 'Mechanical Lore', 'Performance', 'Scholarship', 'Tactics', 'Outfitting', 'Engineering'] @@ -78,25 +76,12 @@ class LearnedData learning_time = ((Time.now - DRSkill.start_time) / 60.0 / 60) columns = get_settings.learned_column_count - if @zero - DRSkill.list - .select { |item| @skills_to_show.include?(item.name) } - .select { |item| item.current - item.baseline == 0 } - .sort_by { |item| item.current - item.baseline } - .reverse.each_slice(columns) do |skills| - output = skills.map { |skill| format_skill_data(skill, learning_time) }.join - respond(output) - end - exit - else - DRSkill.list - .select { |item| @skills_to_show.include?(item.name) } - .select { |item| item.current - item.baseline > 0 } - .sort_by { |item| item.current - item.baseline } - .reverse.each_slice(columns) do |skills| - output = skills.map { |skill| format_skill_data(skill, learning_time) }.join - respond(output) - end + DRSkill.list + .select { |item| @skills_to_show.include?(item.name) } + .sort_by { |item| item.current - item.baseline } + .reverse.each_slice(columns) do |skills| + output = skills.map { |skill| format_skill_data(skill, learning_time) }.join + respond(output) end total = DRSkill.list