diff options
author | David Walter Seikel | 2014-03-29 16:40:07 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-03-29 16:40:07 +1000 |
commit | 2619523d2fa1245d2576f92e32925525c183059c (patch) | |
tree | 939faa25626bbae511b76fc3edc30d1ff16e88fb | |
parent | Implement multiple Thing copies. (diff) | |
download | SledjHamr-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.
-rw-r--r-- | ClientHamr/GuiLua/skang.lua | 10 |
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 | |||
358 | Thing.remove = function (self) -- Delete this Thing. | 358 | Thing.remove = function (self) -- Delete this Thing. |
359 | end | 359 | end |
360 | 360 | ||
361 | Thing.__index = function (table, key) | 361 | Thing.__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 |
378 | end | 378 | end |
379 | 379 | ||
380 | Thing.__newindex = function (table, key, value) | 380 | Thing.__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 |
410 | end | 410 | end |
411 | 411 | ||