- Finish base functions of 'RadioManager.lua'.
- TODO fix logic bug at line 120-145.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user