diff options
Diffstat (limited to 'server/src/vm/source.lua')
-rw-r--r-- | server/src/vm/source.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/vm/source.lua b/server/src/vm/source.lua index 0f167063..810db769 100644 --- a/server/src/vm/source.lua +++ b/server/src/vm/source.lua @@ -4,6 +4,7 @@ mt.uri = '' local Id = 0 local List = {} +local Watch = setmetatable({}, {__mode = 'k'}) function mt:bindLocal(loc, action) if loc then @@ -99,6 +100,7 @@ local function instant(source) Id = Id + 1 source.id = Id List[Id] = source + Watch[source] = Id setmetatable(source, mt) return true end @@ -115,5 +117,6 @@ end return { instant = instant, list = List, + watch = Watch, dummy = dummy, } |