Add support for disabling IIssueDeployOrders.
This commit is contained in:
@@ -669,6 +669,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
return new Order("ReturnToBase", self, false);
|
||||
}
|
||||
|
||||
bool IIssueDeployOrder.CanIssueDeployOrder(Actor self) { return Info.RearmBuildings.Any(); }
|
||||
|
||||
public string VoicePhraseForOrder(Actor self, Order order)
|
||||
{
|
||||
if (!Info.MoveIntoShroud && !self.Owner.Shroud.IsExplored(order.TargetLocation))
|
||||
|
||||
@@ -58,6 +58,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
return new Order("Detonate", self, false);
|
||||
}
|
||||
|
||||
bool IIssueDeployOrder.CanIssueDeployOrder(Actor self) { return true; }
|
||||
|
||||
public string VoicePhraseForOrder(Actor self, Order order)
|
||||
{
|
||||
return info.Voice;
|
||||
|
||||
@@ -178,6 +178,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
return new Order("Unload", self, false);
|
||||
}
|
||||
|
||||
bool IIssueDeployOrder.CanIssueDeployOrder(Actor self) { return true; }
|
||||
|
||||
public void ResolveOrder(Actor self, Order order)
|
||||
{
|
||||
if (order.OrderString == "Unload")
|
||||
|
||||
@@ -138,6 +138,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
return new Order("GrantConditionOnDeploy", self, false);
|
||||
}
|
||||
|
||||
bool IIssueDeployOrder.CanIssueDeployOrder(Actor self) { return true; }
|
||||
|
||||
public void ResolveOrder(Actor self, Order order)
|
||||
{
|
||||
if (order.OrderString != "GrantConditionOnDeploy" || deployState == DeployState.Deploying || deployState == DeployState.Undeploying)
|
||||
|
||||
@@ -105,6 +105,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
return new Order("DeployTransform", self, false);
|
||||
}
|
||||
|
||||
bool IIssueDeployOrder.CanIssueDeployOrder(Actor self) { return !IsTraitPaused && !IsTraitDisabled; }
|
||||
|
||||
public void DeployTransform(bool queued)
|
||||
{
|
||||
if (!queued && !CanDeploy())
|
||||
|
||||
Reference in New Issue
Block a user