Rebase the MessageHandler, MessageHandlerChain and MessageHandlerChainSet

Rebased several other pieces of code
This commit is contained in:
atomicint
2015-03-29 12:52:55 -04:00
parent 7f345fffac
commit 654a1a6dfd
71 changed files with 452 additions and 457 deletions
+2 -2
View File
@@ -51,11 +51,11 @@ class BuryBoneAction < Action
end
# Intercepts the first item option message.
on :message, :first_item_option do |ctx, player, message|
on :message, :first_item_option do |player, message|
bone = BONES[message.id]
unless bone == nil
player.start_action(BuryBoneAction.new(player, message.slot, bone))
ctx.break_handler_chain
message.terminate
end
end
+1 -1
View File
@@ -9,7 +9,7 @@ declare_attribute(:active_prayer, -1, :persistent)
PRAYERS = {}
# Intercept the ButtonMessage to toggle a prayer.
on :message, :button do |ctx, player, message|
on :message, :button do |player, message|
button = message.widget_id
prayer = PRAYERS[button]