From 978abf2ec1656d3f555dde9e6f42982d8aeb3202 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Wed, 19 Sep 2018 22:25:34 +0100 Subject: [PATCH] Added __index to group linking to raw_group --- modules/ExpGamingCore/Group/control.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/ExpGamingCore/Group/control.lua b/modules/ExpGamingCore/Group/control.lua index 2aea7d22..9bbda1b5 100644 --- a/modules/ExpGamingCore/Group/control.lua +++ b/modules/ExpGamingCore/Group/control.lua @@ -1,4 +1,4 @@ ---- Desction +--- Adds a system to manage and auto-create permission groups. -- @module ExpGamingCore@Group -- @author Cooldude2606 -- @license Discord: Cooldude2606@5241 @@ -17,7 +17,9 @@ local module_verbose = false -- @field _prototype the prototype of this class -- @field groups a table of all groups, includes auto complete on the indexing local Group = { - _prototype = {}, + _prototype = setmetatable({},{ + __index=function(tbl,key) return rawget(rawget(tbl,'_raw_group'),key) end + }), groups = setmetatable({},{ __index=table.autokey, __newindex=function(tbl,key,value)