summaryrefslogtreecommitdiff
path: root/app/controllers/characters/items_controller.rb
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2021-05-28 11:26:44 -0400
committerDavid Gay <david@davidgay.org>2021-05-28 11:26:54 -0400
commit5ae89950fb330fd623634b98a77de259ab174b53 (patch)
tree3ec11fae10758379761f5b824586b1c22bc57c12 /app/controllers/characters/items_controller.rb
parentc522bc8efa0378e0fcbcfdd137d6cd2ae4010d5b (diff)
Lockbox unlocking, and with it items that start activities when used
Diffstat (limited to 'app/controllers/characters/items_controller.rb')
-rw-r--r--app/controllers/characters/items_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/characters/items_controller.rb b/app/controllers/characters/items_controller.rb
index e1dfd5c..93dc683 100644
--- a/app/controllers/characters/items_controller.rb
+++ b/app/controllers/characters/items_controller.rb
@@ -45,6 +45,8 @@ class Characters::ItemsController < ApplicationController
heal_or_gain = wounds_change.positive? ? "gain" : "heal"
flash[:notice] += " You #{heal_or_gain} #{wounds_change.abs} wound(s)."
end
+ when "activity"
+ start_activity(Activity.find_by_gid(effect[:gid])) and return
else
raise "Invalid use effect type string (#{effect[:type]})"
end