mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Undid caching of map_connections.dat as it was already cached
This commit is contained in:
@@ -416,7 +416,7 @@ module MapFactoryHelper
|
||||
def self.getMapConnections
|
||||
if !@@MapConnections
|
||||
@@MapConnections = []
|
||||
conns = pbLoadMapConnections
|
||||
conns = load_data("Data/map_connections.dat")
|
||||
for i in 0...conns.length
|
||||
conn = conns[i]
|
||||
v = getMapEdge(conn[0],conn[1])
|
||||
|
||||
@@ -9,7 +9,6 @@ class PokemonTemp
|
||||
attr_accessor :moveToAnim
|
||||
attr_accessor :battleAnims
|
||||
attr_accessor :mapInfos
|
||||
attr_accessor :mapConnections
|
||||
end
|
||||
|
||||
def pbClearData
|
||||
@@ -21,7 +20,6 @@ def pbClearData
|
||||
$PokemonTemp.moveToAnim = nil
|
||||
$PokemonTemp.battleAnims = nil
|
||||
$PokemonTemp.mapInfos = nil
|
||||
$PokemonTemp.mapConnections = nil
|
||||
end
|
||||
MapFactoryHelper.clear
|
||||
$PokemonEncounters.setup($game_map.map_id) if $game_map && $PokemonEncounters
|
||||
@@ -97,17 +95,6 @@ def pbLoadBattleAnimations
|
||||
return $PokemonTemp.battleAnims
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Method relating to map connections data.
|
||||
#===============================================================================
|
||||
def pbLoadMapConnections
|
||||
$PokemonTemp = PokemonTemp.new if !$PokemonTemp
|
||||
if !$PokemonTemp.mapConnections
|
||||
$PokemonTemp.mapConnections = load_data("Data/map_connections.dat") || []
|
||||
end
|
||||
return $PokemonTemp.mapConnections
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Method relating to map infos data.
|
||||
#===============================================================================
|
||||
|
||||
@@ -285,7 +285,6 @@ class MapScreenScene
|
||||
def serializeConnectionData
|
||||
conndata=generateConnectionData()
|
||||
save_data(conndata, "Data/map_connections.dat")
|
||||
$PokemonTemp.mapConnections = nil
|
||||
Compiler.write_connections
|
||||
@mapconns=conndata
|
||||
end
|
||||
|
||||
@@ -69,7 +69,7 @@ module Compiler
|
||||
end
|
||||
|
||||
def write_connections
|
||||
conndata = pbLoadMapConnections
|
||||
conndata = load_data("Data/map_connections.dat")
|
||||
return if !conndata
|
||||
mapinfos = pbLoadMapInfos
|
||||
File.open("PBS/connections.txt","wb") { |f|
|
||||
|
||||
Reference in New Issue
Block a user