2023-12-18 04:23:37 +00:00
|
|
|
AddCSLuaFile()
|
|
|
|
|
|
|
|
cbox = cbox or {}
|
|
|
|
|
|
|
|
include("cbox/sh_utils.lua")
|
|
|
|
|
|
|
|
if SERVER then
|
|
|
|
AddCSLuaFile("cbox/cl_hooks.lua")
|
2023-12-18 06:59:16 +00:00
|
|
|
AddCSLuaFile("cbox/cl_chatbox.lua")
|
2023-12-19 05:12:18 +00:00
|
|
|
AddCSLuaFile("cbox/cl_modes.lua")
|
2023-12-18 04:23:37 +00:00
|
|
|
elseif CLIENT then
|
|
|
|
include("cbox/cl_hooks.lua")
|
2023-12-18 06:59:16 +00:00
|
|
|
include("cbox/cl_chatbox.lua")
|
2023-12-18 04:23:37 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
local module_files = file.Find("cbox/modules/*", "LUA")
|
|
|
|
for _, name in ipairs(module_files) do
|
|
|
|
local full_path = "cbox/modules/" .. name
|
|
|
|
if name:StartsWith("cl_") then
|
|
|
|
if SERVER then
|
|
|
|
AddCSLuaFile(full_path)
|
|
|
|
elseif CLIENT then
|
|
|
|
cbox.utils.RealmPrint("Loading module:", name)
|
|
|
|
include(full_path)
|
|
|
|
end
|
|
|
|
elseif name:StartsWith("sv_") and SERVER then
|
2023-12-18 06:59:16 +00:00
|
|
|
cbox.utils.RealmPrint("Loading module:", name)
|
2023-12-18 04:23:37 +00:00
|
|
|
include(full_path)
|
|
|
|
else
|
|
|
|
if SERVER then
|
|
|
|
AddCSLuaFile(full_path)
|
|
|
|
end
|
|
|
|
cbox.utils.SharedPrint("Loading module:", name)
|
|
|
|
include(full_path)
|
|
|
|
end
|
|
|
|
end
|