aboutsummaryrefslogtreecommitdiff
path: root/gamemode/nrequire.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/nrequire.lua')
-rw-r--r--gamemode/nrequire.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/gamemode/nrequire.lua b/gamemode/nrequire.lua
index af066f0..7be9772 100644
--- a/gamemode/nrequire.lua
+++ b/gamemode/nrequire.lua
@@ -127,6 +127,10 @@ function nrequire(req,...)
else
tpath = scan(ntbl,req)
end
+ if tpath == nil then
+ MsgC(Color(209,96,196), "Unable to find file for include:" .. req)
+ error(debug.traceback())
+ end
-- local tpath = scan(ntbl,req) -- Find the full path for the nrequired() module
local trace = debug.getinfo(2,"flnSu")
@@ -372,7 +376,7 @@ else
net.Receive("art_downloadfiles",function(ln,pl)
local clientfiles = net.ReadTable()
local todownload = {}
-
+ local needs_restart = false
for k,v in pairs(clientfiles) do
local fullpath = "artery/client/" .. v.directory .. "/" .. v.name .. ".txt"
if not file.Exists(fullpath,"DATA") then
@@ -381,12 +385,14 @@ else
directory = v.directory
}
todownload[#todownload + 1] = thisdownload
+ needs_restart = true
elseif util.CRC(file.Read(fullpath,"DATA")) ~= v.hash then
local thisdownload = {
name = v.name,
directory = v.directory
}
todownload[#todownload + 1] = thisdownload
+ needs_restart = true
-- else file is up to date and dosn't need re-downloading.
end
end
@@ -413,6 +419,7 @@ else
file.CreateDir(path)
print("Writing to ", fullpath)
file.Write(fullpath,tbl.text)
+ timer.Simple(10,function() RunConsoleCommand("retry") end)
end)
net.Receive("artery_downloadfile",function(ln,pl)