From f2444b757331ddf8df16a39a86b0ce8608338d77 Mon Sep 17 00:00:00 2001 From: sumneko Date: Mon, 29 Apr 2019 19:45:38 +0800 Subject: emmy.generic --- server/src/emmy/generic.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 server/src/emmy/generic.lua (limited to 'server/src/emmy/generic.lua') diff --git a/server/src/emmy/generic.lua b/server/src/emmy/generic.lua new file mode 100644 index 00000000..d47ee585 --- /dev/null +++ b/server/src/emmy/generic.lua @@ -0,0 +1,27 @@ +local listMgr = require 'vm.list' + +---@class EmmyGeneric +local mt = {} +mt.__index = mt +mt.type = 'emmy.generic' + +function mt:getName() + return self.name +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 -- cgit v1.2.3