From 7f129f24e351cafafdb4bc58a44ca0d714e30af6 Mon Sep 17 00:00:00 2001 From: David Gay Date: Thu, 3 Jun 2021 20:50:58 -0400 Subject: Move timer and results to new game containers which are always visible --- app/views/look/_results.html.erb | 32 -------------------------------- app/views/look/_timer.html.erb | 18 ------------------ app/views/look/show.html.erb | 8 -------- 3 files changed, 58 deletions(-) delete mode 100644 app/views/look/_results.html.erb delete mode 100644 app/views/look/_timer.html.erb (limited to 'app/views/look') diff --git a/app/views/look/_results.html.erb b/app/views/look/_results.html.erb deleted file mode 100644 index 1da0af7..0000000 --- a/app/views/look/_results.html.erb +++ /dev/null @@ -1,32 +0,0 @@ -
- <% results.each do |result| %> - <% case result[:type] %> - <% when "item" %> -

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

- <% when "hearth_amenity" %> -

You constructed <%= result[:hearth_amenity].name %>.

- <% when "hearth_planting" %> -

You planted <%= link_to result[:hearth_planting].item.name, - item_path(result[:hearth_planting].item) %> in the loam.

- <% when "activity" %> -

You realized how to <%= result[:activity].name %>!

- <% when "monster" %> -

You encountered a <%= result[:monster].name %>.

-

<%= result[:monster].description %>

- <% when "xp" %> -

You gained <%= result[:xp] %> <%= result[:skill].name %> XP.

- <% when "title" %> -

You earned the title <%= render "application/components/text/title", title: result[:title] %>!

- <% when "message" %> -

<%= result[:body] %>

- <% when "error" %> -

<%= result[:message] %>

- <% when "br" %> -
- <% end %> - <% end %> -
diff --git a/app/views/look/_timer.html.erb b/app/views/look/_timer.html.erb deleted file mode 100644 index 908689b..0000000 --- a/app/views/look/_timer.html.erb +++ /dev/null @@ -1,18 +0,0 @@ -<% if current_char.activity %> -
- -
- - <% most_recent_cs = current_char.character_skills.order(:updated_at).last %> -
-
<%= most_recent_cs.skill.name %> level <%= most_recent_cs.level %>
-
<%= most_recent_cs.xp_to_next_level %> XP to next level
-
- -
- <%= button_to "Stop", stop_activity_path %> -
-<% end %> diff --git a/app/views/look/show.html.erb b/app/views/look/show.html.erb index 2e0af81..4286944 100644 --- a/app/views/look/show.html.erb +++ b/app/views/look/show.html.erb @@ -1,14 +1,6 @@ <% if current_char.activity %>

<%= current_char.activity.name %>

<%= current_char.activity.description %>

- -
-
- -
- <%= render "timer" %> -
<% else %>

You're not currently doing anything. Maybe you'd like to <%= link_to "go somewhere", locations_path %>?

-- cgit v1.2.3