Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/gamesettings/attributes/Map.js
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | if (this.type == "random" && this.data) | ||||
this.script = this.data.settings.Script; | this.script = this.data.settings.Script; | ||||
else | else | ||||
this.script = undefined; | this.script = undefined; | ||||
} | } | ||||
pickRandomItems() | pickRandomItems() | ||||
{ | { | ||||
if (this.map !== "random") | if (this.map !== "random") | ||||
return false; | return { "picked": false, "hasValue": true }; | ||||
this.selectMap(pickRandom(this.randomOptions)); | this.selectMap(pickRandom(this.randomOptions)); | ||||
return true; | return { "picked": true, "hasValue": true }; | ||||
} | } | ||||
setRandomOptions(options) | setRandomOptions(options) | ||||
{ | { | ||||
this.randomOptions = clone(options); | this.randomOptions = clone(options); | ||||
if (this.randomOptions.indexOf("random") !== -1) | if (this.randomOptions.indexOf("random") !== -1) | ||||
this.randomOptions.splice(this.randomOptions.indexOf("random"), 1); | this.randomOptions.splice(this.randomOptions.indexOf("random"), 1); | ||||
} | } | ||||
}; | }; |
Wildfire Games · Phabricator