summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2021-05-26 19:58:40 -0400
committerDavid Gay <david@davidgay.org>2021-05-26 19:58:40 -0400
commit920b9a66eb2d7e7810c16f1d9b70d65a19736487 (patch)
treeac1f0e93c55b9d93baf3bdec85f83436ee2bd8c1 /app/controllers
parent502ce07cc521802920ca26ebc7eadab6c119bebd (diff)
Stop activity on `ItemQuantityError` or `TooManyWoundsError`
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/game_controller.rb2
1 files changed, 2 insertions, 0 deletions
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