Differential D3715 Diff 16588 ps/trunk/binaries/data/mods/public/gui/gamesettings/attributes/PlayerCiv.js
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/gamesettings/attributes/PlayerCiv.js
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | onMapChange() | ||||
// Reset. | // Reset. | ||||
if (this.settings.map.type == "scenario" || | if (this.settings.map.type == "scenario" || | ||||
this.getMapSetting("PlayerData") && | this.getMapSetting("PlayerData") && | ||||
this.getMapSetting("PlayerData").some(data => data && data.Civ)) | this.getMapSetting("PlayerData").some(data => data && data.Civ)) | ||||
{ | { | ||||
this._resize(0); | this._resize(0); | ||||
this.maybeUpdate(); | this.maybeUpdate(); | ||||
} | } | ||||
else | |||||
{ | |||||
this.locked = this.locked.map(x => false); | |||||
this.trigger("locked"); | |||||
} | |||||
} | } | ||||
maybeUpdate() | maybeUpdate() | ||||
{ | { | ||||
this._resize(this.settings.playerCount.nbPlayers); | this._resize(this.settings.playerCount.nbPlayers); | ||||
this.values.forEach((c, i) => this._set(i, c)); | this.values.forEach((c, i) => this._set(i, c)); | ||||
this.trigger("values"); | this.trigger("values"); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator