Rename UpgradableTrait to ConditionalTrait.
This commit is contained in:
@@ -15,7 +15,7 @@ using OpenRA.Traits;
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("The player can disable the power individually on this actor.")]
|
||||
public class CanPowerDownInfo : UpgradableTraitInfo, Requires<PowerInfo>
|
||||
public class CanPowerDownInfo : ConditionalTraitInfo, Requires<PowerInfo>
|
||||
{
|
||||
[Desc("Restore power when this trait is disabled.")]
|
||||
public readonly bool CancelWhenDisabled = false;
|
||||
@@ -34,7 +34,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public override object Create(ActorInitializer init) { return new CanPowerDown(init.Self, this); }
|
||||
}
|
||||
|
||||
public class CanPowerDown : UpgradableTrait<CanPowerDownInfo>, IPowerModifier, IResolveOrder, IDisable, INotifyOwnerChanged
|
||||
public class CanPowerDown : ConditionalTrait<CanPowerDownInfo>, IPowerModifier, IResolveOrder, IDisable, INotifyOwnerChanged
|
||||
{
|
||||
[Sync] bool disabled = false;
|
||||
PowerManager power;
|
||||
|
||||
@@ -15,7 +15,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
public class PowerInfo : UpgradableTraitInfo
|
||||
public class PowerInfo : ConditionalTraitInfo
|
||||
{
|
||||
[Desc("If negative, it will drain power. If positive, it will provide power.")]
|
||||
public readonly int Amount = 0;
|
||||
@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public override object Create(ActorInitializer init) { return new Power(init.Self, this); }
|
||||
}
|
||||
|
||||
public class Power : UpgradableTrait<PowerInfo>, INotifyAddedToWorld, INotifyRemovedFromWorld, INotifyOwnerChanged
|
||||
public class Power : ConditionalTrait<PowerInfo>, INotifyAddedToWorld, INotifyRemovedFromWorld, INotifyOwnerChanged
|
||||
{
|
||||
readonly Lazy<IPowerModifier[]> powerModifiers;
|
||||
|
||||
|
||||
@@ -14,12 +14,12 @@ using OpenRA.Traits;
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("Needs power to operate.")]
|
||||
class RequiresPowerInfo : UpgradableTraitInfo, ITraitInfo
|
||||
class RequiresPowerInfo : ConditionalTraitInfo, ITraitInfo
|
||||
{
|
||||
public override object Create(ActorInitializer init) { return new RequiresPower(init.Self, this); }
|
||||
}
|
||||
|
||||
class RequiresPower : UpgradableTrait<RequiresPowerInfo>, IDisable, INotifyOwnerChanged
|
||||
class RequiresPower : ConditionalTrait<RequiresPowerInfo>, IDisable, INotifyOwnerChanged
|
||||
{
|
||||
PowerManager playerPower;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user