Rename WithNukeLaunch* traits to WithSupportPower*.
This commit is contained in:
committed by
atlimit8
parent
52d0490f95
commit
bd1760682f
@@ -14,8 +14,8 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits.Render
|
||||
{
|
||||
[Desc("Replaces the building animation when `NukePower` is triggered.")]
|
||||
public class WithNukeLaunchAnimationInfo : ConditionalTraitInfo, Requires<WithSpriteBodyInfo>
|
||||
[Desc("Replaces the building animation when a support power is triggered.")]
|
||||
public class WithSupportPowerActivationAnimationInfo : ConditionalTraitInfo, Requires<WithSpriteBodyInfo>
|
||||
{
|
||||
[SequenceReference]
|
||||
[Desc("Sequence name to use")]
|
||||
@@ -24,14 +24,14 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
[Desc("Which sprite body to play the animation on.")]
|
||||
public readonly string Body = "body";
|
||||
|
||||
public override object Create(ActorInitializer init) { return new WithNukeLaunchAnimation(init.Self, this); }
|
||||
public override object Create(ActorInitializer init) { return new WithSupportPowerActivationAnimation(init.Self, this); }
|
||||
}
|
||||
|
||||
public class WithNukeLaunchAnimation : ConditionalTrait<WithNukeLaunchAnimationInfo>, INotifySupportPower
|
||||
public class WithSupportPowerActivationAnimation : ConditionalTrait<WithSupportPowerActivationAnimationInfo>, INotifySupportPower
|
||||
{
|
||||
readonly WithSpriteBody wsb;
|
||||
|
||||
public WithNukeLaunchAnimation(Actor self, WithNukeLaunchAnimationInfo info)
|
||||
public WithSupportPowerActivationAnimation(Actor self, WithSupportPowerActivationAnimationInfo info)
|
||||
: base(info)
|
||||
{
|
||||
wsb = self.TraitsImplementing<WithSpriteBody>().Single(w => w.Info.Name == Info.Body);
|
||||
@@ -14,8 +14,8 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits.Render
|
||||
{
|
||||
[Desc("Displays an overlay when `NukePower` is triggered.")]
|
||||
public class WithNukeLaunchOverlayInfo : ConditionalTraitInfo, Requires<RenderSpritesInfo>, Requires<BodyOrientationInfo>
|
||||
[Desc("Displays an overlay when a support power is triggered.")]
|
||||
public class WithSupportPowerActivationOverlayInfo : ConditionalTraitInfo, Requires<RenderSpritesInfo>, Requires<BodyOrientationInfo>
|
||||
{
|
||||
[SequenceReference]
|
||||
[Desc("Sequence name to use")]
|
||||
@@ -31,15 +31,15 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
[Desc("Custom palette is a player palette BaseName")]
|
||||
public readonly bool IsPlayerPalette = false;
|
||||
|
||||
public override object Create(ActorInitializer init) { return new WithNukeLaunchOverlay(init.Self, this); }
|
||||
public override object Create(ActorInitializer init) { return new WithSupportPowerActivationOverlay(init.Self, this); }
|
||||
}
|
||||
|
||||
public class WithNukeLaunchOverlay : ConditionalTrait<WithNukeLaunchOverlayInfo>, INotifySupportPower
|
||||
public class WithSupportPowerActivationOverlay : ConditionalTrait<WithSupportPowerActivationOverlayInfo>, INotifySupportPower
|
||||
{
|
||||
readonly Animation overlay;
|
||||
bool visible;
|
||||
|
||||
public WithNukeLaunchOverlay(Actor self, WithNukeLaunchOverlayInfo info)
|
||||
public WithSupportPowerActivationOverlay(Actor self, WithSupportPowerActivationOverlayInfo info)
|
||||
: base(info)
|
||||
{
|
||||
var rs = self.Trait<RenderSprites>();
|
||||
Reference in New Issue
Block a user