Replace ITraitInfo interface with TraitInfo class.
This commit is contained in:
@@ -19,12 +19,12 @@ using OpenRA.Traits;
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("This actor will remain visible (but not updated visually) under fog, once discovered.")]
|
||||
public class FrozenUnderFogInfo : ITraitInfo, Requires<BuildingInfo>, IDefaultVisibilityInfo
|
||||
public class FrozenUnderFogInfo : TraitInfo, Requires<BuildingInfo>, IDefaultVisibilityInfo
|
||||
{
|
||||
[Desc("Players with these stances can always see the actor.")]
|
||||
public readonly Stance AlwaysVisibleStances = Stance.Ally;
|
||||
|
||||
public object Create(ActorInitializer init) { return new FrozenUnderFog(init, this); }
|
||||
public override object Create(ActorInitializer init) { return new FrozenUnderFog(init, this); }
|
||||
}
|
||||
|
||||
public class FrozenUnderFog : ICreatesFrozenActors, IRenderModifier, IDefaultVisibility, ITick, ITickRender, ISync, INotifyCreated, INotifyOwnerChanged, INotifyActorDisposing
|
||||
|
||||
@@ -17,7 +17,7 @@ using OpenRA.Traits;
|
||||
namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
[Desc("The actor stays invisible under the shroud.")]
|
||||
public class HiddenUnderShroudInfo : ITraitInfo, IDefaultVisibilityInfo
|
||||
public class HiddenUnderShroudInfo : TraitInfo, IDefaultVisibilityInfo
|
||||
{
|
||||
[Desc("Players with these stances can always see the actor.")]
|
||||
public readonly Stance AlwaysVisibleStances = Stance.Ally;
|
||||
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
"Footprint (reveal when any footprint cell is visible).")]
|
||||
public readonly VisibilityType Type = VisibilityType.Footprint;
|
||||
|
||||
public virtual object Create(ActorInitializer init) { return new HiddenUnderShroud(this); }
|
||||
public override object Create(ActorInitializer init) { return new HiddenUnderShroud(this); }
|
||||
}
|
||||
|
||||
public class HiddenUnderShroud : IDefaultVisibility, IRenderModifier
|
||||
|
||||
Reference in New Issue
Block a user