steps autosave fix

This commit is contained in:
infinitefusion
2022-07-21 12:18:24 -04:00
parent 686b176462
commit 6663246710
14 changed files with 12 additions and 11 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -29,18 +29,19 @@ def Kernel.tryAutosave()
Kernel.Autosave if $game_switches[AUTOSAVE_ENABLED_SWITCH] Kernel.Autosave if $game_switches[AUTOSAVE_ENABLED_SWITCH]
end end
if AUTOSAVE_STEPS_SWITCH Events.onMapUpdate += proc { |sender, e|
Events.onMapUpdate+=proc {|sender,e| next if !$game_switches
stepsNum = pbGet(AUTOSAVE_STEPS_VAR) next if !$game_switches[AUTOSAVE_STEPS_SWITCH]
if stepsNum > 0 && !$PokemonGlobal.sliding stepsNum = pbGet(AUTOSAVE_STEPS_VAR)
return if $PokemonGlobal.stepcount < 100 if stepsNum > 0 && !$PokemonGlobal.sliding
if $PokemonGlobal.stepcount % stepsNum == 0 return if $PokemonGlobal.stepcount < 100
$PokemonGlobal.stepcount+=1 if $PokemonGlobal.stepcount % stepsNum == 0
Kernel.tryAutosave() $PokemonGlobal.stepcount += 1
end Kernel.tryAutosave()
end end
} end
end }
class AutosaveOptionsScene < PokemonOption_Scene class AutosaveOptionsScene < PokemonOption_Scene

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.