mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Cached MapInfos.rxdata and map_connections.dat, reduced usage of load_data
This commit is contained in:
@@ -422,7 +422,7 @@ class SpriteWindow_DebugRoamers < Window_DrawableCommand
|
||||
# roaming
|
||||
curmap = $PokemonGlobal.roamPosition[index]
|
||||
if curmap
|
||||
mapinfos = load_data("Data/MapInfos.rxdata")
|
||||
mapinfos = pbLoadMapInfos
|
||||
status = "[ROAMING][#{curmap}: #{mapinfos[curmap].name}]"
|
||||
else
|
||||
status = "[ROAMING][map not set]"
|
||||
@@ -771,7 +771,7 @@ end
|
||||
def pbDebugFixInvalidTiles
|
||||
num_errors = 0
|
||||
num_error_maps = 0
|
||||
@tilesets = load_data("Data/Tilesets.rxdata")
|
||||
@tilesets = $data_tilesets
|
||||
mapData = MapData.new
|
||||
t = Time.now.to_i
|
||||
Graphics.update
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Main editor method for editing wild encounters. Lists all defined encounter
|
||||
# sets, and edits them.
|
||||
def pbEncountersEditor
|
||||
map_infos = load_data("Data/MapInfos.rxdata")
|
||||
map_infos = pbLoadMapInfos
|
||||
commands = []
|
||||
maps = []
|
||||
list = pbListWindow([])
|
||||
@@ -122,7 +122,7 @@ end
|
||||
# Lists the map ID, version number and defined encounter types for the given
|
||||
# encounter data (a GameData::Encounter instance), and edits them.
|
||||
def pbEncounterMapVersionEditor(enc_data)
|
||||
map_infos = load_data("Data/MapInfos.rxdata")
|
||||
map_infos = pbLoadMapInfos
|
||||
commands = []
|
||||
enc_types = []
|
||||
list = pbListWindow([])
|
||||
@@ -720,7 +720,7 @@ def pbMetadataScreen(map_id = 0)
|
||||
end
|
||||
|
||||
def pbEditMetadata(map_id = 0)
|
||||
mapinfos = load_data("Data/MapInfos.rxdata")
|
||||
mapinfos = pbLoadMapInfos
|
||||
data = []
|
||||
if map_id == 0 # Global metadata
|
||||
map_name = _INTL("Global Metadata")
|
||||
|
||||
@@ -59,7 +59,7 @@ def pbAllocateAnimation(animations,name)
|
||||
end
|
||||
|
||||
def pbMapTree
|
||||
mapinfos = load_data("Data/MapInfos.rxdata")
|
||||
mapinfos = pbLoadMapInfos
|
||||
maplevels = []
|
||||
retarray = []
|
||||
for i in mapinfos.keys
|
||||
|
||||
@@ -285,6 +285,7 @@ class MapScreenScene
|
||||
def serializeConnectionData
|
||||
conndata=generateConnectionData()
|
||||
save_data(conndata, "Data/map_connections.dat")
|
||||
$PokemonTemp.mapConnections = nil
|
||||
Compiler.write_connections
|
||||
@mapconns=conndata
|
||||
end
|
||||
@@ -330,7 +331,7 @@ class MapScreenScene
|
||||
@sprites["title"] = Window_UnformattedTextPokemon.newWithSize(_INTL("F: Help"),
|
||||
0, 600 - 64, 800, 64, @viewport)
|
||||
@sprites["title"].z = 2
|
||||
@mapinfos=load_data("Data/MapInfos.rxdata")
|
||||
@mapinfos=pbLoadMapInfos
|
||||
conns=MapFactoryHelper.getMapConnections
|
||||
@mapconns=[]
|
||||
for c in conns
|
||||
|
||||
Reference in New Issue
Block a user