Fast charge devhack.
This commit is contained in:
@@ -16,7 +16,7 @@ using OpenRA.Graphics;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
public class SupportPowerManagerInfo : ITraitInfo
|
public class SupportPowerManagerInfo : ITraitInfo, ITraitPrerequisite<DeveloperModeInfo>
|
||||||
{
|
{
|
||||||
public object Create(ActorInitializer init) { return new SupportPowerManager(init); }
|
public object Create(ActorInitializer init) { return new SupportPowerManager(init); }
|
||||||
}
|
}
|
||||||
@@ -25,11 +25,13 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
public readonly Actor self;
|
public readonly Actor self;
|
||||||
public Dictionary<string, SupportPowerInstance> Powers = new Dictionary<string, SupportPowerInstance>();
|
public Dictionary<string, SupportPowerInstance> Powers = new Dictionary<string, SupportPowerInstance>();
|
||||||
|
|
||||||
|
public readonly DeveloperMode devMode;
|
||||||
public SupportPowerManager(ActorInitializer init)
|
public SupportPowerManager(ActorInitializer init)
|
||||||
{
|
{
|
||||||
self = init.self;
|
self = init.self;
|
||||||
|
devMode = init.self.Trait<DeveloperMode>();
|
||||||
|
|
||||||
init.world.ActorAdded += ActorAdded;
|
init.world.ActorAdded += ActorAdded;
|
||||||
init.world.ActorRemoved += ActorRemoved;
|
init.world.ActorRemoved += ActorRemoved;
|
||||||
}
|
}
|
||||||
@@ -123,6 +125,9 @@ namespace OpenRA.Mods.RA
|
|||||||
if (Active)
|
if (Active)
|
||||||
{
|
{
|
||||||
var power = Instances.First();
|
var power = Instances.First();
|
||||||
|
if (Manager.devMode.FastCharge && RemainingTime > 25)
|
||||||
|
RemainingTime = 25;
|
||||||
|
|
||||||
if (RemainingTime > 0) --RemainingTime;
|
if (RemainingTime > 0) --RemainingTime;
|
||||||
if (!notifiedCharging)
|
if (!notifiedCharging)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user