mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Added ESSENTIALS_VERSION to the save file (with backwards compatibility)
This commit is contained in:
@@ -356,6 +356,7 @@ class PokemonLoadScreen
|
||||
metadata = Marshal.load(f)
|
||||
$PokemonBag = Marshal.load(f)
|
||||
$PokemonStorage = Marshal.load(f)
|
||||
$SaveVersion = Marshal.load(f) unless f.eof?
|
||||
pbRefreshResizeFactor # To fix Game_Screen pictures
|
||||
magicNumberMatches = false
|
||||
if $data_system.respond_to?("magic_number")
|
||||
@@ -456,12 +457,12 @@ class PokemonLoadScreen
|
||||
savedata = []
|
||||
if safeExists?(savefile)
|
||||
File.open(savefile,"rb") { |f|
|
||||
15.times { savedata.push(Marshal.load(f)) }
|
||||
16.times { savedata.push(Marshal.load(f)) }
|
||||
}
|
||||
savedata[3]=$PokemonSystem
|
||||
begin
|
||||
File.open(RTP.getSaveFileName("Game.rxdata"),"wb") { |f|
|
||||
15.times { |i| Marshal.dump(savedata[i],f) }
|
||||
16.times { |i| Marshal.dump(savedata[i],f) }
|
||||
}
|
||||
rescue
|
||||
end
|
||||
|
||||
@@ -24,6 +24,7 @@ def pbSave(safesave=false)
|
||||
Marshal.dump($PokemonMap,f)
|
||||
Marshal.dump($PokemonBag,f)
|
||||
Marshal.dump($PokemonStorage,f)
|
||||
Marshal.dump(ESSENTIALS_VERSION,f)
|
||||
}
|
||||
Graphics.frame_reset
|
||||
rescue
|
||||
|
||||
Reference in New Issue
Block a user