feat: Added createdAsync

This commit is contained in:
Qwreey 2023-01-04 23:59:30 +09:00
parent c6491b626a
commit aabdb85ee7
2 changed files with 22 additions and 12 deletions

View file

@ -85,8 +85,8 @@ function module.init(shared)
end
-- when created binding
new.created = prefix .. "Created::";
new.createdSync = prefix .. "CreatedSync::";
new.createdAsync = prefix .. "CreatedAsync::";
new.created = prefix .. "CreatedSync::";
-- roblox connections disconnecter
local insert = table.insert;

View file

@ -117,22 +117,32 @@ function module.init(shared)
insert(event,efunc);
end
end;
with = function (s,efunc)
return setmetatable({wfunc = efunc},{__index = s});
with = function (s,wfunc)
-- s.wfunc = wfunc;
-- return s;
return setmetatable({wfunc = wfunc},{__index = s});
end;
default = function (s,value)
return setmetatable({dvalue = value},{__index = s});
default = function (s,dvalue)
-- s.dvalue = dvalue;
-- return s;
return setmetatable({dvalue = dvalue},{__index = s});
end;
tween = function (s,value)
return setmetatable({tvalue = value},{__index = s});
tween = function (s,tvalue)
-- s.tvalue = tvalue;
-- return s;
return setmetatable({tvalue = tvalue},{__index = s});
end;
---@deprecated
from = function (s,value)
from = function (s,fvalue)
warn "[QUAD] register:from() is deprecated. You can use register:add(t:table|function) instead";
return setmetatable({fvalue = value},{__index = s});
-- s.fvalue = fvalue;
-- return s;
return setmetatable({fvalue = fvalue},{__index = s});
end;
add = function (s,value)
return setmetatable({avalue = value},{__index = s});
add = function (s,avalue)
-- s.avalue = avalue;
-- return s;
return setmetatable({avalue = avalue},{__index = s});
end;
-- return init data
calcWithDefault = function (s,withItem)