Replace ITraitInfo interface with TraitInfo class.

This commit is contained in:
Paul Chote
2020-05-11 18:12:19 +01:00
committed by reaperrr
parent 3cd7ec3878
commit 86f61298e6
243 changed files with 510 additions and 505 deletions

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Actor can be captured by units in a specified proximity.")]
public class ProximityCapturableInfo : ITraitInfo, IRulesetLoaded
public class ProximityCapturableInfo : TraitInfo, IRulesetLoaded
{
[Desc("Maximum range at which a ProximityCaptor actor can initiate the capture.")]
public readonly WDist Range = WDist.FromCells(5);
@@ -43,7 +43,7 @@ namespace OpenRA.Mods.Common.Traits
throw new YamlException("ProximityCapturable requires the `Player` actor to have the ProximityCaptor trait.");
}
public object Create(ActorInitializer init) { return new ProximityCapturable(init.Self, this); }
public override object Create(ActorInitializer init) { return new ProximityCapturable(init.Self, this); }
}
public class ProximityCapturable : ITick, INotifyAddedToWorld, INotifyRemovedFromWorld, INotifyOwnerChanged