aboutsummaryrefslogtreecommitdiff
path: root/gamemode/core/dataloader/sv_loadglobals.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2017-11-08 15:51:26 -0500
committerAlexander Pickering <alexandermpickering@gmail.com>2017-11-08 15:51:26 -0500
commit2252904b8147419c551ad2653a20627281d0531f (patch)
treec1d76a132fa085940dd33d8af99c08dd9da04675 /gamemode/core/dataloader/sv_loadglobals.lua
parent07593f0c983ac6b16161829b20ea6fde887fa7e9 (diff)
downloadartery-2252904b8147419c551ad2653a20627281d0531f.tar.gz
artery-2252904b8147419c551ad2653a20627281d0531f.tar.bz2
artery-2252904b8147419c551ad2653a20627281d0531f.zip
Finished LDoc comments
Diffstat (limited to 'gamemode/core/dataloader/sv_loadglobals.lua')
-rw-r--r--gamemode/core/dataloader/sv_loadglobals.lua12
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. ![Requires admin](./req_admin)
+--@concommand artery_reloadglobals
concommand.Add("artery_reloadglobals",function(ply,cmd,args)
if not ply:IsAdmin() then return end
loadglobals()