Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/gamesettings/attributes/Biome.js
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | getData() | ||||
if (!this.biome) | if (!this.biome) | ||||
return undefined; | return undefined; | ||||
return this.biomeData[this.biome]; | return this.biomeData[this.biome]; | ||||
} | } | ||||
pickRandomItems() | pickRandomItems() | ||||
{ | { | ||||
// If the map is random, we need to wait until it selects to know if we need to pick a biome. | // If the map is random, we need to wait until it selects to know if we need to pick a biome. | ||||
if (this.settings.map.map === "random") | if (this.settings.map.map === "random" || this.biome !== "random") | ||||
return true; | |||||
if (this.biome !== "random") | |||||
return false; | return false; | ||||
this.biome = pickRandom(Array.from(this.available)); | this.biome = pickRandom(Array.from(this.available)); | ||||
return true; | return true; | ||||
Silier: hasValue true? | |||||
Not Done Inline ActionsFeels like it could be one line return { "picked": this.settings.map.map !== "random" && this.biome === "random" "hasValue": this.settings.map.map !== "random" }; Pls double check Stan: Feels like it could be one line
```lang=js
return {
"picked": this.settings.map.map !==… | |||||
Done Inline ActionsWhere did this.biome = pickRandom(Array.from(this.available)); go? bb: Where did `this.biome = pickRandom(Array.from(this.available));` go? | |||||
} | } | ||||
}; | }; |
Wildfire Games · Phabricator
hasValue true?