mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-05 16:49:04 +00:00
Format.
This commit is contained in:
@@ -20,6 +20,7 @@ class Bone
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# An action where a bone in a player's inventory is buried.
|
# An action where a bone in a player's inventory is buried.
|
||||||
class BuryBoneAction < Action
|
class BuryBoneAction < Action
|
||||||
|
|
||||||
@@ -27,6 +28,7 @@ class BuryBoneAction < Action
|
|||||||
super(2, false, mob)
|
super(2, false, mob)
|
||||||
@slot = slot
|
@slot = slot
|
||||||
@bone = bone
|
@bone = bone
|
||||||
|
|
||||||
mob.play_animation(Animation.new(BURY_BONE_ANIMATION))
|
mob.play_animation(Animation.new(BURY_BONE_ANIMATION))
|
||||||
mob.send_message('You dig a hole in the ground...')
|
mob.send_message('You dig a hole in the ground...')
|
||||||
end
|
end
|
||||||
@@ -42,7 +44,7 @@ class BuryBoneAction < Action
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Intercepts the item option event,
|
# Intercepts the first item option event,
|
||||||
on :event, :item_option do |ctx, player, event|
|
on :event, :item_option do |ctx, player, event|
|
||||||
if event.option == 1
|
if event.option == 1
|
||||||
bone = BONES[event.id]
|
bone = BONES[event.id]
|
||||||
@@ -57,6 +59,7 @@ end
|
|||||||
def append_bone(hash)
|
def append_bone(hash)
|
||||||
raise 'Hash must contain an id and an experience value.' unless hash.has_key?(:id) && hash.has_key?(:experience)
|
raise 'Hash must contain an id and an experience value.' unless hash.has_key?(:id) && hash.has_key?(:experience)
|
||||||
name = hash[:name], id = hash[:id], experience = hash[:experience]
|
name = hash[:name], id = hash[:id], experience = hash[:experience]
|
||||||
|
|
||||||
BONES[id] = Bone.new(name, id, experience)
|
BONES[id] = Bone.new(name, id, experience)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user