diff options
author | David Gay <david@davidgay.org> | 2021-07-07 19:01:43 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-07-07 19:01:43 -0400 |
commit | f1386cce19aabd4ad027e6f12be013de8e109493 (patch) | |
tree | d1de71e32dffbeb068dec14cdac95bb536675202 | |
parent | e63703a412ff146b028e68baa100837b58f0c200 (diff) |
Show current active skill(s) level and XPTNL based on activity requirements rather than on the last skill that gained XP
-rw-r--r-- | CHANGELOG.md | 3 | ||||
-rw-r--r-- | app/views/application/_timer.html.erb | 10 |
2 files changed, 10 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 366035d..29948d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,9 @@ All notable changes to this project will be documented in this file. ### UI - Number of actions remaining is now displayed below timer when a set amount of actions have been queued. +- Timer area text that shows active skill level and XPTNL now shows that info for every skill required by the current + activity, rather than determining what skill to show based on the skill that last gained XP. This means that you + no longer need to wait for an action to complete for it to update and show the correct skill. ## [0.1.12] - 2021-06-23 diff --git a/app/views/application/_timer.html.erb b/app/views/application/_timer.html.erb index a18e739..de82546 100644 --- a/app/views/application/_timer.html.erb +++ b/app/views/application/_timer.html.erb @@ -15,10 +15,14 @@ </div> </div> - <% most_recent_cs = current_char.character_skills.order(:updated_at).last %> + <% required_character_skills = current_char.activity.whatnot[:requirements]&.filter_map { |r| current_char.character_skills.find_by(skill: Skill.find_by_gid(r[:gid])) if r[:type] == "skill" } %> <div class="text-center text-sm"> - <div class="text-xs"><%= most_recent_cs.skill.name %> level <%= most_recent_cs.level %></div> - <div><%= most_recent_cs.xp_to_next_level %> XP to next level</div> + <% required_character_skills.each do |cs| %> + <div class="space-y-1"> + <div class="text-xs"><%= cs.skill.name %> level <%= cs.level %></div> + <div><%= cs.xp_to_next_level %> XP to next level</div> + </div> + <% end %> </div> <div class="text-center text-sm my-2"> |