diff options
Diffstat (limited to 'script/vm/node.lua')
-rw-r--r-- | script/vm/node.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/script/vm/node.lua b/script/vm/node.lua index 3d1a24bc..8b2bafd7 100644 --- a/script/vm/node.lua +++ b/script/vm/node.lua @@ -204,6 +204,15 @@ function mt:remove(name) end end +---@param node vm.node +function mt:removeNode(node) + for _, c in ipairs(node) do + if c.type == 'global' and c.cate == 'type' then + self:remove(c.name) + end + end +end + ---@return fun():vm.object function mt:eachObject() local i = 0 |