From 920b9a66eb2d7e7810c16f1d9b70d65a19736487 Mon Sep 17 00:00:00 2001 From: David Gay Date: Wed, 26 May 2021 19:58:40 -0400 Subject: Stop activity on `ItemQuantityError` or `TooManyWoundsError` --- app/controllers/game_controller.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/controllers') diff --git a/app/controllers/game_controller.rb b/app/controllers/game_controller.rb index de9fcd6..4f1ca0f 100644 --- a/app/controllers/game_controller.rb +++ b/app/controllers/game_controller.rb @@ -116,8 +116,10 @@ class GameController < ApplicationController end end rescue ItemQuantityError + current_char.stop_activity @results.replace([{ type: "error", message: "You don't have enough items to complete this activity." }]) rescue TooManyWoundsError + current_char.stop_activity @results.replace([{ type: "error", message: "You can't fight in your condition. You'll have to heal a wound." }]) end -- cgit v1.2.3