mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-12-06 03:07:19 +00:00
Fix mining.
This commit is contained in:
1 parent
0cbf94c20a
commit
1bb7b37aaa
1 file changed
+4
-4
@@ -22,7 +22,7 @@ class MiningAction < DistancedAction
|
||||
def find_pickaxe
|
||||
PICKAXE_IDS.each do |id|
|
||||
weapon = mob.equipment.get(EquipmentConstants::WEAPON)
|
||||
if weapon.id == id
|
||||
if weapon != nil && weapon.id == id
|
||||
return PICKAXES[id]
|
||||
end
|
||||
|
||||
@@ -73,7 +73,7 @@ class MiningAction < DistancedAction
|
||||
|
||||
if mob.inventory.add(ore.id)
|
||||
ore_def = ItemDefinition.lookup(@ore.id) # TODO: split off into some method
|
||||
name = ore_def.name.sub(/ ore$/, "").downcase
|
||||
name = ore_def.name.sub(/ ore$/, '').downcase
|
||||
|
||||
mob.send_message("You manage to mine some #{name}.")
|
||||
skills.add_experience(MINING_SKILL_ID, ore.exp)
|
||||
@@ -124,11 +124,11 @@ class ProspectingAction < DistancedAction
|
||||
if not @started
|
||||
@started = true
|
||||
|
||||
mob.send_message("You examine the rock for ores...")
|
||||
mob.send_message('You examine the rock for ores...')
|
||||
mob.turn_to(@position)
|
||||
else
|
||||
ore_def = ItemDefinition.lookup(@ore.id)
|
||||
name = ore_def.name.sub(/ ore$/, "").downcase
|
||||
name = ore_def.name.sub(/ ore$/, '').downcase
|
||||
|
||||
mob.send_message("This rock contains #{name}.")
|
||||
|
||||
|
||||
Reference in new issue
Block a user