From 81d3d4eb333e226432a591461b84ed12f5ac9a3f Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sat, 21 Jul 2018 19:08:34 -0400 Subject: 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. --- gamemode/nrequire.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gamemode/nrequire.lua') 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) -- cgit v1.2.3-70-g09d2