- Finish base functions of 'RadioManager.lua'.

- TODO fix logic bug at line 120-145.
This commit is contained in:
2024-12-23 21:45:13 +08:00
parent 5655f931ea
commit ba3bd8f516
5 changed files with 176 additions and 14 deletions
+24
View File
@@ -1,6 +1,30 @@
Utils = {}
do
function Utils.Debug(text,displayTime,clearview)
if not text then text = 'nil or false' end
if type(text) ~= 'string' then
if type(text) ~= 'table' then
text = tostring(text)
end
if type(text) == 'table' then
if mist then
text = mist.utils.tableShow(text)
else
text = 'no mist, please use mist to debug a table.'
end
end
end
displayTime = displayTime or 10
clearview = clearview or false
trigger.action.outText(text,displayTime,clearview)
end
--- Creates a deep copy of a object.
-- Usually this object is a table.
-- See also: from http://lua-users.org/wiki/CopyTable