fixes
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
-- @name koptilnya/libs/render
|
||||
--@client
|
||||
|
||||
function render.drawWedge(x, y, w, h, angle, mouthSize, fidelity)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
-- @name koptilnya/libs/table
|
||||
|
||||
function table.chunk(tbl, size)
|
||||
size = size or 1
|
||||
size = size > 0 and size or 1
|
||||
@@ -17,3 +19,23 @@ function table.chunk(tbl, size)
|
||||
|
||||
return result
|
||||
end
|
||||
|
||||
function table.contains(tbl, ...)
|
||||
local argCount = #arg
|
||||
|
||||
if argCount == 1 then
|
||||
return table.hasValue(tbl, arg[1])
|
||||
elseif argCount > 1 then
|
||||
local result = true
|
||||
|
||||
for _, v in pairs(arg) do
|
||||
if not table.hasValue(tbl, v) then
|
||||
result = true
|
||||
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
return result
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
-- @name koptilnya/libs/utils
|
||||
|
||||
function checkVarClass(var, class, message)
|
||||
if type(var) ~= "table" or var["class"] == nil or not var:isInstanceOf(class) then
|
||||
throw(message == nil and "Wrong variable class." or message, 1, true)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
-- @name koptilnya/libs/workers
|
||||
|
||||
WORKERS = {}
|
||||
WORKERS_QUOTA = 0.4
|
||||
|
||||
|
||||
Reference in New Issue
Block a user