fixed d2k harvester dock animation
This commit is contained in:
@@ -21,13 +21,15 @@ namespace OpenRA.Mods.RA
|
|||||||
enum State { Wait, Turn, Dock, Loop, Undock, Complete };
|
enum State { Wait, Turn, Dock, Loop, Undock, Complete };
|
||||||
|
|
||||||
readonly Actor proc;
|
readonly Actor proc;
|
||||||
|
readonly int angle;
|
||||||
readonly Harvester harv;
|
readonly Harvester harv;
|
||||||
readonly RenderUnit ru;
|
readonly RenderUnit ru;
|
||||||
State state;
|
State state;
|
||||||
|
|
||||||
public RAHarvesterDockSequence(Actor self, Actor proc)
|
public RAHarvesterDockSequence(Actor self, Actor proc, int angle)
|
||||||
{
|
{
|
||||||
this.proc = proc;
|
this.proc = proc;
|
||||||
|
this.angle = angle;
|
||||||
state = State.Turn;
|
state = State.Turn;
|
||||||
harv = self.Trait<Harvester>();
|
harv = self.Trait<Harvester>();
|
||||||
ru = self.Trait<RenderUnit>();
|
ru = self.Trait<RenderUnit>();
|
||||||
@@ -41,7 +43,7 @@ namespace OpenRA.Mods.RA
|
|||||||
return this;
|
return this;
|
||||||
case State.Turn:
|
case State.Turn:
|
||||||
state = State.Dock;
|
state = State.Dock;
|
||||||
return Util.SequenceActivities(new Turn(64), this);
|
return Util.SequenceActivities(new Turn(angle), this);
|
||||||
case State.Dock:
|
case State.Dock:
|
||||||
ru.PlayCustomAnimation(self, "dock", () => {ru.PlayCustomAnimRepeating(self, "dock-loop"); state = State.Loop;});
|
ru.PlayCustomAnimation(self, "dock", () => {ru.PlayCustomAnimRepeating(self, "dock-loop"); state = State.Loop;});
|
||||||
state = State.Wait;
|
state = State.Wait;
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ namespace OpenRA.Mods.RA
|
|||||||
public readonly int TickLifetime = 30;
|
public readonly int TickLifetime = 30;
|
||||||
public readonly int TickVelocity = 2;
|
public readonly int TickVelocity = 2;
|
||||||
public readonly int TickRate = 10;
|
public readonly int TickRate = 10;
|
||||||
|
public readonly int DockAngle = 64;
|
||||||
|
|
||||||
public virtual object Create(ActorInitializer init) { return new OreRefinery(init.self, this); }
|
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 bool AllowDocking { get { return !preventDock; } }
|
||||||
public CVec DeliverOffset { get { return (CVec)Info.DockOffset; } }
|
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)
|
public OreRefinery(Actor self, OreRefineryInfo info)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,8 +8,7 @@
|
|||||||
# construction yard crane animations missing
|
# construction yard crane animations missing
|
||||||
# welding animation (factories) missing
|
# welding animation (factories) missing
|
||||||
# chimney animation (refinery) missing
|
# chimney animation (refinery) missing
|
||||||
# harvest animation missing
|
# harvest animation missing (sand is spit out)
|
||||||
# harvester turn and offset wrong while unloading
|
|
||||||
# add more spice tiles and make them fit
|
# add more spice tiles and make them fit
|
||||||
# add game logic for concrete plates (use terrain overlay from bridges/ressources)
|
# add game logic for concrete plates (use terrain overlay from bridges/ressources)
|
||||||
# allow placing turrets on walls
|
# allow placing turrets on walls
|
||||||
|
|||||||
@@ -193,6 +193,8 @@
|
|||||||
Bib:
|
Bib:
|
||||||
-RenderBuilding:
|
-RenderBuilding:
|
||||||
OreRefinery:
|
OreRefinery:
|
||||||
|
DockOffset: 2,1
|
||||||
|
DockAngle: 144
|
||||||
StoresOre:
|
StoresOre:
|
||||||
PipColor: Green
|
PipColor: Green
|
||||||
PipCount: 20
|
PipCount: 20
|
||||||
|
|||||||
Reference in New Issue
Block a user