Fix and improve custom rule detection.

This commit is contained in:
Paul Chote
2016-04-09 13:40:44 -04:00
parent b49f1439ed
commit 923883fad7
5 changed files with 77 additions and 6 deletions

View File

@@ -319,6 +319,7 @@ namespace OpenRA.Traits
public interface ITraitInfo : ITraitInfoInterface { object Create(ActorInitializer init); }
public class TraitInfo<T> : ITraitInfo where T : new() { public virtual object Create(ActorInitializer init) { return new T(); } }
public interface ILobbyCustomRulesIgnore { }
[SuppressMessage("StyleCop.CSharp.NamingRules", "SA1302:InterfaceNamesMustBeginWithI", Justification = "Not a real interface, but more like a tag.")]
public interface Requires<T> where T : class, ITraitInfoInterface { }