aboutsummaryrefslogtreecommitdiff
path: root/gamemode/core
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
parentaacf5fbcfe1e6f2cdb0c6ab19b3e8dd87e3fd488 (diff)
downloadartery-0c6a674999333a10317ee8a2b43f72bde03068c5.tar.gz
artery-0c6a674999333a10317ee8a2b43f72bde03068c5.tar.bz2
artery-0c6a674999333a10317ee8a2b43f72bde03068c5.zip
Update for documentationHEADmaster
Diffstat (limited to 'gamemode/core')
-rw-r--r--gamemode/core/database/sv_setup.lua4
-rw-r--r--gamemode/core/mapstich/sv_mapstich.lua4
-rw-r--r--gamemode/core/npc/sh_npcsystem.lua15
3 files changed, 16 insertions, 7 deletions
diff --git a/gamemode/core/database/sv_setup.lua b/gamemode/core/database/sv_setup.lua
index 4aba3db..a79287a 100644
--- a/gamemode/core/database/sv_setup.lua
+++ b/gamemode/core/database/sv_setup.lua
@@ -57,7 +57,9 @@ local function connect()
end
end
hook.Add("DatabaseInitialized","setup_table",function()
- assert(MySQLite.isMySQL(),"Database wasn't mysqloo, something is probably wrong!")
+ if not MySQLite.isMySQL() then
+ log.warn("Database wasn't mysqloo, something is probably wrong!")
+ end
local setup_success = function(res,li)
log.info("Set up playerdata table")
--print("Set up connection to db")
diff --git a/gamemode/core/mapstich/sv_mapstich.lua b/gamemode/core/mapstich/sv_mapstich.lua
index 11b4540..7e5a963 100644
--- a/gamemode/core/mapstich/sv_mapstich.lua
+++ b/gamemode/core/mapstich/sv_mapstich.lua
@@ -10,7 +10,9 @@ local log = nrequire("log.lua")
--if not zones then error("This thing needs zones to function!") end
hook.Add("DatabaseInitialized","initalize_mapstich",function()
- assert(MySQLite.isMySQL(),"Database wasn't mysqloo, something is probably wrong!")
+ if not MySQLite.isMySQL() then
+ log.warn("Database wasn't mysqloo, something is probably wrong!")
+ end
end)
util.AddNetworkString("art_zonechange")
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