From 2619523d2fa1245d2576f92e32925525c183059c Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sat, 29 Mar 2014 16:40:07 +1000 Subject: Change table to module, coz table is one of the Lua supplied modules. On the oter hand, module is itself a Lua name, but we ignore it coz it's broken anyway. --- ClientHamr/GuiLua/skang.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ClientHamr') diff --git a/ClientHamr/GuiLua/skang.lua b/ClientHamr/GuiLua/skang.lua index ce4fb9f..dfca188 100644 --- a/ClientHamr/GuiLua/skang.lua +++ b/ClientHamr/GuiLua/skang.lua @@ -358,9 +358,9 @@ end Thing.remove = function (self) -- Delete this Thing. end -Thing.__index = function (table, key) +Thing.__index = function (module, key) -- This only works for keys that don't exist. By definition a value of nil means it doesn't exist. - local pre = rawget(table, 'pre') + local pre = rawget(module, 'pre') if pre then pre = pre .. '_value' else pre = 'value' end local thing = things[key] -- First see if this is a Thing. @@ -377,9 +377,9 @@ Thing.__index = function (table, key) return nil end -Thing.__newindex = function (table, key, value) +Thing.__newindex = function (module, key, value) -- This only works for keys that don't exist. By definition a value of nil means it doesn't exist. - local pre = rawget(table, 'pre') + local pre = rawget(module, 'pre') if pre then pre = pre .. '_value' else pre = 'value' end local thing = things[key] @@ -405,7 +405,7 @@ Thing.__newindex = function (table, key, value) -- TODO - Go through it's linked things and set them to. end else - rawset(table, key, value) -- Stuff it normally. + rawset(module, key, value) -- Stuff it normally. end end -- cgit v1.1