Disable maps with broken rules in the lobby. Fixes #4334.

This commit is contained in:
Paul Chote
2014-05-18 15:23:47 +12:00
parent 657ade7221
commit 69e87b0057
6 changed files with 140 additions and 13 deletions

View File

@@ -430,7 +430,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
var status = parent.Get<CheckboxWidget>("STATUS_CHECKBOX");
status.IsChecked = () => orderManager.LocalClient.IsReady || c.Bot != null;
status.IsVisible = () => true;
status.IsDisabled = () => c.Bot != null || map.Status != MapStatus.Available;
status.IsDisabled = () => c.Bot != null || map.Status != MapStatus.Available || map.RuleStatus != MapRuleStatus.Cached;
var state = orderManager.LocalClient.IsReady ? Session.ClientState.NotReady : Session.ClientState.Ready;
status.OnClick = () => orderManager.IssueOrder(Order.Command("state {0}".F(state)));