mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 08:39:11 +00:00
Update all plugins to conform to Rubocop.
This commit is contained in:
@@ -5,30 +5,26 @@ java_import 'org.apollo.game.model.entity.Player'
|
||||
# Declare the tutorial island progress attribute.
|
||||
declare_attribute(:tutorial_island_progress, :not_started, :persistent)
|
||||
|
||||
|
||||
# The existing player class.
|
||||
class Player
|
||||
|
||||
# Returns whether or not this Player is currently on tutorial island.
|
||||
def in_tutorial_island
|
||||
x, y = self.position.x, self.position.y
|
||||
|
||||
return above_ground(x, y) || below_ground(x, y)
|
||||
x = position.x
|
||||
y = position.y
|
||||
above_ground(x, y) || below_ground(x, y)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
|
||||
|
||||
# Returns whether or not the specified coordinate pair is above ground on tutorial island.
|
||||
def above_ground(x, y)
|
||||
return (x >= 3053 && x <= 3156 && y >= 3056 && y <= 3136)
|
||||
x >= 3053 && x <= 3156 && y >= 3056 && y <= 3136
|
||||
end
|
||||
|
||||
|
||||
# Returns whether or not the specified coordinate pair is 'below' ground on tutorial island.
|
||||
def below_ground(x, y)
|
||||
return (x >= 3072 && x <= 3118 && y >= 9492 && y <= 9535)
|
||||
end
|
||||
x >= 3072 && x <= 3118 && y >= 9492 && y <= 9535
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user