Skip to content

Commit

Permalink
Disable SupportPowerInstances when game has ended
Browse files Browse the repository at this point in the history
for the player in question, at least.
  • Loading branch information
reaperrr committed Dec 29, 2019
1 parent 491eb06 commit 1600f1e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,16 @@ public class SupportPowerInstance
protected int remainingSubTicks;
public int RemainingTicks { get { return remainingSubTicks / 100; } }
public bool Active { get; private set; }
public bool Disabled { get { return (!prereqsAvailable && !Manager.DevMode.AllTech) || !instancesEnabled || oneShotFired; } }
public bool Disabled
{
get
{
return Manager.Self.Owner.WinState != WinState.Undefined ||
(!prereqsAvailable && !Manager.DevMode.AllTech) ||
!instancesEnabled ||
oneShotFired;
}
}

public SupportPowerInfo Info { get { return Instances.Select(i => i.Info).FirstOrDefault(); } }
public bool Ready { get { return Active && RemainingTicks == 0; } }
Expand Down

0 comments on commit 1600f1e

Please sign in to comment.