summaryrefslogtreecommitdiff
path: root/server/src/vm/function.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/vm/function.lua')
-rw-r--r--server/src/vm/function.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/src/vm/function.lua b/server/src/vm/function.lua
index 2ca12e2b..5b7d8682 100644
--- a/server/src/vm/function.lua
+++ b/server/src/vm/function.lua
@@ -101,6 +101,20 @@ function mt:setReturn(index, value)
end
end
+function mt:mergeReturn(index, value)
+ self:set('hasReturn', true)
+ if not self.returns then
+ self.returns = createMulti()
+ end
+ if value then
+ if self.returns[index] then
+ self.returns[index]:mergeValue(value)
+ else
+ self.returns[index] = value
+ end
+ end
+end
+
function mt:getReturn(index)
if self.maxReturns and index and self.maxReturns < index then
return nil