diff options
author | David Gay <david@davidgay.org> | 2021-05-19 19:41:34 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-05-19 19:41:34 -0400 |
commit | 8323f7da46f48b17646f5e7d6b407e1a994d7a3f (patch) | |
tree | 6b34204e7a8f80a487aa9b43067cf5b6e807abaa /app/views/characters | |
parent | 38fff0e2d09f2954d747baf65ab555427ba653be (diff) |
Show constructed amenities and provide links for building new ones
Diffstat (limited to 'app/views/characters')
-rw-r--r-- | app/views/characters/hearth/index.html.erb | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/app/views/characters/hearth/index.html.erb b/app/views/characters/hearth/index.html.erb index f087ede..487bd46 100644 --- a/app/views/characters/hearth/index.html.erb +++ b/app/views/characters/hearth/index.html.erb @@ -1,7 +1,27 @@ <% foundation = @all_amenities.find_by_gid("foundation") %> -<h1 class="text-3xl">Hearth</h1> +<h1 class="text-3xl mb-2">Hearth</h1> <% if current_char.hearth.has_amenity?(foundation) %> + <p class="mb-2">Here is your hearth, your safe haven and stronghold against all that ravages and thrashes + in these realms. Amidst this great dream of planar chaos and destruction, you have built something. + </p> + + <ul class="my-4"> + <% @construct_activities.each do |activity| %> + <li><%= link_to activity.name, start_activity_path(activity), method: :post %> + (costs <%= activity.cost_string %>)</li> + <% end %> + </ul> + + <div class="grid grid-cols-2 gap-4"> + <% current_char.hearth.built_hearth_amenities.each do |bhi| %> + <div class="border-2 border-gray-800 rounded p-4"> + <h2 class="text-lg font-bold"><%= bhi.hearth_amenity.name %></h2> + <p>Level <%= bhi.level %></p> + <p><%= bhi.hearth_amenity.description %></p> + </div> + <% end %> + </div> <% else %> <p>You haven't built your hearth yet. First, you'll need to start with a foundation.</p> <% construct_activity = foundation.construct_activity(1) %> |