Differential D4678 Diff 20394 binaries/data/mods/public/gamesettings/attributes/VictoryConditions.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gamesettings/attributes/VictoryConditions.js
Show All 23 Lines | GameSettings.prototype.Attributes.VictoryConditions = class VictoryConditions extends GameSetting | ||||
toInitAttributes(attribs) | toInitAttributes(attribs) | ||||
{ | { | ||||
attribs.settings.VictoryConditions = Array.from(this.active); | attribs.settings.VictoryConditions = Array.from(this.active); | ||||
} | } | ||||
fromInitAttributes(attribs) | fromInitAttributes(attribs) | ||||
{ | { | ||||
let legacy = this.getLegacySetting(attribs, "VictoryConditions"); | let legacy = this.getLegacySetting(attribs, "VictoryConditions").filter(cond => cond in this.conditions) | ||||
Lint: prefer-const: 'legacy' is never reassigned. Use 'const' instead. | |||||
Lint: semi Missing semicolon. Lint: semi: Missing semicolon. | |||||
if (legacy) | if (legacy) | ||||
{ | { | ||||
this.disabled = new Set(); | this.disabled = new Set(); | ||||
this.active = new Set(); | this.active = new Set(); | ||||
for (let cond of legacy) | for (let cond of legacy) | ||||
this._add(cond); | this._add(cond); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
'legacy' is never reassigned. Use 'const' instead.