aboutsummaryrefslogtreecommitdiff
path: root/gamemode/core/pac/cl_pac.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2017-05-07 13:47:40 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2017-05-07 13:47:40 -0400
commit9e0537b0aa417e88a6a61238484ddcef74080ae0 (patch)
treee2bd590ec3de41d384aa5f6206b14e1a73647846 /gamemode/core/pac/cl_pac.lua
parent191ba416c8b611ea4901cead138789a357c56134 (diff)
downloadartery-9e0537b0aa417e88a6a61238484ddcef74080ae0.tar.gz
artery-9e0537b0aa417e88a6a61238484ddcef74080ae0.tar.bz2
artery-9e0537b0aa417e88a6a61238484ddcef74080ae0.zip
Added tons of stuff
Diffstat (limited to 'gamemode/core/pac/cl_pac.lua')
-rw-r--r--gamemode/core/pac/cl_pac.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/gamemode/core/pac/cl_pac.lua b/gamemode/core/pac/cl_pac.lua
index 9163d82..4f1890c 100644
--- a/gamemode/core/pac/cl_pac.lua
+++ b/gamemode/core/pac/cl_pac.lua
@@ -27,11 +27,13 @@ timer.Simple(0,function()
net.SendToServer()
end)
-file.CreateDir("artery/pacs")
+local CLIENT_PAC_DIR = "artery/client/pacs"
+
+file.CreateDir(CLIENT_PAC_DIR)
local function loadpac(ent,name,hash)
print("Told to apply pac", name, "to ent", ent)
- local filepath = string.format("artery/pacs/%s.txt",name)
+ local filepath = string.format(CLIENT_PAC_DIR .. "/%s.txt",name)
local filetext = file.Read(filepath,"DATA")
if ent.AttachPACPart == nil then
pac.SetupENT(ent)
@@ -52,7 +54,7 @@ local function loadpac(ent,name,hash)
end
local function unloadpac(ent,name,hash)
- local filepath = string.format("artery/pacs/%s.txt",name)
+ local filepath = string.format(CLIENT_PAC_DIR .. "/%s.txt",name)
local filetext = file.Read(filepath,"DATA")
local pactbl = CompileString(string.format("return {%s}",filetext),name)()
ent:RemovePACPart(pactbl)
@@ -62,7 +64,7 @@ net.Receive("artery_downloadpac",function()
local pac_name = net.ReadString()
local pac_txt = net.ReadString()
local pac_hash = net.ReadUInt(32)
- local filepath = string.format("artery/pacs/%s.txt",pac_name)
+ local filepath = string.format(CLIENT_PAC_DIR .."/%s.txt",pac_name)
file.Write(filepath,pac_txt)
end)