Differential D4231 Diff 18462 binaries/data/mods/public/gui/gamesettings/attributes/TeamPlacement.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/gamesettings/attributes/TeamPlacement.js
Show All 35 Lines | GameSettings.prototype.Attributes.TeamPlacement = class TeamPlacement extends GameSetting | ||||
{ | { | ||||
this.value = val; | this.value = val; | ||||
} | } | ||||
pickRandomItems() | pickRandomItems() | ||||
{ | { | ||||
// If the map is random, we need to wait until it is selected. | // If the map is random, we need to wait until it is selected. | ||||
if (this.settings.map.map === "random") | if (this.settings.map.map === "random") | ||||
return true; | return { "picked": false, "hasValue": false }; | ||||
if (this.value !== "random") | if (this.value !== "random") | ||||
return false; | return { "picked": false, "hasValue": true }; | ||||
this.value = pickRandom(this.available).Id; | this.value = pickRandom(this.available).Id; | ||||
return true; | return { "picked": true, "hasValue": true }; | ||||
} | } | ||||
}; | }; | ||||
GameSettings.prototype.Attributes.TeamPlacement.prototype.StartingPositions = [ | GameSettings.prototype.Attributes.TeamPlacement.prototype.StartingPositions = [ | ||||
{ | { | ||||
"Id": "radial", | "Id": "radial", | ||||
"Name": translateWithContext("team placement", "Circle"), | "Name": translateWithContext("team placement", "Circle"), | ||||
Show All 18 Lines |
Wildfire Games · Phabricator