aboutsummaryrefslogtreecommitdiff
path: root/gamemode/core/npc/sh_npcsystem.lua
diff options
context:
space:
mode:
authorAlexander M Pickering <alex@cogarr.net>2025-12-27 17:21:49 -0600
committerAlexander M Pickering <alex@cogarr.net>2025-12-27 17:21:49 -0600
commit0c6a674999333a10317ee8a2b43f72bde03068c5 (patch)
tree71e1839fafaba516d2472d02847fe65d469a5550 /gamemode/core/npc/sh_npcsystem.lua
parentaacf5fbcfe1e6f2cdb0c6ab19b3e8dd87e3fd488 (diff)
downloadartery-master.tar.gz
artery-master.tar.bz2
artery-master.zip
Update for documentationHEADmaster
Diffstat (limited to 'gamemode/core/npc/sh_npcsystem.lua')
-rw-r--r--gamemode/core/npc/sh_npcsystem.lua15
1 files changed, 10 insertions, 5 deletions
diff --git a/gamemode/core/npc/sh_npcsystem.lua b/gamemode/core/npc/sh_npcsystem.lua
index 9b43965..5b93f1e 100644
--- a/gamemode/core/npc/sh_npcsystem.lua
+++ b/gamemode/core/npc/sh_npcsystem.lua
@@ -115,11 +115,16 @@ local function loadMap()
local foldername = "artery/maps/" .. mapname
ExecuteOnFolder(foldername,true,function(path)
- print("I want to run",path)
- local filetxt = file.Read(path,"DATA")
- --print("File text is", filetxt)
- CompileString(filetxt,path)()
- --print("I want to execute",path)
+ local filename = path:match("/([^/]+)$")
+ print("I want to run",path, ";", filename)
+ local is_server = filename:match("^sv_")
+ local is_client = filename:match("^cl_")
+ if (is_client and CLIENT) or (is_server and SERVER) or (not is_server and not is_client) then
+ local filetxt = file.Read(path,"DATA")
+ --print("File text is", filetxt)
+ CompileString(filetxt,path)()
+ --print("I want to execute",path)
+ end
end)
end