Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/gamesetup/Controls/GameSettingsControl.js
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | class GameSettingsControl | ||||
{ | { | ||||
this.pickRandomItemsHandlers.delete(handler); | this.pickRandomItemsHandlers.delete(handler); | ||||
} | } | ||||
onLoad(initData, hotloadData) | onLoad(initData, hotloadData) | ||||
{ | { | ||||
if (initData && initData.map && initData.mapType) | if (initData && initData.map && initData.mapType) | ||||
{ | { | ||||
if (initData.autostart) | |||||
Object.defineProperty(this, "autostart", { | Object.defineProperty(this, "autostart", { | ||||
"value": true, | "value": true, | ||||
"writable": false, | "writable": false, | ||||
"configurable": false | "configurable": false | ||||
}); | }); | ||||
// TODO: Fix g_GameAttributes, g_GameAttributes.settings, | // TODO: Fix g_GameAttributes, g_GameAttributes.settings, | ||||
// g_GameAttributes.settings.PlayerData object references and | // g_GameAttributes.settings.PlayerData object references and | ||||
// copy over each attribute individually when receiving | // copy over each attribute individually when receiving | ||||
// settings from the server or the local file. | // settings from the server or the local file. | ||||
g_GameAttributes = { | g_GameAttributes = initData; | ||||
"mapType": initData.mapType, | |||||
"map": initData.map | |||||
}; | |||||
this.updateGameAttributes(); | this.updateGameAttributes(); | ||||
// Don't launchGame before all Load handlers finished | // Don't launchGame before all Load handlers finished | ||||
} | } | ||||
else | else | ||||
{ | { | ||||
if (hotloadData) | if (hotloadData) | ||||
g_GameAttributes = hotloadData.gameAttributes; | g_GameAttributes = hotloadData.gameAttributes; | ||||
▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator