Differential D2982 Diff 13468 binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Checkboxes/Nomad.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Checkboxes/Nomad.js
GameSettingControls.Nomad = class extends GameSettingControlCheckbox | GameSettingControls.Nomad = class extends GameSettingControlCheckbox | ||||
{ | { | ||||
onMapChange(mapData) | onMapChange(mapData) | ||||
{ | { | ||||
let available = g_GameAttributes.mapType == "random"; | let available = g_GameAttributes.mapType == "random"; | ||||
this.setHidden(!available); | this.setHidden(!available); | ||||
if (!available) | if (!available) | ||||
return; | return; | ||||
let mapValue = | let mapValue; | ||||
mapData && | if (mapData && | ||||
mapData.settings && | mapData.settings && | ||||
mapData.settings.Nomad; | mapData.settings.Nomad !== undefined) | ||||
mapValue = mapData.settings.Nomad; | |||||
if (mapValue !== undefined && mapValue != g_GameAttributes.settings.Nomad) | if (mapValue !== undefined && mapValue != g_GameAttributes.settings.Nomad) | ||||
{ | { | ||||
g_GameAttributes.settings.Nomad = mapValue; | g_GameAttributes.settings.Nomad = mapValue; | ||||
this.gameSettingsControl.updateGameAttributes(); | this.gameSettingsControl.updateGameAttributes(); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator