diff options
Diffstat (limited to 'server/src/vm/list.lua')
-rw-r--r-- | server/src/vm/list.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/server/src/vm/list.lua b/server/src/vm/list.lua new file mode 100644 index 00000000..f0f2bd3e --- /dev/null +++ b/server/src/vm/list.lua @@ -0,0 +1,23 @@ +local Id = 0 +local List = {} + +local function get(id) + return List[id] +end + +local function add(obj) + Id = Id + 1 + List[Id] = obj + return Id +end + +local function clear(id) + List[id] = nil +end + +return { + get = get, + add = add, + clear = clear, + list = List, +} |