summaryrefslogtreecommitdiff
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2021-05-31 18:41:28 -0400
committerDavid Gay <david@davidgay.org>2021-05-31 18:41:28 -0400
commit751ff05874d0e97cbdfc2f16f45f72f5ab6d165b (patch)
tree407aa889ce05a93a92ca31896e8f2682ed0376ba /app/controllers/application_controller.rb
parent3b7fe3bbfdb09b4f8040e2c51aa18f31ff0b2a56 (diff)
Allow choosing how many items you'd like to craft at hearth amenities
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index f28d30b..7a59299 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -21,7 +21,8 @@ class ApplicationController < ActionController::Base
flash[:alert] = "You can't do anything while you're resting. Go to the Character page to stop resting."
redirect_to character_path(current_char) and return
end
- if current_char.start_activity(activity, queued_actions: params[:queued_actions])
+ queued_actions = params[:actions].present? ? params[:actions].to_i - 1 : nil
+ if current_char.start_activity(activity, queued_actions: queued_actions)
redirect_to look_path
else
message = "You can't do that."