Disable hide map crate if explored map is enabled.
This commit is contained in:
@@ -77,6 +77,7 @@ namespace OpenRA.Traits
|
|||||||
|
|
||||||
bool fogEnabled;
|
bool fogEnabled;
|
||||||
public bool FogEnabled { get { return !Disabled && fogEnabled; } }
|
public bool FogEnabled { get { return !Disabled && fogEnabled; } }
|
||||||
|
public bool ExploreMapEnabled { get; private set; }
|
||||||
|
|
||||||
public int Hash { get; private set; }
|
public int Hash { get; private set; }
|
||||||
|
|
||||||
@@ -96,8 +97,8 @@ namespace OpenRA.Traits
|
|||||||
var gs = self.World.LobbyInfo.GlobalSettings;
|
var gs = self.World.LobbyInfo.GlobalSettings;
|
||||||
fogEnabled = gs.OptionOrDefault("fog", info.FogEnabled);
|
fogEnabled = gs.OptionOrDefault("fog", info.FogEnabled);
|
||||||
|
|
||||||
var exploreMap = gs.OptionOrDefault("explored", info.ExploredMapEnabled);
|
ExploreMapEnabled = gs.OptionOrDefault("explored", info.ExploredMapEnabled);
|
||||||
if (exploreMap)
|
if (ExploreMapEnabled)
|
||||||
self.World.AddFrameEndTask(w => ExploreAll());
|
self.World.AddFrameEndTask(w => ExploreAll());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
public override int GetSelectionShares(Actor collector)
|
public override int GetSelectionShares(Actor collector)
|
||||||
{
|
{
|
||||||
// Don't ever hide the map for people who have GPS.
|
// Don't hide the map if the shroud is force-revealed
|
||||||
if (collector.Owner.HasFogVisibility)
|
if (collector.Owner.HasFogVisibility || collector.Owner.Shroud.ExploreMapEnabled)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return base.GetSelectionShares(collector);
|
return base.GetSelectionShares(collector);
|
||||||
|
|||||||
Reference in New Issue
Block a user