aboutsummaryrefslogtreecommitdiff
path: root/gamemode/server/sv_systems.lua
blob: ad1b901b90f745b8612dde4bc91e722e4e4bbb7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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)