Merge pull request #7392 from abcdefg30/missiondiplomacy
Disable the diplomacy menu in mission or campaign maps
This commit is contained in:
@@ -86,7 +86,7 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
}
|
||||
|
||||
var statsButton = dialog.Get<ButtonWidget>("STATS_BUTTON");
|
||||
statsButton.IsVisible = () => !(world.Map.Type == "Mission" || world.Map.Type == "Campaign") || world.IsReplay;
|
||||
statsButton.IsVisible = () => !world.Map.Visibility.HasFlag(MapVisibility.MissionSelector) || world.IsReplay;
|
||||
statsButton.OnClick = () =>
|
||||
{
|
||||
showStats = true;
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
var diplomacy = widget.GetOrNull<MenuButtonWidget>("DIPLOMACY_BUTTON");
|
||||
if (diplomacy != null)
|
||||
{
|
||||
diplomacy.Visible = world.Players.Any(a => a != world.LocalPlayer && !a.NonCombatant);
|
||||
diplomacy.Visible = !world.Map.Visibility.HasFlag(MapVisibility.MissionSelector) && world.Players.Any(a => a != world.LocalPlayer && !a.NonCombatant);
|
||||
diplomacy.IsDisabled = () => disableSystemButtons;
|
||||
diplomacy.OnClick = () => OpenMenuPanel(diplomacy);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user