From 1de5f9ac6f038bfed2230cc1272b253794b2f41a Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sun, 10 Jul 2016 17:04:29 -0400 Subject: Initial commit --- gamemode/server/sv_systems.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 gamemode/server/sv_systems.lua (limited to 'gamemode/server/sv_systems.lua') diff --git a/gamemode/server/sv_systems.lua b/gamemode/server/sv_systems.lua new file mode 100644 index 0000000..ad1b901 --- /dev/null +++ b/gamemode/server/sv_systems.lua @@ -0,0 +1,21 @@ +--[[ + Calculates various needs for the player, displayed in /gamemode/client/cl_systems.lua + Each need has a min and a max (ex health, stamina ect.) + + Provides: + ART.RegisterSystem(string_name, table_system) + Registers the system with all players. Two systems may not share the same name. +]] + +local pmeta = FindMetaTable("Player") + +pmeta.Systems = {} + +function ART.RegisterSystem(tbl) + assert(tbl.Name ~= nil,"Attempted to register a system with a nil name") + pmeta.Systems[name] = tbl +end + +concommand.Add("DisplaySystems",function() + PrintTable(pmeta.Systems) +end) -- cgit v1.2.3-70-g09d2