aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ClientHamr/GuiLua/skang.lua
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-03-30 15:39:03 +1000
committerDavid Walter Seikel2014-03-30 15:39:03 +1000
commit1826d93467341dec9947e0592bc1e9b7deddcf51 (patch)
treec236e17d1f20349b28ffd73e69e9eef6214f2e56 /ClientHamr/GuiLua/skang.lua
parentVarious fixes, mostly to do with stufflets, which are still slightly broken. (diff)
downloadSledjHamr-1826d93467341dec9947e0592bc1e9b7deddcf51.zip
SledjHamr-1826d93467341dec9947e0592bc1e9b7deddcf51.tar.gz
SledjHamr-1826d93467341dec9947e0592bc1e9b7deddcf51.tar.bz2
SledjHamr-1826d93467341dec9947e0592bc1e9b7deddcf51.tar.xz
Fix up using aliases in Stufflets, plus it helps if the alias is in the right call. lol
Diffstat (limited to 'ClientHamr/GuiLua/skang.lua')
-rw-r--r--ClientHamr/GuiLua/skang.lua13
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