From a32e05fea88fa4d9b9072f5a7e25189c99b16b9d Mon Sep 17 00:00:00 2001 From: David Gay Date: Tue, 4 May 2021 18:32:33 -0400 Subject: Get XP awards working --- app/views/activities/_results.html.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/views') 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 @@
<% results.each do |result| %> <% if result[:type] == "item" %> -

You got <%= result[:quantity] %> <%= result[:item].name %>.

+

You got <%= result[:quantity] %> <%= result[:item].name %> + <% if result[:xp].any? %> + (<%= result[:xp].map { |award| "#{award[:amount]} xp #{award[:skill].name}" }.join(", ") %>) + <% end %> +

<% end %> <% end %>
-- cgit v1.2.3