diff options
Diffstat (limited to 'gamemode/core/dataloader/sv_loadglobals.lua')
| -rw-r--r-- | gamemode/core/dataloader/sv_loadglobals.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gamemode/core/dataloader/sv_loadglobals.lua b/gamemode/core/dataloader/sv_loadglobals.lua index 7689c54..bb74572 100644 --- a/gamemode/core/dataloader/sv_loadglobals.lua +++ b/gamemode/core/dataloader/sv_loadglobals.lua @@ -1,3 +1,7 @@ +---Loads code from the data directory. +-- Simple data loader, loads code from the data directory, sv_* files only get loaded server side, cl_* files only get loaded client-side, other files are loaded shared +--@module sv_loadglobals.lua + print("Load globals called") local log = nrequire("log.lua") local function ExecuteOnFolder(dir, recursive, func) @@ -109,10 +113,18 @@ net.Receive("artery_requestcsfile",function(ln,ply) net.WriteString(toload[which]) net.Send(ply) end) + +---Reloads client-side files. +-- Reloads all files that have been downloaded client side, does not re-download files. +--@concommand artery_reloadglobals_cs concommand.Add("artery_reloadglobals_cs",function(ply,cmd,args) load_cs_files(ply) state = "loading_cl" end) + +---Reloads all global/ files on all clients. +-- Tells all clients to reload their client-side files, and reloads server-side files.  +--@concommand artery_reloadglobals concommand.Add("artery_reloadglobals",function(ply,cmd,args) if not ply:IsAdmin() then return end loadglobals() |
