mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-05 16:49:04 +00:00
Update all plugins to conform to Rubocop.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
|
||||
java_import 'org.apollo.game.action.DistancedAction'
|
||||
|
||||
# A distanced action which opens a door.
|
||||
@@ -13,20 +14,20 @@ class OpenDoorAction < DistancedAction
|
||||
|
||||
def executeAction
|
||||
mob.turn_to(@door.position)
|
||||
DoorUtil::toggle(@door)
|
||||
DoorUtil.toggle(@door)
|
||||
stop
|
||||
end
|
||||
|
||||
def equals(other)
|
||||
return (get_class == other.get_class && @door == other.door)
|
||||
get_class == other.get_class && @door == other.door
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# MessageListener for opening and closing doors.
|
||||
on :message, :first_object_action do |player, message|
|
||||
if DoorUtil::is_door?(message.id)
|
||||
door = DoorUtil::get_door_object(message.position, message.id)
|
||||
if DoorUtil.door?(message.id)
|
||||
door = DoorUtil.get_door_object(message.position, message.id)
|
||||
player.start_action(OpenDoorAction.new(player, door)) unless door.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user