summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2021-05-19 19:04:13 -0400
committerDavid Gay <david@davidgay.org>2021-05-19 19:04:13 -0400
commit045867220ea68b912f74b74a1476ac08bd19dbfd (patch)
tree302e9740a54ad0b9147a6995db8ebd3409e2b9b3 /app/views
parent9fec79398a34d26be1042e35cae429b88f8b96d0 (diff)
More work on getting amenity construction working
Diffstat (limited to 'app/views')
-rw-r--r--app/views/activities/_results.html.erb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/views/activities/_results.html.erb b/app/views/activities/_results.html.erb
index ba2abe7..42f22a3 100644
--- a/app/views/activities/_results.html.erb
+++ b/app/views/activities/_results.html.erb
@@ -1,11 +1,16 @@
<div>
<% results.each do |result| %>
- <% if result[:type] == "item" %>
+ <% case result[:type] %>
+ <% when "item" %>
<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>
+ <% when "hearth_amenity" %>
+ <p>You constructed <%= result[:hearth_amenity].name %>.</p>
+ <% when "error" %>
+ <p><%= result[:message] %></p>
<% end %>
<% end %>
</div>