Merge pull request #5119 from Mailaender/spice-smoke-overlay
Added smoke to the spice refineries
This commit is contained in:
@@ -45,7 +45,12 @@ namespace OpenRA.Mods.RA
|
||||
state = State.Dock;
|
||||
return Util.SequenceActivities(new Turn(angle), this);
|
||||
case State.Dock:
|
||||
ru.PlayCustomAnimation(self, "dock", () => {ru.PlayCustomAnimRepeating(self, "dock-loop"); state = State.Loop;});
|
||||
ru.PlayCustomAnimation(self, "dock", () => {
|
||||
ru.PlayCustomAnimRepeating(self, "dock-loop");
|
||||
foreach (var nd in proc.TraitsImplementing<INotifyDocking>())
|
||||
nd.Docked(proc, self);
|
||||
state = State.Loop;
|
||||
});
|
||||
state = State.Wait;
|
||||
return this;
|
||||
case State.Loop:
|
||||
@@ -59,8 +64,11 @@ namespace OpenRA.Mods.RA
|
||||
case State.Complete:
|
||||
harv.LastLinkedProc = harv.LinkedProc;
|
||||
harv.LinkProc(self, null);
|
||||
foreach (var nd in proc.TraitsImplementing<INotifyDocking>())
|
||||
nd.Undocked(proc, self);
|
||||
return NextActivity;
|
||||
}
|
||||
|
||||
throw new InvalidOperationException("Invalid harvester dock state");
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace OpenRA.Mods.RA
|
||||
[Sync] bool preventDock = false;
|
||||
|
||||
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, Info.DockAngle); }
|
||||
@@ -110,11 +111,11 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
if (!preventDock)
|
||||
{
|
||||
harv.QueueActivity( new CallFunc( () => dockedHarv = harv, false ) );
|
||||
harv.QueueActivity( DockSequence(harv, self) );
|
||||
harv.QueueActivity( new CallFunc( () => dockedHarv = null, false ) );
|
||||
harv.QueueActivity(new CallFunc( () => dockedHarv = harv, false));
|
||||
harv.QueueActivity(DockSequence(harv, self));
|
||||
harv.QueueActivity(new CallFunc( () => dockedHarv = null, false));
|
||||
}
|
||||
harv.QueueActivity( new CallFunc( () => harv.Trait<Harvester>().ContinueHarvesting(harv) ) );
|
||||
harv.QueueActivity(new CallFunc(() => harv.Trait<Harvester>().ContinueHarvesting(harv)));
|
||||
}
|
||||
|
||||
public void OnCapture(Actor self, Actor captor, Player oldOwner, Player newOwner)
|
||||
|
||||
Reference in New Issue
Block a user