diff --git a/Modules/Main.lua b/Modules/Main.lua index 024d35fa..382ade18 100644 --- a/Modules/Main.lua +++ b/Modules/Main.lua @@ -109,27 +109,25 @@ function main:Init() end if self.rebuildModCache then - -- Update mod caches - for _, targetVersion in ipairs(targetVersionList) do - local out = io.open("Data/"..targetVersion.."/ModCache.lua", "w") - out:write('local c=...') - for line, dat in pairs(modLib.parseModCache[targetVersion]) do - if not dat[1] or not dat[1][1] or dat[1][1].name ~= "JewelFunc" then - out:write('c["', line:gsub("\n","\\n"), '"]={') - if dat[1] then - writeLuaTable(out, dat[1]) - else - out:write('nil') - end - if dat[2] then - out:write(',"', dat[2]:gsub("\n","\\n"), '"}') - else - out:write(',nil}') - end + -- Update mod cache + local out = io.open("Data/"..liveTargetVersion.."/ModCache.lua", "w") + out:write('local c=...') + for line, dat in pairs(modLib.parseModCache[liveTargetVersion]) do + if not dat[1] or not dat[1][1] or dat[1][1].name ~= "JewelFunc" then + out:write('c["', line:gsub("\n","\\n"), '"]={') + if dat[1] then + writeLuaTable(out, dat[1]) + else + out:write('nil') + end + if dat[2] then + out:write(',"', dat[2]:gsub("\n","\\n"), '"}\n') + else + out:write(',nil}\n') end end - out:close() end + out:close() end self.sharedItemList = { }