UpgradeManager after IUpgradables
This commit is contained in:
@@ -14,7 +14,7 @@ using OpenRA.Traits;
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("The player can disable the power individually on this actor.")]
|
||||
public class CanPowerDownInfo : UpgradableTraitInfo, ITraitInfo, Requires<PowerInfo>
|
||||
public class CanPowerDownInfo : UpgradableTraitInfo, Requires<PowerInfo>
|
||||
{
|
||||
[Desc("Restore power when this trait is disabled.")]
|
||||
public readonly bool CancelWhenDisabled = false;
|
||||
@@ -24,7 +24,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public readonly string IndicatorPalette = "chrome";
|
||||
|
||||
public object Create(ActorInitializer init) { return new CanPowerDown(init.Self, this); }
|
||||
public override object Create(ActorInitializer init) { return new CanPowerDown(init.Self, this); }
|
||||
}
|
||||
|
||||
public class CanPowerDown : UpgradableTrait<CanPowerDownInfo>, IPowerModifier, IResolveOrder, IDisable, INotifyOwnerChanged
|
||||
|
||||
@@ -14,12 +14,12 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
public class PowerInfo : UpgradableTraitInfo, ITraitInfo
|
||||
public class PowerInfo : UpgradableTraitInfo
|
||||
{
|
||||
[Desc("If negative, it will drain power. If positive, it will provide power.")]
|
||||
public readonly int Amount = 0;
|
||||
|
||||
public object Create(ActorInitializer init) { return new Power(init.Self, this); }
|
||||
public override object Create(ActorInitializer init) { return new Power(init.Self, this); }
|
||||
}
|
||||
|
||||
public class Power : UpgradableTrait<PowerInfo>, INotifyAddedToWorld, INotifyRemovedFromWorld, INotifyOwnerChanged
|
||||
|
||||
Reference in New Issue
Block a user