summaryrefslogtreecommitdiff
path: root/server/src/emmy/generic.lua
blob: 82fd0c4b80ca06bc1857e9949cdeeef9b1a62cd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
local listMgr = require 'vm.list'

---@class EmmyGeneric
local mt = {}
mt.__index = mt
mt.type = 'emmy.generic'

function mt:getName()
    return self.name:getName()
end

function mt:setValue(value)
    self._value = value
end

function mt:getValue()
    return self._value
end

return function (manager, defs)
    for _, def in ipairs(defs) do
        setmetatable(def, mt)
        def._manager = manager
        def._binds = {}
    end
    return defs
end