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>();
|
||||
35
OpenRA.Mods.Common/UpdateRules/Rules/RenameWithNukeLaunch.cs
Normal file
35
OpenRA.Mods.Common/UpdateRules/Rules/RenameWithNukeLaunch.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2020 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version. For more
|
||||
* information, see COPYING.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenRA.Mods.Common.UpdateRules.Rules
|
||||
{
|
||||
class RenameWithNukeLaunch : UpdateRule
|
||||
{
|
||||
public override string Name { get { return "Renamed WithNukeLaunchAnimation and Overlay"; } }
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return "`WithNukeLaunchAnimation` has been renamed to `WithSupportPowerActivationAnimation` and `WithNukeLaunchOverlay` to `WithSupportPowerActivationOverlay`.";
|
||||
}
|
||||
}
|
||||
|
||||
public override IEnumerable<string> UpdateActorNode(ModData modData, MiniYamlNode actorNode)
|
||||
{
|
||||
actorNode.RenameChildrenMatching("WithNukeLaunchAnimation", "WithSupportPowerActivationAnimation", true);
|
||||
actorNode.RenameChildrenMatching("WithNukeLaunchOverlay", "WithSupportPowerActivationOverlay", true);
|
||||
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -82,6 +82,7 @@ namespace OpenRA.Mods.Common.UpdateRules
|
||||
new ModernizeDecorationTraits(),
|
||||
new RenameInfiltrationNotifications(),
|
||||
new MoveClassicFacingFudge(),
|
||||
new RenameWithNukeLaunch()
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
@@ -813,9 +813,9 @@ TMPL:
|
||||
CircleSequence: circles
|
||||
SupportPowerPaletteOrder: 30
|
||||
WithBuildingBib:
|
||||
WithNukeLaunchAnimation:
|
||||
WithSupportPowerActivationAnimation:
|
||||
RequiresCondition: !build-incomplete
|
||||
WithNukeLaunchOverlay:
|
||||
WithSupportPowerActivationOverlay:
|
||||
RequiresCondition: !build-incomplete
|
||||
Sequence: smoke
|
||||
SupportPowerChargeBar:
|
||||
|
||||
@@ -1038,7 +1038,7 @@ palace:
|
||||
corrino: palace.corrino
|
||||
WithBuildingBib:
|
||||
HasMinibib: True
|
||||
WithNukeLaunchOverlay:
|
||||
WithSupportPowerActivationOverlay:
|
||||
RequiresCondition: !build-incomplete && !launchpad-damaged && harkonnen
|
||||
GrantConditionOnDamageState@LAUNCHPADDAMAGED:
|
||||
Condition: launchpad-damaged
|
||||
|
||||
@@ -66,7 +66,7 @@ MSLO:
|
||||
Amount: -150
|
||||
MustBeDestroyed:
|
||||
RequiredForShortGame: false
|
||||
WithNukeLaunchAnimation:
|
||||
WithSupportPowerActivationAnimation:
|
||||
RequiresCondition: !build-incomplete
|
||||
|
||||
GAP:
|
||||
|
||||
@@ -495,7 +495,7 @@ NAMISL:
|
||||
TrailPalette: effectalpha75
|
||||
TrailInterval: 0
|
||||
TrailSequences: idle
|
||||
WithNukeLaunchOverlay:
|
||||
WithSupportPowerActivationOverlay:
|
||||
|
||||
NAWAST:
|
||||
Inherits: ^Building
|
||||
|
||||
Reference in New Issue
Block a user