Skip to content

Commit

Permalink
Fix modCache not being used during startup causing long loading times (
Browse files Browse the repository at this point in the history
  • Loading branch information
QuickStick123 authored Dec 25, 2022
1 parent 03ba68d commit 155cdfc
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/Modules/Main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ function main:Init()
self.buildPath = self.defaultBuildPath
MakeDir(self.buildPath)

if launch.devMode and IsKeyDown("CTRL") then
self.rebuildModCache = true
elseif not launch.headlessMode then
-- Load mod cache
LoadModule("Data/ModCache", modLib.parseModCache)
end

if launch.devMode and IsKeyDown("CTRL") and IsKeyDown("SHIFT") then
self.allowTreeDownload = true
end
Expand Down Expand Up @@ -97,11 +104,8 @@ function main:Init()
end
end

if launch.devMode and IsKeyDown("CTRL") then
if self.rebuildModCache then
self:RebuildModCache()
elseif not launch.headlessMode then
-- Load mod cache
LoadModule("Data/ModCache", modLib.parseModCache)
end

self.sharedItemList = { }
Expand Down

0 comments on commit 155cdfc

Please sign in to comment.