aboutsummaryrefslogtreecommitdiff
path: root/gamemode/nrequire.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2018-07-21 19:08:34 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2018-07-21 19:08:34 -0400
commit81d3d4eb333e226432a591461b84ed12f5ac9a3f (patch)
treed802983c3caf6683f1fd8eb881c7df65afa0d27b /gamemode/nrequire.lua
parentbfdf805676684a838dde5d4cdeb3d8c972d5003d (diff)
downloadartery-81d3d4eb333e226432a591461b84ed12f5ac9a3f.tar.gz
artery-81d3d4eb333e226432a591461b84ed12f5ac9a3f.tar.bz2
artery-81d3d4eb333e226432a591461b84ed12f5ac9a3f.zip
Various updates
* Animation api now allows sequences to be played * items now have a .inv attribute that is set when they are added to shaped or equipment inventories * Refactored the way skill inventory is structured * Added some more methods to cl_common to move items around on a player * Minor update to nrequire to display purple message when asked to include a file that dosn't exist.
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)