More tweaks from the Rubocop overlord

This commit is contained in:
Maruno17
2021-12-19 17:28:59 +00:00
parent 33781493f4
commit 65b1a8d6c3
161 changed files with 2839 additions and 2967 deletions

View File

@@ -116,9 +116,9 @@ class PokemonRegionMap_Scene
@sprites["map2"].x = @sprites["map"].x
@sprites["map2"].y = @sprites["map"].y
end
pbDrawImagePositions(@sprites["map2"].bitmap, [
["Graphics/Pictures/#{graphic[4]}", graphic[2] * SQUARE_WIDTH, graphic[3] * SQUARE_HEIGHT]
])
pbDrawImagePositions(
@sprites["map2"].bitmap,
[["Graphics/Pictures/#{graphic[4]}", graphic[2] * SQUARE_WIDTH, graphic[3] * SQUARE_HEIGHT]])
end
@sprites["mapbottom"] = MapBottomSprite.new(@viewport)
@sprites["mapbottom"].mapname = pbGetMessage(MessageTypes::RegionNames, mapindex)
@@ -163,11 +163,11 @@ class PokemonRegionMap_Scene
end
def point_x_to_screen_x(x)
return -SQUARE_WIDTH / 2 + (x * SQUARE_WIDTH) + (Graphics.width - @sprites["map"].bitmap.width) / 2
return (-SQUARE_WIDTH / 2) + (x * SQUARE_WIDTH) + ((Graphics.width - @sprites["map"].bitmap.width) / 2)
end
def point_y_to_screen_y(y)
return -SQUARE_HEIGHT / 2 + (y * SQUARE_HEIGHT) + (Graphics.height - @sprites["map"].bitmap.height) / 2
return (-SQUARE_HEIGHT / 2) + (y * SQUARE_HEIGHT) + ((Graphics.height - @sprites["map"].bitmap.height) / 2)
end
def location_shown?(point)
@@ -248,9 +248,9 @@ class PokemonRegionMap_Scene
return if @fly_map || !Settings::CAN_FLY_FROM_TOWN_MAP || !pbCanFly?
@sprites["help"].bitmap.clear
text = (@mode == 0) ? _INTL("ACTION: Fly") : _INTL("ACTION: Cancel Fly")
pbDrawTextPositions(@sprites["help"].bitmap, [
[text, Graphics.width - 16, -8, 1, Color.new(248, 248, 248), Color.new(0, 0, 0)]
])
pbDrawTextPositions(
@sprites["help"].bitmap,
[[text, Graphics.width - 16, -8, 1, Color.new(248, 248, 248), Color.new(0, 0, 0)]])
@sprites.each do |key, sprite|
next if !key.include?("point")
sprite.visible = (@mode == 1)