mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
steps autosave fix
This commit is contained in:
@@ -29,18 +29,19 @@ def Kernel.tryAutosave()
|
||||
Kernel.Autosave if $game_switches[AUTOSAVE_ENABLED_SWITCH]
|
||||
end
|
||||
|
||||
if AUTOSAVE_STEPS_SWITCH
|
||||
Events.onMapUpdate+=proc {|sender,e|
|
||||
stepsNum = pbGet(AUTOSAVE_STEPS_VAR)
|
||||
if stepsNum > 0 && !$PokemonGlobal.sliding
|
||||
return if $PokemonGlobal.stepcount < 100
|
||||
if $PokemonGlobal.stepcount % stepsNum == 0
|
||||
$PokemonGlobal.stepcount+=1
|
||||
Kernel.tryAutosave()
|
||||
end
|
||||
Events.onMapUpdate += proc { |sender, e|
|
||||
next if !$game_switches
|
||||
next if !$game_switches[AUTOSAVE_STEPS_SWITCH]
|
||||
stepsNum = pbGet(AUTOSAVE_STEPS_VAR)
|
||||
if stepsNum > 0 && !$PokemonGlobal.sliding
|
||||
return if $PokemonGlobal.stepcount < 100
|
||||
if $PokemonGlobal.stepcount % stepsNum == 0
|
||||
$PokemonGlobal.stepcount += 1
|
||||
Kernel.tryAutosave()
|
||||
end
|
||||
}
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
|
||||
class AutosaveOptionsScene < PokemonOption_Scene
|
||||
|
||||
Reference in New Issue
Block a user