summaryrefslogtreecommitdiff
path: root/server/src/vm/emmy.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/vm/emmy.lua')
-rw-r--r--server/src/vm/emmy.lua16
1 files changed, 15 insertions, 1 deletions
diff --git a/server/src/vm/emmy.lua b/server/src/vm/emmy.lua
index 6e5c2b13..67c620a8 100644
--- a/server/src/vm/emmy.lua
+++ b/server/src/vm/emmy.lua
@@ -1,15 +1,29 @@
local mt = require 'vm.manager'
+function mt:clearEmmy()
+ self._emmy = nil
+end
+
+function mt:getEmmy()
+ local emmy = self._emmy
+ self._emmy = nil
+ return emmy
+end
+
function mt:doEmmyClass(action)
local emmyMgr = self.emmyMgr
self:instantSource(action)
local class = emmyMgr:addClass(action)
- self.emmy = class
+ self._emmy = class
action:set('emmy.class', class)
end
function mt:doEmmyType(action)
local emmyMgr = self.emmyMgr
+ self:instantSource(action)
+ local type = emmyMgr:createType()
+ self._emmy = type
+ action:set('emmy.type', type)
end
function mt:doEmmyIncomplete(action)