Update all plugins to conform to Rubocop.

This commit is contained in:
Major-
2015-08-27 18:17:58 +01:00
parent 424d2bda29
commit 8f3fd75b33
75 changed files with 1625 additions and 1537 deletions
+10 -9
View File
@@ -10,6 +10,7 @@ ANIMATION_PULSES = 0
LEVEL_THRESHOLD = 8
EXP_PER_HIT = 5
# A DistancedAction for attacking a training dummy.
class DummyAction < DistancedAction
attr_reader :position
@@ -21,13 +22,7 @@ class DummyAction < DistancedAction
end
def executeAction
unless @started
@started = true
mob.send_message('You hit the dummy.', true)
mob.turn_to(position)
mob.play_animation(PUNCH_ANIMATION)
else
if @started
skills = mob.skill_set
if (skills.skill(ATTACK_SKILL_ID).maximum_level >= LEVEL_THRESHOLD)
@@ -37,14 +32,20 @@ class DummyAction < DistancedAction
end
stop
else
@started = true
mob.send_message('You hit the dummy.', true)
mob.turn_to(position)
mob.play_animation(PUNCH_ANIMATION)
end
end
def equals(other)
return (get_class == other.get_class and @position == other.position)
get_class == other.get_class && @position == other.position
end
end
on :message, :second_object_action do |player, message|
player.start_action(DummyAction.new(player, message.position)) if message.id == DUMMY_ID
end
end