Add UpgradeUsedReferenceAttribute
This commit is contained in:
@@ -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 { }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 = { };
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user