From 120d7f9976b714135705b7a1b37214a33f909924 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Fri, 28 Jul 2017 16:02:02 +0200 Subject: [PATCH] WithHarvestAnimation style fixes Make interface implementations explicit. --- .../Traits/Render/WithHarvestAnimation.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/Render/WithHarvestAnimation.cs b/OpenRA.Mods.Common/Traits/Render/WithHarvestAnimation.cs index 2479bc6976..21f1f64777 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithHarvestAnimation.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithHarvestAnimation.cs @@ -31,6 +31,7 @@ namespace OpenRA.Mods.Common.Traits.Render readonly WithSpriteBody wsb; readonly Harvester harv; + // TODO: Remove this once WithSpriteBody has its own replacement public bool IsModifying; public WithHarvestAnimation(ActorInitializer init, WithHarvestAnimationInfo info) @@ -51,7 +52,7 @@ namespace OpenRA.Mods.Common.Traits.Render return baseSequence; } - public void Tick(Actor self) + void ITick.Tick(Actor self) { var baseSequence = wsb.NormalizeSequence(self, wsb.Info.Sequence); var sequence = NormalizeHarvesterSequence(self, baseSequence); @@ -59,7 +60,7 @@ namespace OpenRA.Mods.Common.Traits.Render wsb.DefaultAnimation.ReplaceAnim(sequence); } - public void Harvested(Actor self, ResourceType resource) + void INotifyHarvesterAction.Harvested(Actor self, ResourceType resource) { var baseSequence = wsb.NormalizeSequence(self, Info.HarvestSequence); var sequence = NormalizeHarvesterSequence(self, baseSequence); @@ -72,18 +73,18 @@ namespace OpenRA.Mods.Common.Traits.Render // If IsModifying isn't set to true, the docking animation // will be overridden by the WithHarvestAnimation fullness modifier. - public void Docked() + void INotifyHarvesterAction.Docked() { IsModifying = true; } - public void Undocked() + void INotifyHarvesterAction.Undocked() { IsModifying = false; } - public void MovingToResources(Actor self, CPos targetCell, Activity next) { } - public void MovingToRefinery(Actor self, CPos targetCell, Activity next) { } - public void MovementCancelled(Actor self) { } + void INotifyHarvesterAction.MovingToResources(Actor self, CPos targetCell, Activity next) { } + void INotifyHarvesterAction.MovingToRefinery(Actor self, CPos targetCell, Activity next) { } + void INotifyHarvesterAction.MovementCancelled(Actor self) { } } }