-- SDO_PUBLIC_AUTOLOAD_DEDICATED_MOD_BEGIN
-- UE4SS guarantees execution of this main.lua on clean public installations.
-- Use a Lua long-bracket path so Windows backslashes are not interpreted as escapes.
local phaseLoaderPath = [[__WIN64_PATH__\ue4ss\Mods\SurrounDeadOnline\Scripts\phase5g55_autocontinue.lua]]
local statusPath = [[__DATA_PATH__\autoload-mod-status.txt]]
local function writeStatus(text)
    pcall(function()
        local statusFile = io.open(statusPath, 'w')
        if statusFile then statusFile:write(text .. '\n'); statusFile:close() end
    end)
end
print('[SurrounDeadOnlineAutoLoad] dedicated public auto-loader started: ' .. phaseLoaderPath)
writeStatus('started')
local phaseLoaderOk, phaseLoaderError = pcall(dofile, phaseLoaderPath)
if phaseLoaderOk then
    print('[SurrounDeadOnlineAutoLoad] Phase 5G.5.5 loader registered')
    writeStatus('registered')
else
    print('[SurrounDeadOnlineAutoLoad] loader failed: ' .. tostring(phaseLoaderError))
    writeStatus('failed: ' .. tostring(phaseLoaderError))
end
-- SDO_PUBLIC_AUTOLOAD_DEDICATED_MOD_END
