mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-12-06 03:07:19 +00:00
Add support for specifying the option for events in the declaration (where applicable).
This commit is contained in:
1 parent
a863d8ea71
commit
22f712da23
9 files changed
+89
-96
No files matched your search
@@ -141,22 +141,18 @@ class ProspectingAction < DistancedAction
|
||||
end
|
||||
end
|
||||
|
||||
on :event, :object_action do |ctx, mob, event|
|
||||
if event.option == 1
|
||||
ore = ORES[event.id]
|
||||
if ore != nil
|
||||
mob.start_action(MiningAction.new(mob, event.position, ore))
|
||||
end
|
||||
on :event, :first_object_action do |ctx, mob, event|
|
||||
ore = ORES[event.id]
|
||||
if ore != nil
|
||||
mob.start_action(MiningAction.new(mob, event.position, ore))
|
||||
end
|
||||
end
|
||||
|
||||
on :event, :object_action do |ctx, mob, event|
|
||||
if event.option == 2
|
||||
ore = ORES[event.id]
|
||||
if ore != nil
|
||||
mob.start_action(ProspectingAction.new(mob, event.position, ore))
|
||||
elsif EXPIRED_ORES[event.id] != nil
|
||||
mob.start_action(ExpiredProspectingAction.new(mob, event.position))
|
||||
end
|
||||
on :event, :second_object_action do |ctx, mob, event|
|
||||
ore = ORES[event.id]
|
||||
if ore != nil
|
||||
mob.start_action(ProspectingAction.new(mob, event.position, ore))
|
||||
elsif EXPIRED_ORES[event.id] != nil
|
||||
mob.start_action(ExpiredProspectingAction.new(mob, event.position))
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user