Differential D4231 Diff 18466 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 34 Lines | GameSettings.prototype.Attributes.TeamPlacement = class TeamPlacement extends GameSetting | ||||
setValue(val) | setValue(val) | ||||
{ | { | ||||
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" || this.value !== "random") | ||||
return true; | |||||
if (this.value !== "random") | |||||
return false; | return false; | ||||
this.value = pickRandom(this.available).Id; | this.value = pickRandom(this.available).Id; | ||||
return true; | return true; | ||||
} | } | ||||
}; | }; | ||||
GameSettings.prototype.Attributes.TeamPlacement.prototype.StartingPositions = [ | GameSettings.prototype.Attributes.TeamPlacement.prototype.StartingPositions = [ | ||||
{ | { | ||||
Show All 20 Lines |
Wildfire Games · Phabricator