mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Yet more Rubocopping
This commit is contained in:
@@ -38,7 +38,7 @@ module Game
|
||||
# Called when starting a new game. Initializes global variables
|
||||
# and transfers the player into the map scene.
|
||||
def self.start_new
|
||||
if $game_map && $game_map.events
|
||||
if $game_map&.events
|
||||
$game_map.events.each_value { |event| event.clear_starting }
|
||||
end
|
||||
$game_temp.common_event_id = 0 if $game_temp
|
||||
|
||||
@@ -61,8 +61,8 @@ class Scene_Map
|
||||
pbBGMFade(0.8)
|
||||
end
|
||||
end
|
||||
if playingBGS && map.autoplay_bgs
|
||||
pbBGMFade(0.8) if playingBGS.name != map.bgs.name
|
||||
if playingBGS && map.autoplay_bgs && playingBGS.name != map.bgs.name
|
||||
pbBGMFade(0.8)
|
||||
end
|
||||
Graphics.frame_reset
|
||||
end
|
||||
@@ -145,12 +145,12 @@ class Scene_Map
|
||||
end
|
||||
keys = @spritesets.keys.clone
|
||||
keys.each do |i|
|
||||
if !$map_factory.hasMap?(i)
|
||||
@spritesets[i].dispose if @spritesets[i]
|
||||
if $map_factory.hasMap?(i)
|
||||
@spritesets[i].update
|
||||
else
|
||||
@spritesets[i]&.dispose
|
||||
@spritesets[i] = nil
|
||||
@spritesets.delete(i)
|
||||
else
|
||||
@spritesets[i].update
|
||||
end
|
||||
end
|
||||
@spritesetGlobal.update
|
||||
|
||||
@@ -304,7 +304,7 @@ class Interpreter
|
||||
def pbEraseThisEvent
|
||||
if $game_map.events[@event_id]
|
||||
$game_map.events[@event_id].erase
|
||||
$PokemonMap.addErasedEvent(@event_id) if $PokemonMap
|
||||
$PokemonMap&.addErasedEvent(@event_id)
|
||||
end
|
||||
@index += 1
|
||||
return true
|
||||
@@ -407,7 +407,7 @@ class Interpreter
|
||||
when 6 then event.move_right
|
||||
when 8 then event.move_up
|
||||
end
|
||||
$PokemonMap.addMovedEvent(@event_id) if $PokemonMap
|
||||
$PokemonMap&.addMovedEvent(@event_id)
|
||||
if old_x != event.x || old_y != event.y
|
||||
$game_player.lock
|
||||
loop do
|
||||
@@ -443,7 +443,7 @@ class Interpreter
|
||||
def pbTrainerEnd
|
||||
pbGlobalUnlock
|
||||
event = get_self
|
||||
event.erase_route if event
|
||||
event&.erase_route
|
||||
end
|
||||
|
||||
def setPrice(item, buy_price = -1, sell_price = -1)
|
||||
|
||||
@@ -414,8 +414,8 @@ class Interpreter
|
||||
#-----------------------------------------------------------------------------
|
||||
def command_116
|
||||
if @event_id > 0
|
||||
$game_map.events[@event_id].erase if $game_map.events[@event_id]
|
||||
$PokemonMap.addErasedEvent(@event_id) if $PokemonMap
|
||||
$game_map.events[@event_id]&.erase
|
||||
$PokemonMap&.addErasedEvent(@event_id)
|
||||
end
|
||||
@index += 1
|
||||
return false
|
||||
@@ -512,10 +512,10 @@ class Interpreter
|
||||
next if $game_variables[i] == value
|
||||
$game_variables[i] = value
|
||||
when 1 # add
|
||||
next if $game_variables[i] >= 99999999
|
||||
next if $game_variables[i] >= 99_999_999
|
||||
$game_variables[i] += value
|
||||
when 2 # subtract
|
||||
next if $game_variables[i] <= -99999999
|
||||
next if $game_variables[i] <= -99_999_999
|
||||
$game_variables[i] -= value
|
||||
when 3 # multiply
|
||||
next if value == 1
|
||||
@@ -527,8 +527,8 @@ class Interpreter
|
||||
next if [0, 1].include?(value)
|
||||
$game_variables[i] %= value
|
||||
end
|
||||
$game_variables[i] = 99999999 if $game_variables[i] > 99999999
|
||||
$game_variables[i] = -99999999 if $game_variables[i] < -99999999
|
||||
$game_variables[i] = 99_999_999 if $game_variables[i] > 99_999_999
|
||||
$game_variables[i] = -99_999_999 if $game_variables[i] < -99_999_999
|
||||
$game_map.need_refresh = true
|
||||
end
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user