From 0c6a674999333a10317ee8a2b43f72bde03068c5 Mon Sep 17 00:00:00 2001 From: Alexander M Pickering Date: Sat, 27 Dec 2025 17:21:49 -0600 Subject: Update for documentation --- gamemode/core/npc/sh_npcsystem.lua | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'gamemode/core/npc/sh_npcsystem.lua') 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 -- cgit v1.2.3-70-g09d2