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

@@ -14,7 +14,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Provides the player with an audible warning when their storage is nearing full.")]
public class ResourceStorageWarningInfo : ITraitInfo, Requires<PlayerResourcesInfo>
public class ResourceStorageWarningInfo : TraitInfo, Requires<PlayerResourcesInfo>
{
[Desc("Interval, in seconds, at which to check if more storage is needed.")]
public readonly int AdviceInterval = 20;
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Common.Traits
[Desc("The speech to play for the warning.")]
public readonly string Notification = "SilosNeeded";
public object Create(ActorInitializer init) { return new ResourceStorageWarning(init.Self, this); }
public override object Create(ActorInitializer init) { return new ResourceStorageWarning(init.Self, this); }
}
public class ResourceStorageWarning : ITick