aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ClientHamr
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-03-29 16:40:07 +1000
committerDavid Walter Seikel2014-03-29 16:40:07 +1000
commit2619523d2fa1245d2576f92e32925525c183059c (patch)
tree939faa25626bbae511b76fc3edc30d1ff16e88fb /ClientHamr
parentImplement multiple Thing copies. (diff)
downloadSledjHamr-2619523d2fa1245d2576f92e32925525c183059c.zip
SledjHamr-2619523d2fa1245d2576f92e32925525c183059c.tar.gz
SledjHamr-2619523d2fa1245d2576f92e32925525c183059c.tar.bz2
SledjHamr-2619523d2fa1245d2576f92e32925525c183059c.tar.xz
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.
Diffstat (limited to 'ClientHamr')
-rw-r--r--ClientHamr/GuiLua/skang.lua10
1 files changed, 5 insertions, 5 deletions
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
358Thing.remove = function (self) -- Delete this Thing. 358Thing.remove = function (self) -- Delete this Thing.
359end 359end
360 360
361Thing.__index = function (table, key) 361Thing.__index = function (module, key)
362 -- This only works for keys that don't exist. By definition a value of nil means it doesn't exist. 362 -- This only works for keys that don't exist. By definition a value of nil means it doesn't exist.
363 local pre = rawget(table, 'pre') 363 local pre = rawget(module, 'pre')
364 if pre then pre = pre .. '_value' else pre = 'value' end 364 if pre then pre = pre .. '_value' else pre = 'value' end
365 local thing = things[key] 365 local thing = things[key]
366 -- First see if this is a Thing. 366 -- First see if this is a Thing.
@@ -377,9 +377,9 @@ Thing.__index = function (table, key)
377 return nil 377 return nil
378end 378end
379 379
380Thing.__newindex = function (table, key, value) 380Thing.__newindex = function (module, key, value)
381 -- This only works for keys that don't exist. By definition a value of nil means it doesn't exist. 381 -- This only works for keys that don't exist. By definition a value of nil means it doesn't exist.
382 local pre = rawget(table, 'pre') 382 local pre = rawget(module, 'pre')
383 if pre then pre = pre .. '_value' else pre = 'value' end 383 if pre then pre = pre .. '_value' else pre = 'value' end
384 local thing = things[key] 384 local thing = things[key]
385 385
@@ -405,7 +405,7 @@ Thing.__newindex = function (table, key, value)
405 -- TODO - Go through it's linked things and set them to. 405 -- TODO - Go through it's linked things and set them to.
406 end 406 end
407 else 407 else
408 rawset(table, key, value) -- Stuff it normally. 408 rawset(module, key, value) -- Stuff it normally.
409 end 409 end
410end 410end
411 411