Convert support powers from actor disabled to pausable-conditional.
This commit is contained in:
@@ -179,11 +179,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
prereqsAvailable = available;
|
||||
}
|
||||
|
||||
static bool InstanceDisabled(SupportPower sp)
|
||||
{
|
||||
return sp.Self.IsDisabled();
|
||||
}
|
||||
|
||||
bool notifiedCharging;
|
||||
bool notifiedReady;
|
||||
public void Tick()
|
||||
@@ -192,7 +187,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (!instancesEnabled)
|
||||
RemainingTime = TotalTime;
|
||||
|
||||
Active = !Disabled && Instances.Any(i => !i.Self.IsDisabled());
|
||||
Active = !Disabled && Instances.Any(i => !i.IsTraitPaused);
|
||||
if (!Active)
|
||||
return;
|
||||
|
||||
@@ -224,7 +219,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (!Ready)
|
||||
return;
|
||||
|
||||
var power = Instances.FirstOrDefault();
|
||||
var power = Instances.FirstOrDefault(i => !i.IsTraitPaused);
|
||||
if (power == null)
|
||||
return;
|
||||
|
||||
@@ -236,7 +231,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (!Ready)
|
||||
return;
|
||||
|
||||
var power = Instances.Where(i => !InstanceDisabled(i))
|
||||
var power = Instances.Where(i => !i.IsTraitPaused)
|
||||
.MinByOrDefault(a =>
|
||||
{
|
||||
if (a.Self.OccupiesSpace == null)
|
||||
|
||||
Reference in New Issue
Block a user