mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-22 14:26:01 +00:00
Applied most Rubocop-suggested layout fixes
This commit is contained in:
@@ -17,6 +17,7 @@ class Game_Screen
|
||||
attr_reader :weather_type # weather type
|
||||
attr_reader :weather_max # max number of weather sprites
|
||||
attr_accessor :weather_duration # ticks in which the weather should fade in
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# * Object Initialization
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
@@ -20,6 +20,7 @@ class Game_Picture
|
||||
attr_reader :blend_type # blend method
|
||||
attr_reader :tone # color tone
|
||||
attr_reader :angle # rotation angle
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# * Object Initialization
|
||||
# number : picture number
|
||||
|
||||
@@ -138,11 +138,11 @@ class Game_Map
|
||||
end
|
||||
|
||||
def valid?(x, y)
|
||||
return x>=0 && x<width && y>=0 && y<height
|
||||
return x >= 0 && x < width && y >= 0 && y < height
|
||||
end
|
||||
|
||||
def validLax?(x, y)
|
||||
return x>=-10 && x<=width+10 && y>=-10 && y<=height+10
|
||||
return x >= -10 && x <= width + 10 && y >= -10 && y <= height + 10
|
||||
end
|
||||
|
||||
def passable?(x, y, d, self_event = nil)
|
||||
|
||||
@@ -148,20 +148,20 @@ end
|
||||
class Game_Map
|
||||
def scroll_downright(distance)
|
||||
@display_x = [@display_x + distance,
|
||||
(self.width - Graphics.width*1.0/TILE_WIDTH) * REAL_RES_X].min
|
||||
(self.width - Graphics.width*1.0/TILE_WIDTH) * REAL_RES_X].min
|
||||
@display_y = [@display_y + distance,
|
||||
(self.height - Graphics.height*1.0/TILE_HEIGHT) * REAL_RES_Y].min
|
||||
(self.height - Graphics.height*1.0/TILE_HEIGHT) * REAL_RES_Y].min
|
||||
end
|
||||
|
||||
def scroll_downleft(distance)
|
||||
@display_x = [@display_x - distance, 0].max
|
||||
@display_y = [@display_y + distance,
|
||||
(self.height - Graphics.height*1.0/TILE_HEIGHT) * REAL_RES_Y].min
|
||||
(self.height - Graphics.height*1.0/TILE_HEIGHT) * REAL_RES_Y].min
|
||||
end
|
||||
|
||||
def scroll_upright(distance)
|
||||
@display_x = [@display_x + distance,
|
||||
(self.width - Graphics.width*1.0/TILE_WIDTH) * REAL_RES_X].min
|
||||
(self.width - Graphics.width*1.0/TILE_WIDTH) * REAL_RES_X].min
|
||||
@display_y = [@display_y - distance, 0].max
|
||||
end
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ class PokemonMapFactory
|
||||
# Check passability of tile
|
||||
if thisEvent.is_a?(Game_Player)
|
||||
return false unless ($DEBUG && Input.press?(Input::CTRL)) ||
|
||||
map.passable?(x, y, 0, thisEvent)
|
||||
map.passable?(x, y, 0, thisEvent)
|
||||
else
|
||||
return false unless map.passable?(x, y, 0, thisEvent)
|
||||
end
|
||||
|
||||
@@ -253,7 +253,7 @@ class Game_FollowerFactory
|
||||
if event.at_coordinate?($game_player.x, $game_player.y) # Underneath player
|
||||
next if !event.over_trigger?
|
||||
elsif facing_tile && event.map.map_id == facing_tile[0] &&
|
||||
event.at_coordinate?(facing_tile[1], facing_tile[2]) # On facing tile
|
||||
event.at_coordinate?(facing_tile[1], facing_tile[2]) # On facing tile
|
||||
next if event.over_trigger?
|
||||
else # Somewhere else
|
||||
next
|
||||
|
||||
Reference in New Issue
Block a user