From dcbb8efcde93af6452af77fea6b1038784db477e Mon Sep 17 00:00:00 2001 From: David Gay Date: Mon, 31 May 2021 16:51:47 -0400 Subject: Character resting --- app/controllers/application_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/controllers/application_controller.rb') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 0fc78a8..f28d30b 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -17,6 +17,10 @@ class ApplicationController < ActionController::Base private def start_activity(activity) + if current_char.resting? + 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]) redirect_to look_path else -- cgit v1.2.3