Implementation of the automated D2k Carryall

Closes #2246
This commit is contained in:
Matthijs Benschop
2014-11-20 16:14:29 +01:00
parent 71a8815ffb
commit 2d380c64bd
22 changed files with 681 additions and 21 deletions

View File

@@ -10,6 +10,7 @@
using OpenRA.Graphics;
using OpenRA.Traits;
using OpenRA.Mods.Common;
namespace OpenRA.Mods.RA.Render
{
@@ -19,7 +20,7 @@ namespace OpenRA.Mods.RA.Render
public override object Create(ActorInitializer init) { return new RenderHarvester(init.self, this); }
}
class RenderHarvester : RenderUnit, INotifyHarvest
class RenderHarvester : RenderUnit, INotifyHarvesterAction
{
Harvester harv;
RenderHarvesterInfo info;
@@ -51,5 +52,9 @@ namespace OpenRA.Mods.RA.Render
if (DefaultAnimation.CurrentSequence.Name != "harvest")
PlayCustomAnim(self, "harvest");
}
public void MovingToResources(Actor self, CPos targetCell, Activity next) { }
public void MovingToRefinery(Actor self, CPos targetCell, Activity next) { }
public void MovementCancelled(Actor self) { }
}
}

View File

@@ -9,6 +9,7 @@
#endregion
using OpenRA.Graphics;
using OpenRA.Mods.Common;
using OpenRA.Mods.Common.Traits.Render;
using OpenRA.Traits;
@@ -26,7 +27,7 @@ namespace OpenRA.Mods.RA.Render
public object Create(ActorInitializer init) { return new WithHarvestAnimation(init.self, this); }
}
class WithHarvestAnimation : INotifyHarvest
class WithHarvestAnimation : INotifyHarvesterAction
{
WithHarvestAnimationInfo info;
Animation anim;
@@ -55,5 +56,9 @@ namespace OpenRA.Mods.RA.Render
visible = true;
anim.PlayThen(info.Sequence, () => visible = false);
}
public void MovingToResources(Actor self, CPos targetCell, Activity next) { }
public void MovingToRefinery(Actor self, CPos targetCell, Activity next) { }
public void MovementCancelled(Actor self) { }
}
}