diff options
Diffstat (limited to '')
-rw-r--r-- | ClientHamr/GuiLua/skang.lua | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ClientHamr/GuiLua/skang.lua b/ClientHamr/GuiLua/skang.lua index a742845..e0123fb 100644 --- a/ClientHamr/GuiLua/skang.lua +++ b/ClientHamr/GuiLua/skang.lua | |||
@@ -479,10 +479,15 @@ Thing.__newindex = function (module, key, value) | |||
479 | local valueMeta | 479 | local valueMeta |
480 | if 'table' == type(value) then | 480 | if 'table' == type(value) then |
481 | -- Coz setting it via modThing screws with the __index stuff somehow. | 481 | -- Coz setting it via modThing screws with the __index stuff somehow. |
482 | valueMeta = getmetatable(modThing.__values[name]) | 482 | local oldValue = modThing.__values[name] |
483 | if valueMeta then | 483 | if 'table' == type(oldValue) then |
484 | for k, v in pairs(value) do | 484 | valueMeta = getmetatable(oldValue) |
485 | valueMeta.__values[k] = v | 485 | if valueMeta then |
486 | for k, v in pairs(value) do | ||
487 | local newK = valueMeta.__stuff[k] | ||
488 | if newK then newK = newK.names[1] else newK = k end | ||
489 | valueMeta.__values[newK] = v | ||
490 | end | ||
486 | end | 491 | end |
487 | end | 492 | end |
488 | end | 493 | end |