Changeset View
Changeset View
Standalone View
Standalone View
./gui/session/session.js
Context not available. | |||||
} | } | ||||
return g_TechnologyData[technologyName]; | return g_TechnologyData[technologyName]; | ||||
} | } | ||||
var g_ServerIP; | |||||
var g_ServerPort; | |||||
function init(initData, hotloadData) | function init(initData, hotloadData) | ||||
{ | { | ||||
if (!g_Settings) | if (!g_Settings) | ||||
{ | { | ||||
Engine.EndGame(); | Engine.EndGame(); | ||||
Engine.SwitchGuiPage("page_pregame.xml"); | Engine.SwitchGuiPage("page_pregame.xml"); | ||||
return; | return; | ||||
} | } | ||||
warn("initData " + uneval(initData)); | |||||
warn("initDataIP " + uneval(initData.serverIP)); | |||||
warn("hotloadData " + uneval(hotloadData)); | |||||
g_ServerIP = initData.serverIP; | |||||
g_ServerPort = initData.serverPort; | |||||
if (initData) | if (initData) | ||||
{ | { | ||||
g_IsNetworked = initData.isNetworked; | g_IsNetworked = initData.isNetworked; | ||||
g_IsController = initData.isController; | g_IsController = initData.isController; | ||||
Context not available. | |||||
"buildDate": Engine.GetBuildTimestamp(0), | "buildDate": Engine.GetBuildTimestamp(0), | ||||
"revision": Engine.GetBuildTimestamp(2) | "revision": Engine.GetBuildTimestamp(2) | ||||
}); | }); | ||||
} | } | ||||
function toggleReplace() | |||||
{ | |||||
let selected = Engine.GetGUIObjectByName("viewPlayer").selected; | |||||
if (selected <= 1) return; | |||||
let player = g_Players[Engine.GetGUIObjectByName("viewPlayer").selected -1 ]; | |||||
Engine.EndGame(); | |||||
Engine.SwitchGuiPage("page_gamesetup_mp.xml", { multiplayerGameType: "join" ,name: player.name, ip: g_ServerIP, port: g_ServerPort}); | |||||
} | |||||
function showTimeWarpMessageBox() | function showTimeWarpMessageBox() | ||||
{ | { | ||||
messageBox( | messageBox( | ||||
500, 250, | 500, 250, | ||||
translate("Note: time warp mode is a developer option, and not intended for use over long periods of time. Using it incorrectly may cause the game to run out of memory or crash."), | translate("Note: time warp mode is a developer option, and not intended for use over long periods of time. Using it incorrectly may cause the game to run out of memory or crash."), | ||||
Context not available. |
Wildfire Games · Phabricator