Index: ps/trunk/binaries/data/mods/public/gui/common/gamedescription.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/common/gamedescription.js +++ ps/trunk/binaries/data/mods/public/gui/common/gamedescription.js @@ -394,13 +394,13 @@ }); titles.push({ - "label": translate("Revealed Map"), - "value": initAttributes.settings.RevealMap + "label": translate("Explored Map"), + "value": initAttributes.settings.ExploreMap }); titles.push({ - "label": translate("Explored Map"), - "value": initAttributes.settings.ExploreMap + "label": translate("Revealed Map"), + "value": initAttributes.settings.RevealMap }); titles.push({ Index: ps/trunk/binaries/data/mods/public/gui/gamesettings/attributes/PlayerCiv.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/gamesettings/attributes/PlayerCiv.js +++ ps/trunk/binaries/data/mods/public/gui/gamesettings/attributes/PlayerCiv.js @@ -59,6 +59,11 @@ this._resize(0); this.maybeUpdate(); } + else + { + this.locked = this.locked.map(x => false); + this.trigger("locked"); + } } maybeUpdate() Index: ps/trunk/binaries/data/mods/public/gui/gamesettings/attributes/PlayerColor.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/gamesettings/attributes/PlayerColor.js +++ ps/trunk/binaries/data/mods/public/gui/gamesettings/attributes/PlayerColor.js @@ -57,14 +57,14 @@ onMapChange() { // Reset. - if (this.settings.map.type == "scenario" || - this.getMapSetting("PlayerData") && - this.getMapSetting("PlayerData").some(data => data && data.Color)) - { + this.locked = this.locked.map(x => this.settings.map.type == "scenario"); + this.trigger("locked"); + + if (this.settings.map.type === "scenario") this._resize(0); - this._updateAvailable(); - this.maybeUpdate(); - } + this._updateAvailable(); + this.maybeUpdate(); + this.maybeUpdate(); } maybeUpdate() @@ -82,10 +82,18 @@ sameColor(color, otherColor)); if (inUse !== -1 && inUse !== playerIndex) { - // Swap colors. - let col = this.values[playerIndex]; - this.values[playerIndex] = undefined; - this._set(inUse, col); + if (sameColor(this.values[playerIndex], this.values[inUse])) + { + this.values[playerIndex] = undefined; + color = undefined; + } + else + { + // Swap colors. + let col = this.values[playerIndex]; + this.values[playerIndex] = undefined; + this._set(inUse, col); + } } if (!color || this.available.indexOf(color) == -1) { Index: ps/trunk/binaries/data/mods/public/gui/gamesettings/attributes/PlayerTeam.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/gamesettings/attributes/PlayerTeam.js +++ ps/trunk/binaries/data/mods/public/gui/gamesettings/attributes/PlayerTeam.js @@ -52,6 +52,8 @@ onMapChange() { + this.locked = this.locked.map(x => this.settings.map.type === "scenario"); + this.trigger("locked"); if (this.settings.map.type === "random") return; let pData = this.getMapSetting("PlayerData"); @@ -72,7 +74,6 @@ _set(playerIndex, value) { this.values[playerIndex] = value; - this.locked[playerIndex] = this.settings.map.type == "scenario"; } setValue(playerIndex, val) Index: ps/trunk/binaries/data/mods/public/gui/gamesetup/Pages/AIConfigPage/AIGameSettingControl.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/gamesetup/Pages/AIConfigPage/AIGameSettingControl.js +++ ps/trunk/binaries/data/mods/public/gui/gamesetup/Pages/AIConfigPage/AIGameSettingControl.js @@ -2,10 +2,22 @@ { onOpenPage(playerIndex) { + this.setEnabled(true); this.playerIndex = playerIndex; this.render(); } + /** + * Overloaded: no need to trigger a relayout, + * but updateVisibility must be called manually + * as the AI control manager does not subscribe to updateLayout. + */ + setHidden(hidden) + { + this.hidden = hidden; + this.updateVisibility(); + } + setControl(aiConfigPage) { aiConfigPage.registerOpenPageHandler(this.onOpenPage.bind(this)); Index: ps/trunk/binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns/PopulationCap.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns/PopulationCap.js +++ ps/trunk/binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Dropdowns/PopulationCap.js @@ -4,8 +4,6 @@ { super(...args); - this.perPlayer = false; - this.dropdown.list = g_PopulationCapacities.Title; this.dropdown.list_data = g_PopulationCapacities.Population; @@ -19,7 +17,7 @@ render() { this.setHidden(g_GameSettings.population.useWorldPop); - this.setEnabled(!g_GameSettings.map.type == "scenario" && !g_GameSettings.population.perPlayer); + this.setEnabled(g_GameSettings.map.type != "scenario" && !g_GameSettings.population.perPlayer); if (g_GameSettings.population.perPlayer) this.label.caption = this.PerPlayerCaption; else