Add UpgradeUsedReferenceAttribute

This commit is contained in:
penev92
2015-06-12 14:20:26 +03:00
parent fbbd9a7eaa
commit 2647811a13
2 changed files with 5 additions and 0 deletions

View File

@@ -40,4 +40,7 @@ namespace OpenRA.Traits
[AttributeUsage(AttributeTargets.Field)] [AttributeUsage(AttributeTargets.Field)]
public sealed class UpgradeGrantedReferenceAttribute : Attribute { } public sealed class UpgradeGrantedReferenceAttribute : Attribute { }
[AttributeUsage(AttributeTargets.Field)]
public sealed class UpgradeUsedReferenceAttribute : Attribute { }
} }

View File

@@ -7,6 +7,7 @@
* see COPYING. * see COPYING.
*/ */
#endregion #endregion
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Traits; using OpenRA.Traits;
@@ -16,6 +17,7 @@ namespace OpenRA.Mods.Common.Traits
/// <summary>Use as base class for *Info to subclass of UpgradableTrait. (See UpgradableTrait.)</summary> /// <summary>Use as base class for *Info to subclass of UpgradableTrait. (See UpgradableTrait.)</summary>
public abstract class UpgradableTraitInfo public abstract class UpgradableTraitInfo
{ {
[UpgradeUsedReference]
[Desc("The upgrade types which can enable or disable this trait.")] [Desc("The upgrade types which can enable or disable this trait.")]
public readonly string[] UpgradeTypes = { }; public readonly string[] UpgradeTypes = { };