mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Fix event command "Return to Title Screen" (#124)
Fix loading a game after event command "Return to Title Screen" starting a loop.
This commit is contained in:
@@ -75,6 +75,11 @@ module SaveData
|
|||||||
return @loaded
|
return @loaded
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Marks value as unloaded.
|
||||||
|
def mark_as_unloaded
|
||||||
|
@loaded = false
|
||||||
|
end
|
||||||
|
|
||||||
# Uses the {#from_old_format} proc to select the correct data from
|
# Uses the {#from_old_format} proc to select the correct data from
|
||||||
# +old_format+ and return it.
|
# +old_format+ and return it.
|
||||||
# Returns nil if the proc is undefined.
|
# Returns nil if the proc is undefined.
|
||||||
@@ -221,6 +226,13 @@ module SaveData
|
|||||||
load_values(save_data) { |value| !value.loaded? }
|
load_values(save_data) { |value| !value.loaded? }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Marks all values that aren't loaded on bootup as unloaded.
|
||||||
|
def self.mark_values_as_unloaded
|
||||||
|
@values.each do |value|
|
||||||
|
value.mark_as_unloaded unless value.load_in_bootup?
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# Loads each value from the given save data that has
|
# Loads each value from the given save data that has
|
||||||
# been set to be loaded during bootup. Done when a save file exists.
|
# been set to be loaded during bootup. Done when a save file exists.
|
||||||
# @param save_data [Hash] save data to load
|
# @param save_data [Hash] save data to load
|
||||||
|
|||||||
@@ -164,6 +164,8 @@ class Scene_Map
|
|||||||
end
|
end
|
||||||
updateSpritesets
|
updateSpritesets
|
||||||
if $game_temp.to_title
|
if $game_temp.to_title
|
||||||
|
$game_temp.to_title = false
|
||||||
|
SaveData.mark_values_as_unloaded
|
||||||
$scene = pbCallTitle
|
$scene = pbCallTitle
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user