Launchingserverpopup
Based on game build 714014 | Last updated: 2026-03-09
Overview
LaunchingServerPopup is a screen component that displays a waiting interface during the launch and initialization of a dedicated server. It extends GenericWaitingPopup and monitors the server process status via TheNet:GetChildProcessStatus() and error states via TheNet:GetChildProcessError(). Upon detecting completion (status 3) or failure (error or status 0/1), it triggers the appropriate callback and removes itself from the UI stack.
Usage example
local popup = LaunchingServerPopup(
serverinfo,
function(info) print("Server started:", info.name) end,
function() print("Server failed to start") end
)
TheFrontEnd:PushScreen(popup)
Dependencies & tags
Components used: None identified
Tags: None identified
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
serverinfo | table | nil | Server configuration data passed to successCallback on successful launch. |
successCallback | function | nil | Callback invoked when the server reaches ready status (status == 3). |
errorCallback | function | nil | Callback invoked when an error is detected (hasError == true). |
launchtime | number | GetStaticTime() | Timestamp when the popup is instantiated. |
errorStartingServers | boolean | false | Internal flag set via SetErrorStartingServers() to force error state. |
worldgenscreen | Screen or nil | nil | Placeholder reference; commented-out code suggests potential usage but is unused in current build. |
Main functions
OnUpdate(dt)
- Description: Periodically checks the server process status and error state. Updates the dialog title during world generation and triggers callbacks or screen removal based on status changes.
- Parameters:
dt(number) — time elapsed since last frame. - Returns: Nothing.
- Error states: Performs screen removal and callback invocation under three conditions:
hasErroristrue: callserrorCallback(), pops itself and optionallyworldgenscreen.status == 2: updates dialog title to"SERVER_WORLDGEN".status == 3: callssuccessCallback(serverinfo), pops itself.
OnCancel()
- Description: Handles user-initiated cancellation. Stops all dedicated servers and removes the screen.
- Parameters: None.
- Returns: Nothing.
SetErrorStartingServers()
- Description: Sets the internal
errorStartingServersflag totrue, forcing the popup to treat the nextOnUpdatecycle as an error state. - Parameters: None.
- Returns: Nothing.
Events & listeners
None identified