summaryrefslogtreecommitdiff
path: root/server/src/emmy
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/emmy')
-rw-r--r--server/src/emmy/manager.lua3
-rw-r--r--server/src/emmy/param.lua11
2 files changed, 14 insertions, 0 deletions
diff --git a/server/src/emmy/manager.lua b/server/src/emmy/manager.lua
index 128ed029..85f25bd1 100644
--- a/server/src/emmy/manager.lua
+++ b/server/src/emmy/manager.lua
@@ -138,6 +138,9 @@ function mt:addParam(source, bind)
elseif bind.type == 'emmy.generic' then
paramObj:bindGeneric(bind)
end
+ for i = 3, #source do
+ paramObj:addEnum(source[i][1])
+ end
return paramObj
end
diff --git a/server/src/emmy/param.lua b/server/src/emmy/param.lua
index 9a2d407f..5894e28e 100644
--- a/server/src/emmy/param.lua
+++ b/server/src/emmy/param.lua
@@ -29,10 +29,21 @@ function mt:bindGeneric(generic)
end
end
+function mt:addEnum(str)
+ self._enum[#self._enum+1] = str
+end
+
+function mt:eachEnum(callback)
+ for _, str in ipairs(self._enum) do
+ callback(str)
+ end
+end
+
return function (manager, source)
local self = setmetatable({
source = source.id,
_manager = manager,
+ _enum = {},
}, mt)
if source.type == 'emmyParam' then
self.name = source[1][1]