Add support for specifying the option for events in the declaration (where applicable).

This commit is contained in:
Major-
2014-08-08 02:00:01 +01:00
parent a863d8ea71
commit 22f712da23
9 changed files with 89 additions and 96 deletions
+5 -7
View File
@@ -43,13 +43,11 @@ class BuryBoneAction < Action
end
# Intercepts the first item option event,
on :event, :item_option do |ctx, player, event|
if event.option == 1
bone = BONES[event.id]
unless bone == nil
player.start_action(BuryBoneAction.new(player, event.slot, bone))
ctx.break_handler_chain
end
on :event, :first_item_option do |ctx, player, event|
bone = BONES[event.id]
unless bone == nil
player.start_action(BuryBoneAction.new(player, event.slot, bone))
ctx.break_handler_chain
end
end