Merge pull request #9542 from reaperrr/WithRotorOverlay
Rename WithRotor to WithSpriteRotorOverlay
This commit is contained in:
@@ -441,7 +441,7 @@
|
||||
<Compile Include="Traits\Render\WithRepairAnimation.cs" />
|
||||
<Compile Include="Traits\Render\WithRepairOverlay.cs" />
|
||||
<Compile Include="Traits\Render\WithResources.cs" />
|
||||
<Compile Include="Traits\Render\WithRotor.cs" />
|
||||
<Compile Include="Traits\Render\WithSpriteRotorOverlay.cs" />
|
||||
<Compile Include="Traits\Render\WithShadow.cs" />
|
||||
<Compile Include="Traits\Render\WithSmoke.cs" />
|
||||
<Compile Include="Traits\Render\WithSpriteBody.cs" />
|
||||
|
||||
@@ -17,7 +17,7 @@ using OpenRA.Traits;
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Displays a helicopter rotor overlay.")]
|
||||
public class WithRotorInfo : ITraitInfo, IRenderActorPreviewSpritesInfo, Requires<RenderSpritesInfo>, Requires<BodyOrientationInfo>
|
||||
public class WithSpriteRotorOverlayInfo : ITraitInfo, IRenderActorPreviewSpritesInfo, Requires<RenderSpritesInfo>, Requires<BodyOrientationInfo>
|
||||
{
|
||||
[Desc("Sequence name to use when flying")]
|
||||
[SequenceReference] public readonly string Sequence = "rotor";
|
||||
@@ -28,7 +28,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Position relative to body")]
|
||||
public readonly WVec Offset = WVec.Zero;
|
||||
|
||||
public object Create(ActorInitializer init) { return new WithRotor(init.Self, this); }
|
||||
public object Create(ActorInitializer init) { return new WithSpriteRotorOverlay(init.Self, this); }
|
||||
|
||||
public IEnumerable<IActorPreview> RenderPreviewSprites(ActorPreviewInitializer init, RenderSpritesInfo rs, string image, int facings, PaletteReference p)
|
||||
{
|
||||
@@ -43,13 +43,13 @@ namespace OpenRA.Mods.Common.Traits
|
||||
}
|
||||
}
|
||||
|
||||
public class WithRotor : ITick
|
||||
public class WithSpriteRotorOverlay : ITick
|
||||
{
|
||||
readonly WithRotorInfo info;
|
||||
readonly WithSpriteRotorOverlayInfo info;
|
||||
readonly Animation rotorAnim;
|
||||
readonly IMove movement;
|
||||
|
||||
public WithRotor(Actor self, WithRotorInfo info)
|
||||
public WithSpriteRotorOverlay(Actor self, WithSpriteRotorOverlayInfo info)
|
||||
{
|
||||
this.info = info;
|
||||
var rs = self.Trait<RenderSprites>();
|
||||
@@ -2189,6 +2189,15 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
}
|
||||
}
|
||||
|
||||
if (engineVersion < 20151004)
|
||||
{
|
||||
if (depth == 1 && node.Key == "WithRotor")
|
||||
node.Key = "WithSpriteRotorOverlay";
|
||||
|
||||
if (depth == 1 && node.Key == "-WithRotor")
|
||||
node.Key = "-WithSpriteRotorOverlay";
|
||||
}
|
||||
|
||||
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user