diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index f08f6c0617..10188907f4 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -422,7 +422,7 @@ - + diff --git a/OpenRA.Mods.Common/Traits/Render/WithHarvestAnimation.cs b/OpenRA.Mods.Common/Traits/Render/WithHarvestOverlay.cs similarity index 86% rename from OpenRA.Mods.Common/Traits/Render/WithHarvestAnimation.cs rename to OpenRA.Mods.Common/Traits/Render/WithHarvestOverlay.cs index b8c494ed74..ccb9bdc602 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithHarvestAnimation.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithHarvestOverlay.cs @@ -15,7 +15,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits { [Desc("Displays an overlay whenever resources are harvested by the actor.")] - class WithHarvestAnimationInfo : ITraitInfo, Requires, Requires + class WithHarvestOverlayInfo : ITraitInfo, Requires, Requires { [Desc("Sequence name to use")] [SequenceReference] public readonly string Sequence = "harvest"; @@ -25,16 +25,16 @@ namespace OpenRA.Mods.Common.Traits 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; bool visible; - public WithHarvestAnimation(Actor self, WithHarvestAnimationInfo info) + public WithHarvestOverlay(Actor self, WithHarvestOverlayInfo info) { this.info = info; var rs = self.Trait(); diff --git a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs index ca08b7992b..89d4a01988 100644 --- a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs +++ b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs @@ -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); } } diff --git a/mods/d2k/rules/vehicles.yaml b/mods/d2k/rules/vehicles.yaml index 6e063bdf4e..84f4b6bc43 100644 --- a/mods/d2k/rules/vehicles.yaml +++ b/mods/d2k/rules/vehicles.yaml @@ -81,7 +81,7 @@ harvester: -RenderSprites: -WithFacingSpriteBody: -AutoSelectionSize: - WithHarvestAnimation: + WithHarvestOverlay: Palette: effect50alpha AttractsWorms: Intensity: 700 diff --git a/mods/ts/rules/shared-vehicles.yaml b/mods/ts/rules/shared-vehicles.yaml index 5bd05555a5..5582a185df 100644 --- a/mods/ts/rules/shared-vehicles.yaml +++ b/mods/ts/rules/shared-vehicles.yaml @@ -82,7 +82,7 @@ HARV: WithVoxelUnloadBody: Explodes: Weapon: TiberiumExplosion - WithHarvestAnimation: + WithHarvestOverlay: Offset: 384,0,0 Palette: effect SelectionDecorations: