Index: binaries/data/mods/public/gui/gamesettings/attributes/MapExploration.js =================================================================== --- binaries/data/mods/public/gui/gamesettings/attributes/MapExploration.js +++ binaries/data/mods/public/gui/gamesettings/attributes/MapExploration.js @@ -1,12 +1,16 @@ GameSettings.prototype.Attributes.MapExploration = class MapExploration extends GameSetting { init() + { + this.resetAll(); + this.settings.map.watch(() => this.onMapChange(), ["map"]); + } + + resetAll() { this.explored = false; this.revealed = false; this.allied = false; - - this.settings.map.watch(() => this.onMapChange(), ["map"]); } toInitAttributes(attribs) @@ -27,6 +31,7 @@ { if (this.settings.map.type != "scenario") return; + this.resetAll(); this.setExplored(this.getMapSetting("ExploreMap")); this.setRevealed(this.getMapSetting("RevealMap")); this.setAllied(this.getMapSetting("AllyView")); @@ -34,12 +39,16 @@ setExplored(enabled) { + if (enabled === undefined) + return; this.explored = enabled; this.revealed = this.revealed && this.explored; } setRevealed(enabled) { + if (enabled === undefined) + return; this.explored = this.explored || enabled; this.revealed = enabled; this.allied = this.allied || enabled; @@ -47,6 +56,8 @@ setAllied(enabled) { + if (enabled === undefined) + return; this.allied = enabled; this.revealed = this.revealed && this.allied; }