This repository has been archived on 2025-02-14. You can view files and clone it, but cannot push or open issues or pull requests.
quack-twn/data/scripts/util.lua

20 lines
375 B
Lua

local util = {}
function util.printt(t)
if type(t) == 'table' then
local s = '{ '
for k,v in pairs(t) do
if type(k) ~= 'number' then k = '"'..k..'"' end
s = s .. '['..k..'] = ' .. util.print(v) .. ','
end
return s .. '} '
else
return tostring(t)
end
end
function util.b2n(value)
return value and 1 or 0
end
return util