Made UpgradeMultiplierTraitInfo implement ITraitInfo
This commit is contained in:
@@ -16,9 +16,9 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
[Desc("Damage taken by this actor is multiplied based on upgrade level.",
|
[Desc("Damage taken by this actor is multiplied based on upgrade level.",
|
||||||
"Decrease to increase actor's apparent strength.",
|
"Decrease to increase actor's apparent strength.",
|
||||||
"Use 0 to make actor invulnerable.")]
|
"Use 0 to make actor invulnerable.")]
|
||||||
public class DamageMultiplierInfo : UpgradeMultiplierTraitInfo, ITraitInfo
|
public class DamageMultiplierInfo : UpgradeMultiplierTraitInfo
|
||||||
{
|
{
|
||||||
public object Create(ActorInitializer init) { return new DamageMultiplier(this, init.Self.Info.Name); }
|
public override object Create(ActorInitializer init) { return new DamageMultiplier(this, init.Self.Info.Name); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DamageMultiplier : UpgradeMultiplierTrait, IDamageModifier
|
public class DamageMultiplier : UpgradeMultiplierTrait, IDamageModifier
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.Common.Traits
|
namespace OpenRA.Mods.Common.Traits
|
||||||
{
|
{
|
||||||
[Desc("The firepower of this actor is multiplied based on upgrade level if specified.")]
|
[Desc("The firepower of this actor is multiplied based on upgrade level if specified.")]
|
||||||
public class FirepowerMultiplierInfo : UpgradeMultiplierTraitInfo, ITraitInfo
|
public class FirepowerMultiplierInfo : UpgradeMultiplierTraitInfo
|
||||||
{
|
{
|
||||||
public object Create(ActorInitializer init) { return new FirepowerMultiplier(this, init.Self.Info.Name); }
|
public override object Create(ActorInitializer init) { return new FirepowerMultiplier(this, init.Self.Info.Name); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class FirepowerMultiplier : UpgradeMultiplierTrait, IFirepowerModifier
|
public class FirepowerMultiplier : UpgradeMultiplierTrait, IFirepowerModifier
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.Common.Traits
|
namespace OpenRA.Mods.Common.Traits
|
||||||
{
|
{
|
||||||
[Desc("The inaccuracy of this actor is multipled based on upgrade level if specified.")]
|
[Desc("The inaccuracy of this actor is multipled based on upgrade level if specified.")]
|
||||||
public class InaccuracyMultiplierInfo : UpgradeMultiplierTraitInfo, ITraitInfo
|
public class InaccuracyMultiplierInfo : UpgradeMultiplierTraitInfo
|
||||||
{
|
{
|
||||||
public object Create(ActorInitializer init) { return new InaccuracyMultiplier(this, init.Self.Info.Name); }
|
public override object Create(ActorInitializer init) { return new InaccuracyMultiplier(this, init.Self.Info.Name); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class InaccuracyMultiplier : UpgradeMultiplierTrait, IInaccuracyModifier
|
public class InaccuracyMultiplier : UpgradeMultiplierTrait, IInaccuracyModifier
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.Common
|
namespace OpenRA.Mods.Common
|
||||||
{
|
{
|
||||||
[Desc("The power usage/output of this actor is multiplied based on upgrade level if specified.")]
|
[Desc("The power usage/output of this actor is multiplied based on upgrade level if specified.")]
|
||||||
public class PowerMultiplierInfo : UpgradeMultiplierTraitInfo, ITraitInfo
|
public class PowerMultiplierInfo : UpgradeMultiplierTraitInfo
|
||||||
{
|
{
|
||||||
public object Create(ActorInitializer init) { return new PowerMultiplier(init.Self, this); }
|
public override object Create(ActorInitializer init) { return new PowerMultiplier(init.Self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class PowerMultiplier : UpgradeMultiplierTrait, IPowerModifier, INotifyOwnerChanged
|
public class PowerMultiplier : UpgradeMultiplierTrait, IPowerModifier, INotifyOwnerChanged
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.Common.Traits
|
namespace OpenRA.Mods.Common.Traits
|
||||||
{
|
{
|
||||||
[Desc("The reloading time of this actor is multiplied based on upgrade level if specified.")]
|
[Desc("The reloading time of this actor is multiplied based on upgrade level if specified.")]
|
||||||
public class ReloadDelayMultiplierInfo : UpgradeMultiplierTraitInfo, ITraitInfo
|
public class ReloadDelayMultiplierInfo : UpgradeMultiplierTraitInfo
|
||||||
{
|
{
|
||||||
public object Create(ActorInitializer init) { return new ReloadDelayMultiplier(this, init.Self.Info.Name); }
|
public override object Create(ActorInitializer init) { return new ReloadDelayMultiplier(this, init.Self.Info.Name); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ReloadDelayMultiplier : UpgradeMultiplierTrait, IReloadModifier
|
public class ReloadDelayMultiplier : UpgradeMultiplierTrait, IReloadModifier
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.Common.Traits
|
namespace OpenRA.Mods.Common.Traits
|
||||||
{
|
{
|
||||||
[Desc("The speed of this actor is multiplied based on upgrade level if specified.")]
|
[Desc("The speed of this actor is multiplied based on upgrade level if specified.")]
|
||||||
public class SpeedMultiplierInfo : UpgradeMultiplierTraitInfo, ITraitInfo
|
public class SpeedMultiplierInfo : UpgradeMultiplierTraitInfo
|
||||||
{
|
{
|
||||||
public object Create(ActorInitializer init) { return new SpeedMultiplier(this, init.Self.Info.Name); }
|
public override object Create(ActorInitializer init) { return new SpeedMultiplier(this, init.Self.Info.Name); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SpeedMultiplier : UpgradeMultiplierTrait, ISpeedModifier
|
public class SpeedMultiplier : UpgradeMultiplierTrait, ISpeedModifier
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Common.Traits
|
namespace OpenRA.Mods.Common.Traits
|
||||||
{
|
{
|
||||||
public abstract class UpgradeMultiplierTraitInfo
|
public abstract class UpgradeMultiplierTraitInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
[UpgradeUsedReference]
|
[UpgradeUsedReference]
|
||||||
[Desc("Accepted upgrade types.")]
|
[Desc("Accepted upgrade types.")]
|
||||||
@@ -29,6 +29,8 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
"Repeat last entry to accept time extensions.",
|
"Repeat last entry to accept time extensions.",
|
||||||
"If no upgrade types are specified, then the first/only modifier is always applied.")]
|
"If no upgrade types are specified, then the first/only modifier is always applied.")]
|
||||||
public readonly int[] Modifier = { };
|
public readonly int[] Modifier = { };
|
||||||
|
|
||||||
|
public abstract object Create(ActorInitializer init);
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract class UpgradeMultiplierTrait : IUpgradable, IDisabledTrait, ISync
|
public abstract class UpgradeMultiplierTrait : IUpgradable, IDisabledTrait, ISync
|
||||||
|
|||||||
Reference in New Issue
Block a user