Fixed #856 - created trait for ammo reload time, set for some aircraft
This commit is contained in:
committed by
Chris Forbes
parent
6be55b61aa
commit
de5db51f25
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.RA.Activities
|
||||
return Util.SequenceActivities(
|
||||
new Enter(rearmTarget),
|
||||
//new Move(Util.CellContaining(rearmTarget.CenterLocation), rearmTarget),
|
||||
new Rearm(),
|
||||
new Rearm(self),
|
||||
new Repair(rearmTarget),
|
||||
this );
|
||||
}
|
||||
|
||||
@@ -17,9 +17,15 @@ namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
public class Rearm : Activity
|
||||
{
|
||||
int remainingTicks = ticksPerPip;
|
||||
|
||||
const int ticksPerPip = 25 * 2;
|
||||
|
||||
int ticksPerPip = 25 * 2;
|
||||
int remainingTicks = 25 * 2;
|
||||
|
||||
public Rearm(Actor actor)
|
||||
{
|
||||
ticksPerPip = actor.TraitOrDefault<LimitedAmmo>().ReloadTimePerAmmo();
|
||||
remainingTicks = ticksPerPip;
|
||||
}
|
||||
|
||||
public override Activity Tick(Actor self)
|
||||
{
|
||||
@@ -37,7 +43,7 @@ namespace OpenRA.Mods.RA.Activities
|
||||
if (hostBuilding != null)
|
||||
hostBuilding.Trait<RenderBuilding>().PlayCustomAnim(hostBuilding, "active");
|
||||
|
||||
remainingTicks = ticksPerPip;
|
||||
remainingTicks = limitedAmmo.ReloadTimePerAmmo();
|
||||
}
|
||||
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user