aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--ClientHamr/GuiLua/skang.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/ClientHamr/GuiLua/skang.lua b/ClientHamr/GuiLua/skang.lua
index ec88dd6..327dc38 100644
--- a/ClientHamr/GuiLua/skang.lua
+++ b/ClientHamr/GuiLua/skang.lua
@@ -134,6 +134,7 @@ Thing =
134 end, 134 end,
135 isValid = function (self) -- Check if this Thing is valid, return resulting error messages in errors. 135 isValid = function (self) -- Check if this Thing is valid, return resulting error messages in errors.
136 self.errors = {} 136 self.errors = {}
137 -- TODO - Should check for required, matching mask, matching type, etc.
137 return true 138 return true
138 end, 139 end,
139 remove = function (self) -- Delete this Thing. 140 remove = function (self) -- Delete this Thing.
@@ -153,7 +154,13 @@ Thing =
153 local thing = things[key] 154 local thing = things[key]
154 155
155 -- First see if this is a Thing. 156 -- First see if this is a Thing.
156 if thing and (key ~= thing.names[1]) then return table[thing.names[1] ] end 157 if thing then
158 local result = nil
159 if key ~= thing.names[1] then
160 result = table[thing.names[1] ]
161 end
162 return result or thing.default
163 end
157 164
158 -- Then see if we can inherit it from Thing. 165 -- Then see if we can inherit it from Thing.
159 thing = Thing[key] 166 thing = Thing[key]