Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/gamesetup/gamesetup.js
Show First 20 Lines • Show All 975 Lines • ▼ Show 20 Lines | if (["offline", "server", "client"].indexOf(attribs.type) == -1) | ||||
error("Unexpected 'type' in gamesetup init: " + attribs.type); | error("Unexpected 'type' in gamesetup init: " + attribs.type); | ||||
cancelSetup(); | cancelSetup(); | ||||
return; | return; | ||||
} | } | ||||
g_IsNetworked = attribs.type != "offline"; | g_IsNetworked = attribs.type != "offline"; | ||||
g_IsController = attribs.type != "client"; | g_IsController = attribs.type != "client"; | ||||
g_IsTutorial = !!attribs.tutorial; | g_IsTutorial = !!attribs.tutorial; | ||||
g_ServerName = attribs.serverName; | |||||
g_ServerPort = attribs.serverPort; | g_ServerPort = attribs.serverPort; | ||||
g_StunEndpoint = attribs.stunEndpoint; | g_StunEndpoint = attribs.stunEndpoint; | ||||
if (g_IsNetworked) | |||||
{ | |||||
g_ServerName = Engine.GetServerName(); | |||||
let serverName = Engine.GetGUIObjectByName("serverName"); | |||||
serverName.hidden = false; | |||||
serverName.caption = sprintf(translate("Server name: %(serverName)s"), { "serverName": g_ServerName } ); | |||||
bb: spaces | |||||
} | |||||
if (!g_IsNetworked) | if (!g_IsNetworked) | ||||
g_PlayerAssignments = { | g_PlayerAssignments = { | ||||
"local": { | "local": { | ||||
"name": singleplayerName(), | "name": singleplayerName(), | ||||
"player": 1 | "player": 1 | ||||
} | } | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 1,434 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
spaces