Differential D2982 Diff 13468 binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns/MapSize.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns/MapSize.js
Show All 11 Lines | GameSettingControls.MapSize = class extends GameSettingControlDropdown | ||||
onHoverChange() | onHoverChange() | ||||
{ | { | ||||
this.dropdown.tooltip = g_MapSizes.Tooltip[this.dropdown.hovered] || this.Tooltip; | this.dropdown.tooltip = g_MapSizes.Tooltip[this.dropdown.hovered] || this.Tooltip; | ||||
} | } | ||||
onMapChange(mapData) | onMapChange(mapData) | ||||
{ | { | ||||
let mapValue = | let mapValue; | ||||
mapData && | if (mapData && | ||||
mapData.settings && | mapData.settings && | ||||
mapData.settings.Size || undefined; | mapData.settings.Size !== undefined) | ||||
mapValue = mapData.settings.Size; | |||||
Freagarach: Does a map size of `0` make sense? | |||||
if (g_GameAttributes.mapType == "random" && mapValue !== undefined && mapValue != g_GameAttributes.settings.Size) | if (g_GameAttributes.mapType == "random" && mapValue !== undefined && mapValue != g_GameAttributes.settings.Size) | ||||
{ | { | ||||
g_GameAttributes.settings.Size = mapValue; | g_GameAttributes.settings.Size = mapValue; | ||||
this.gameSettingsControl.updateGameAttributes(); | this.gameSettingsControl.updateGameAttributes(); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Does a map size of 0 make sense?