Fixes step autosave saving multiple times on same step

This commit is contained in:
infinitefusion
2022-06-07 20:05:57 -04:00
parent 89607cd930
commit 9a215a0947
17 changed files with 3 additions and 31 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.

Binary file not shown.

Binary file not shown.

View File

@@ -18,7 +18,9 @@ def pbSetPokemonCenter
end
def Kernel.Autosave
#showSaveIcon()
pbSave(false)
#hideSaveIcon()
end
@@ -32,6 +34,7 @@ if AUTOSAVE_STEPS_SWITCH
if stepsNum > 0 && !$PokemonGlobal.sliding
return if $PokemonGlobal.stepcount < 100
if $PokemonGlobal.stepcount % stepsNum == 0
$PokemonGlobal.stepcount+=1
Kernel.tryAutosave()
end
end

View File

@@ -219,22 +219,6 @@ ItemHandlers::UseFromBag.add(:LANTERN, proc { |item|
next true
})
ItemHandlers::UseFromBag.add(:AZUREFLUTE, proc { |item|
if Kernel.pbConfirmMessage(_INTL("Play the Azure Flute?"))
Kernel.pbMessage(_INTL("You blew into the Azure Flute."))
if $game_map.map_id == 694
Kernel.pbMessage(_INTL("A strange sound echoed from the sky..."))
$game_switches[469] = true
next true
else
Kernel.pbMessage(_INTL("But nothing happened..."))
next false
end
#Kernel.pbMessage(_INTL("{1} was transported somewhere...",$Trainer.name))
#Kernel.pbTransfer(376,14,51)
end
return false
})
ItemHandlers::UseOnPokemon.add(:TRANSGENDERSTONE, proc { |item, pokemon, scene|
if pokemon.gender == 0
@@ -1041,22 +1025,7 @@ ItemHandlers::UseOnPokemon.add(:GOLDENBANANA, proc { |item, pokemon, scene|
next pbHPItem(pokemon, 50, scene)
})
ItemHandlers::UseFromBag.add(:AZUREFLUTE, proc { |item|
if Kernel.pbConfirmMessage(_INTL("Play the Azure Flute?"))
Kernel.pbMessage(_INTL("You blew into the Azure Flute."))
if pbGet(222) >= 30 #if very good karma
Kernel.pbMessage(_INTL("A strange sound echoed from the sky..."))
Kernel.pbMessage(_INTL("{1} was transported somewhere...", $Trainer.name))
Kernel.pbTransfer(376, 14, 51)
next true
else
Kernel.pbMessage(_INTL("But nothing happened..."))
next false
end
end
return false
})
ItemHandlers::UseOnPokemon.add(:TRANSGENDERSTONE, proc { |item, pokemon, scene|
if pokemon.gender == 0

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.