Make the command bar directly check if a GuardOrderGenerator is active
This commit is contained in:
@@ -114,8 +114,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
BindButtonIcon(guardButton);
|
||||
|
||||
guardButton.IsDisabled = () => { UpdateStateIfNecessary(); return guardDisabled; };
|
||||
guardButton.IsHighlighted = () => world.OrderGenerator is GenericSelectTarget
|
||||
&& ((GenericSelectTarget)world.OrderGenerator).OrderName == "Guard";
|
||||
guardButton.IsHighlighted = () => world.OrderGenerator is GuardOrderGenerator;
|
||||
|
||||
Action<bool> toggle = allowCancel =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user