diff options
Diffstat (limited to 'ClientHamr')
-rw-r--r-- | ClientHamr/GuiLua/skang.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ClientHamr/GuiLua/skang.lua b/ClientHamr/GuiLua/skang.lua index aa3e084..e3c2612 100644 --- a/ClientHamr/GuiLua/skang.lua +++ b/ClientHamr/GuiLua/skang.lua | |||
@@ -528,11 +528,13 @@ thing = function (names, ...) | |||
528 | if nil == modThing then | 528 | if nil == modThing then |
529 | modThing = {} | 529 | modThing = {} |
530 | modThing.names = {module._NAME} | 530 | modThing.names = {module._NAME} |
531 | -- This is how the Thing is stored with the module. | ||
531 | setmetatable(module, modThing) | 532 | setmetatable(module, modThing) |
532 | end | 533 | end |
533 | -- Coz at module creation time, Thing is an empty table, and setmetatable(modThing, {__index = Thing}) doesn't do the same thing. | 534 | -- Coz at module creation time, Thing is an empty table, and setmetatable(modThing, {__index = Thing}) doesn't do the right thing. |
534 | -- Also, module might not be an actual module, this might be Stuff. | 535 | -- Also, module might not be an actual module, this might be Stuff. |
535 | if nil == modThing.__stuff then | 536 | if nil == modThing.__stuff then |
537 | -- Seems this does not deal with __index and __newindex, and also screws up __stuff somehow. | ||
536 | -- setmetatable(modThing, {__index = Thing}) | 538 | -- setmetatable(modThing, {__index = Thing}) |
537 | modThing.__stuff = {} | 539 | modThing.__stuff = {} |
538 | modThing.__values = {} | 540 | modThing.__values = {} |
@@ -546,6 +548,7 @@ thing = function (names, ...) | |||
546 | thingy = {} | 548 | thingy = {} |
547 | thingy.module = module | 549 | thingy.module = module |
548 | thingy.names = names | 550 | thingy.names = names |
551 | -- To pick up isValid, pattern, and the other stuff. | ||
549 | setmetatable(thingy, {__index = Thing}) | 552 | setmetatable(thingy, {__index = Thing}) |
550 | end | 553 | end |
551 | 554 | ||