1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-14 10:13:13 +02:00
RedMew/utils/test/steps.lua

18 lines
311 B
Lua
Raw Normal View History

2020-09-19 15:48:08 +02:00
local Public = {}
Public.__index = Public
function Public.new()
2020-09-19 16:56:50 +02:00
return setmetatable({}, Public)
2020-09-19 15:48:08 +02:00
end
2020-09-19 16:56:50 +02:00
function Public.timeout(self, delay, func)
self[#self + 1] = {func = func, delay = delay or 1}
return self
end
function Public.next(self, func)
return self:timeout(1, func)
2020-09-19 15:48:08 +02:00
end
return Public