Renamed WithHarvestAnimation to WithHarvestOverlay

This commit is contained in:
reaperrr
2015-06-23 20:15:57 +02:00
parent cd6c96db82
commit 1abe7ab2dc
5 changed files with 16 additions and 8 deletions

View File

@@ -422,7 +422,7 @@
<Compile Include="Traits\Render\WithDeathAnimation.cs" /> <Compile Include="Traits\Render\WithDeathAnimation.cs" />
<Compile Include="Traits\Render\WithDecoration.cs" /> <Compile Include="Traits\Render\WithDecoration.cs" />
<Compile Include="Traits\Render\WithDockingOverlay.cs" /> <Compile Include="Traits\Render\WithDockingOverlay.cs" />
<Compile Include="Traits\Render\WithHarvestAnimation.cs" /> <Compile Include="Traits\Render\WithHarvestOverlay.cs" />
<Compile Include="Traits\Render\WithIdleOverlay.cs" /> <Compile Include="Traits\Render\WithIdleOverlay.cs" />
<Compile Include="Traits\Render\WithMuzzleFlash.cs" /> <Compile Include="Traits\Render\WithMuzzleFlash.cs" />
<Compile Include="Traits\Render\WithRangeCircle.cs" /> <Compile Include="Traits\Render\WithRangeCircle.cs" />

View File

@@ -15,7 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits namespace OpenRA.Mods.Common.Traits
{ {
[Desc("Displays an overlay whenever resources are harvested by the actor.")] [Desc("Displays an overlay whenever resources are harvested by the actor.")]
class WithHarvestAnimationInfo : ITraitInfo, Requires<RenderSpritesInfo>, Requires<IBodyOrientationInfo> class WithHarvestOverlayInfo : ITraitInfo, Requires<RenderSpritesInfo>, Requires<IBodyOrientationInfo>
{ {
[Desc("Sequence name to use")] [Desc("Sequence name to use")]
[SequenceReference] public readonly string Sequence = "harvest"; [SequenceReference] public readonly string Sequence = "harvest";
@@ -25,16 +25,16 @@ namespace OpenRA.Mods.Common.Traits
public readonly string Palette = "effect"; public readonly string Palette = "effect";
public object Create(ActorInitializer init) { return new WithHarvestAnimation(init.Self, this); } public object Create(ActorInitializer init) { return new WithHarvestOverlay(init.Self, this); }
} }
class WithHarvestAnimation : INotifyHarvesterAction class WithHarvestOverlay : INotifyHarvesterAction
{ {
WithHarvestAnimationInfo info; WithHarvestOverlayInfo info;
Animation anim; Animation anim;
bool visible; bool visible;
public WithHarvestAnimation(Actor self, WithHarvestAnimationInfo info) public WithHarvestOverlay(Actor self, WithHarvestOverlayInfo info)
{ {
this.info = info; this.info = info;
var rs = self.Trait<RenderSprites>(); var rs = self.Trait<RenderSprites>();

View File

@@ -1221,6 +1221,14 @@ namespace OpenRA.Mods.Common.UtilityCommands
} }
} }
// Removed RenderUnit
if (engineVersion < 20150704)
{
// Renamed WithHarvestAnimation to WithHarvestOverlay
if (node.Key == "WithHarvestAnimation")
node.Key = "WithHarvestOverlay";
}
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1); UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
} }
} }

View File

@@ -81,7 +81,7 @@ harvester:
-RenderSprites: -RenderSprites:
-WithFacingSpriteBody: -WithFacingSpriteBody:
-AutoSelectionSize: -AutoSelectionSize:
WithHarvestAnimation: WithHarvestOverlay:
Palette: effect50alpha Palette: effect50alpha
AttractsWorms: AttractsWorms:
Intensity: 700 Intensity: 700

View File

@@ -82,7 +82,7 @@ HARV:
WithVoxelUnloadBody: WithVoxelUnloadBody:
Explodes: Explodes:
Weapon: TiberiumExplosion Weapon: TiberiumExplosion
WithHarvestAnimation: WithHarvestOverlay:
Offset: 384,0,0 Offset: 384,0,0
Palette: effect Palette: effect
SelectionDecorations: SelectionDecorations: