fixed d2k harvester dock animation

This commit is contained in:
Matthias Mailänder
2012-07-17 22:03:30 +02:00
parent 44b8630c71
commit 25fae5d109
5 changed files with 10 additions and 6 deletions

View File

@@ -21,13 +21,15 @@ namespace OpenRA.Mods.RA
enum State { Wait, Turn, Dock, Loop, Undock, Complete };
readonly Actor proc;
readonly int angle;
readonly Harvester harv;
readonly RenderUnit ru;
State state;
public RAHarvesterDockSequence(Actor self, Actor proc)
public RAHarvesterDockSequence(Actor self, Actor proc, int angle)
{
this.proc = proc;
this.angle = angle;
state = State.Turn;
harv = self.Trait<Harvester>();
ru = self.Trait<RenderUnit>();
@@ -41,7 +43,7 @@ namespace OpenRA.Mods.RA
return this;
case State.Turn:
state = State.Dock;
return Util.SequenceActivities(new Turn(64), this);
return Util.SequenceActivities(new Turn(angle), this);
case State.Dock:
ru.PlayCustomAnimation(self, "dock", () => {ru.PlayCustomAnimRepeating(self, "dock-loop"); state = State.Loop;});
state = State.Wait;

View File

@@ -25,6 +25,7 @@ namespace OpenRA.Mods.RA
public readonly int TickLifetime = 30;
public readonly int TickVelocity = 2;
public readonly int TickRate = 10;
public readonly int DockAngle = 64;
public virtual object Create(ActorInitializer init) { return new OreRefinery(init.self, this); }
}
@@ -45,7 +46,7 @@ namespace OpenRA.Mods.RA
public bool AllowDocking { get { return !preventDock; } }
public CVec DeliverOffset { get { return (CVec)Info.DockOffset; } }
public virtual Activity DockSequence(Actor harv, Actor self) { return new RAHarvesterDockSequence(harv, self); }
public virtual Activity DockSequence(Actor harv, Actor self) { return new RAHarvesterDockSequence(harv, self, Info.DockAngle); }
public OreRefinery(Actor self, OreRefineryInfo info)
{

View File

@@ -8,8 +8,7 @@
# construction yard crane animations missing
# welding animation (factories) missing
# chimney animation (refinery) missing
# harvest animation missing
# harvester turn and offset wrong while unloading
# harvest animation missing (sand is spit out)
# add more spice tiles and make them fit
# add game logic for concrete plates (use terrain overlay from bridges/ressources)
# allow placing turrets on walls

View File

@@ -193,6 +193,8 @@
Bib:
-RenderBuilding:
OreRefinery:
DockOffset: 2,1
DockAngle: 144
StoresOre:
PipColor: Green
PipCount: 20