Restore ability to save any previously loaded specs before switching
This commit is contained in:
@@ -336,11 +336,13 @@ function main:LoadDatSource(value)
|
||||
self.leagueLabel = nil
|
||||
local reExportState = self.reExportGGPKData
|
||||
self.reExportGGPKData = true
|
||||
if self.datSource then
|
||||
local out = io.open(self.datSource.spec..(self.datSource.spec:match("%.lua$") and "" or ".lua"), "w")
|
||||
out:write('return ')
|
||||
writeLuaTable(out, self.datSpecs, 1)
|
||||
out:close()
|
||||
end
|
||||
self.datSource = value
|
||||
local out = io.open(self.datSource.spec..(self.datSource.spec:match("%.lua$") and "" or ".lua"), "w")
|
||||
out:write('return ')
|
||||
writeLuaTable(out, self.datSpecs, 1)
|
||||
out:close()
|
||||
self.datSpecs = LoadModule(self.datSource.spec)
|
||||
self:InitGGPK()
|
||||
if USE_DAT64 then
|
||||
|
||||
Reference in New Issue
Block a user