Simplify special exits of several acitivities.

This commit is contained in:
tovl
2019-06-30 20:53:36 +02:00
committed by teinarss
parent 3790169db9
commit 985020b4ad
9 changed files with 20 additions and 45 deletions

View File

@@ -22,8 +22,6 @@ namespace OpenRA.Mods.Common.Activities
readonly Harvester harv;
readonly Actor targetActor;
bool isDocking;
public DeliverResources(Actor self, Actor targetActor = null)
{
movement = self.Trait<IMove>();
@@ -39,7 +37,7 @@ namespace OpenRA.Mods.Common.Activities
public override bool Tick(Actor self)
{
if (IsCanceling || isDocking)
if (IsCanceling)
return true;
// Find the nearest best refinery if not explicitly ordered to a specific refinery:
@@ -66,14 +64,8 @@ namespace OpenRA.Mods.Common.Activities
return false;
}
if (!isDocking)
{
QueueChild(new Wait(10));
isDocking = true;
iao.OnDock(self, this);
return false;
}
QueueChild(new Wait(10));
iao.OnDock(self, this);
return true;
}
}