1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-07-01 00:44:57 +02:00
Files
RedMew/utils/global_token.lua

20 lines
241 B
Lua
Raw Normal View History

2018-04-07 00:24:30 +01:00
local Token = {}
2018-04-06 22:51:17 +01:00
local tokens = {}
local counter = 1
function Token.register(var)
local c = counter
tokens[c] = var
counter = c + 1
return c
end
function Token.get(token_id)
return tokens[token_id]
end
return Token