Allow support powers to start with a full charge when created
This commit is contained in:
@@ -20,6 +20,10 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
public readonly string LongDesc = "";
|
public readonly string LongDesc = "";
|
||||||
public readonly bool AllowMultiple = false;
|
public readonly bool AllowMultiple = false;
|
||||||
public readonly bool OneShot = false;
|
public readonly bool OneShot = false;
|
||||||
|
|
||||||
|
[Desc("If set to true, the support power will be fully charged when it becomes available. " +
|
||||||
|
"Normal rules apply for subsequent charges.")]
|
||||||
|
public readonly bool StartFullyCharged = false;
|
||||||
public readonly string[] Prerequisites = { };
|
public readonly string[] Prerequisites = { };
|
||||||
|
|
||||||
public readonly string BeginChargeSound = null;
|
public readonly string BeginChargeSound = null;
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
Powers.Add(key, new SupportPowerInstance(key, this)
|
Powers.Add(key, new SupportPowerInstance(key, this)
|
||||||
{
|
{
|
||||||
Instances = new List<SupportPower>(),
|
Instances = new List<SupportPower>(),
|
||||||
RemainingTime = t.Info.ChargeTime * 25,
|
RemainingTime = t.Info.StartFullyCharged ? 0 : t.Info.ChargeTime * 25,
|
||||||
TotalTime = t.Info.ChargeTime * 25,
|
TotalTime = t.Info.ChargeTime * 25,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user