dofile(LockOn_Options.script_path.."utils.lua")
dofile(LockOn_Options.script_path.."command_defs.lua")
dofile(LockOn_Options.script_path.."devices.lua")
dofile(LockOn_Options.script_path.."Systems/electric_system_api.lua")

local test_screen 	    = GetSelf()

local update_time_step = 0.02  --每秒50次刷新
make_default_activity(update_time_step)

local tablePrinted = {}
local pr=0
local logDir = LockOn_Options.script_path .. "Logs/"
local file = io.open(logDir.."Global.txt", "w")
assert(file)
function printTableItem(k, v, level)
    for i = 1, level do
        file:write("\t")
    end
    file:write(tostring(k) .. " = " .. tostring(v) .. "\r\n")
    if type(v) == "table" then
        if not tablePrinted[v] then
            tablePrinted[v] = true
            for k_, v_ in pairs(v) do
                printTableItem(k_, v_, level + 1)
            end
        end
    end
end


function post_initialize()
	printTableItem("_G",_G,0)
end

function update()

end

need_to_be_closed = false