Make Tick return bool

This commit is contained in:
tovl
2019-05-14 21:13:25 +02:00
committed by teinarss
parent 09c1611239
commit 3790169db9
49 changed files with 328 additions and 318 deletions

View File

@@ -95,7 +95,7 @@ namespace OpenRA.Mods.D2k.Activities
return true;
}
public override Activity Tick(Actor self)
public override bool Tick(Actor self)
{
switch (stance)
{
@@ -109,7 +109,7 @@ namespace OpenRA.Mods.D2k.Activities
break;
case AttackState.Burrowed:
if (--countdown > 0)
return this;
return false;
var targetLocation = target.Actor.Location;
@@ -117,14 +117,14 @@ namespace OpenRA.Mods.D2k.Activities
if ((burrowLocation - targetLocation).Length > NearEnough)
{
RevokeCondition(self);
return NextActivity;
return true;
}
// The target reached solid ground
if (!positionable.CanEnterCell(targetLocation, null, false))
{
RevokeCondition(self);
return NextActivity;
return true;
}
var targets = self.World.ActorMap.GetActorsAt(targetLocation)
@@ -133,7 +133,7 @@ namespace OpenRA.Mods.D2k.Activities
if (!targets.Any())
{
RevokeCondition(self);
return NextActivity;
return true;
}
stance = AttackState.Attacking;
@@ -144,7 +144,7 @@ namespace OpenRA.Mods.D2k.Activities
break;
case AttackState.Attacking:
if (--countdown > 0)
return this;
return false;
sandworm.IsAttacking = false;
@@ -156,10 +156,10 @@ namespace OpenRA.Mods.D2k.Activities
}
RevokeCondition(self);
return NextActivity;
return true;
}
return this;
return false;
}
void RevokeCondition(Actor self)