diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/activities_controller.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/activities_controller.rb b/app/controllers/activities_controller.rb index 43ee1b0..37403c7 100644 --- a/app/controllers/activities_controller.rb +++ b/app/controllers/activities_controller.rb @@ -8,8 +8,11 @@ class ActivitiesController < ApplicationController if current_char.start_activity(@activity, queued_actions: params[:queued_actions]) redirect_to activity_path(@activity) else - flash[:alert] = "You can't do that. Make sure you have the items and meet the requirements." - redirect_to character_path(current_char) + message = "You can't do that." + message += " (requires #{@activity.requirements&.join(", ")})" if @activity.requirements + message += " (costs #{@activity.costs&.join(", ")})" if @activity.costs + flash[:alert] = message + redirect_back(fallback_location: character_path(current_char)) end end end |