Add order voice to GrantConditionOnDeploy.
This commit is contained in:
@@ -54,13 +54,15 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
[Desc("Skip make/deploy animation?")]
|
[Desc("Skip make/deploy animation?")]
|
||||||
public readonly bool SkipMakeAnimation = false;
|
public readonly bool SkipMakeAnimation = false;
|
||||||
|
|
||||||
|
[VoiceReference] public readonly string Voice = "Action";
|
||||||
|
|
||||||
public override object Create(ActorInitializer init) { return new GrantConditionOnDeploy(init, this); }
|
public override object Create(ActorInitializer init) { return new GrantConditionOnDeploy(init, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum DeployState { Undeployed, Deploying, Deployed, Undeploying }
|
public enum DeployState { Undeployed, Deploying, Deployed, Undeploying }
|
||||||
|
|
||||||
public class GrantConditionOnDeploy : PausableConditionalTrait<GrantConditionOnDeployInfo>, IResolveOrder, IIssueOrder, INotifyCreated,
|
public class GrantConditionOnDeploy : PausableConditionalTrait<GrantConditionOnDeployInfo>, IResolveOrder, IIssueOrder, INotifyCreated,
|
||||||
INotifyDeployComplete, IIssueDeployOrder
|
INotifyDeployComplete, IIssueDeployOrder, IOrderVoice
|
||||||
{
|
{
|
||||||
readonly Actor self;
|
readonly Actor self;
|
||||||
readonly bool checkTerrainType;
|
readonly bool checkTerrainType;
|
||||||
@@ -157,6 +159,11 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
self.QueueActivity(new DeployForGrantedCondition(self, this));
|
self.QueueActivity(new DeployForGrantedCondition(self, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string VoicePhraseForOrder(Actor self, Order order)
|
||||||
|
{
|
||||||
|
return order.OrderString == "GrantConditionOnDeploy" ? Info.Voice : null;
|
||||||
|
}
|
||||||
|
|
||||||
bool IsCursorBlocked()
|
bool IsCursorBlocked()
|
||||||
{
|
{
|
||||||
if (IsTraitPaused)
|
if (IsTraitPaused)
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
public string VoicePhraseForOrder(Actor self, Order order)
|
public string VoicePhraseForOrder(Actor self, Order order)
|
||||||
{
|
{
|
||||||
return (order.OrderString == "DeployTransform") ? Info.Voice : null;
|
return order.OrderString == "DeployTransform" ? Info.Voice : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CanDeploy()
|
public bool CanDeploy()
|
||||||
|
|||||||
@@ -355,6 +355,7 @@ JUGG:
|
|||||||
AllowedTerrainTypes: Clear, Road, DirtRoad, Rough
|
AllowedTerrainTypes: Clear, Road, DirtRoad, Rough
|
||||||
DeploySounds: place2.aud
|
DeploySounds: place2.aud
|
||||||
UndeploySounds: clicky1.aud
|
UndeploySounds: clicky1.aud
|
||||||
|
Voice: Move
|
||||||
GrantCondition@PREVIEWWORKAROUND:
|
GrantCondition@PREVIEWWORKAROUND:
|
||||||
Condition: real-actor
|
Condition: real-actor
|
||||||
QuantizeFacingsFromSequence:
|
QuantizeFacingsFromSequence:
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ TTNK:
|
|||||||
AllowedTerrainTypes: Clear, Road, DirtRoad, Rough
|
AllowedTerrainTypes: Clear, Road, DirtRoad, Rough
|
||||||
DeploySounds: place2.aud
|
DeploySounds: place2.aud
|
||||||
UndeploySounds: clicky1.aud
|
UndeploySounds: clicky1.aud
|
||||||
|
Voice: Move
|
||||||
GrantCondition@PREVIEWWORKAROUND:
|
GrantCondition@PREVIEWWORKAROUND:
|
||||||
Condition: real-actor
|
Condition: real-actor
|
||||||
WithVoxelBody:
|
WithVoxelBody:
|
||||||
@@ -244,6 +245,7 @@ ART2:
|
|||||||
AllowedTerrainTypes: Clear, Road, DirtRoad, Rough
|
AllowedTerrainTypes: Clear, Road, DirtRoad, Rough
|
||||||
DeploySounds: place2.aud
|
DeploySounds: place2.aud
|
||||||
UndeploySounds: clicky1.aud
|
UndeploySounds: clicky1.aud
|
||||||
|
Voice: Move
|
||||||
GrantCondition@PREVIEWWORKAROUND:
|
GrantCondition@PREVIEWWORKAROUND:
|
||||||
Condition: real-actor
|
Condition: real-actor
|
||||||
WithVoxelBody:
|
WithVoxelBody:
|
||||||
|
|||||||
@@ -152,6 +152,7 @@ LPST:
|
|||||||
AllowedTerrainTypes: Clear, Road, DirtRoad, Rough
|
AllowedTerrainTypes: Clear, Road, DirtRoad, Rough
|
||||||
DeploySounds: place2.aud
|
DeploySounds: place2.aud
|
||||||
UndeploySounds: clicky1.aud
|
UndeploySounds: clicky1.aud
|
||||||
|
Voice: Move
|
||||||
WithVoxelBody:
|
WithVoxelBody:
|
||||||
RequiresCondition: undeployed
|
RequiresCondition: undeployed
|
||||||
WithSpriteBody@deployed:
|
WithSpriteBody@deployed:
|
||||||
|
|||||||
Reference in New Issue
Block a user