diff options
author | David Gay <david@davidgay.org> | 2021-05-04 18:32:33 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-05-04 18:32:33 -0400 |
commit | a32e05fea88fa4d9b9072f5a7e25189c99b16b9d (patch) | |
tree | 60b4f3cc3f77c91a0aa82c499d1c700d9ae7ab28 /app/views/activities | |
parent | 8e2f4d6f10a18a662880c0d4c1ee79fdb6a8b3f2 (diff) |
Get XP awards working
Diffstat (limited to 'app/views/activities')
-rw-r--r-- | app/views/activities/_results.html.erb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/views/activities/_results.html.erb b/app/views/activities/_results.html.erb index baa4ab0..ba2abe7 100644 --- a/app/views/activities/_results.html.erb +++ b/app/views/activities/_results.html.erb @@ -1,7 +1,11 @@ <div> <% results.each do |result| %> <% if result[:type] == "item" %> - <p>You got <%= result[:quantity] %> <%= result[:item].name %>.</p> + <p>You got <%= result[:quantity] %> <%= result[:item].name %> + <% if result[:xp].any? %> + (<%= result[:xp].map { |award| "#{award[:amount]} xp #{award[:skill].name}" }.join(", ") %>) + <% end %> + </p> <% end %> <% end %> </div> |