Move mod-specific lint attributes to Mods.Common.
This commit is contained in:
@@ -13,8 +13,6 @@ using System;
|
|||||||
|
|
||||||
namespace OpenRA.Traits
|
namespace OpenRA.Traits
|
||||||
{
|
{
|
||||||
/* attributes used by OpenRA.Lint to understand the rules */
|
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Field)]
|
[AttributeUsage(AttributeTargets.Field)]
|
||||||
public sealed class ActorReferenceAttribute : Attribute
|
public sealed class ActorReferenceAttribute : Attribute
|
||||||
{
|
{
|
||||||
@@ -28,28 +26,6 @@ namespace OpenRA.Traits
|
|||||||
[AttributeUsage(AttributeTargets.Field)]
|
[AttributeUsage(AttributeTargets.Field)]
|
||||||
public sealed class WeaponReferenceAttribute : Attribute { }
|
public sealed class WeaponReferenceAttribute : Attribute { }
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Field)]
|
|
||||||
public sealed class VoiceSetReferenceAttribute : Attribute { }
|
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Field)]
|
|
||||||
public sealed class VoiceReferenceAttribute : Attribute { }
|
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Field)]
|
|
||||||
public sealed class LocomotorReferenceAttribute : Attribute { }
|
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Field)]
|
|
||||||
public sealed class NotificationReferenceAttribute : Attribute
|
|
||||||
{
|
|
||||||
public readonly string NotificationTypeFieldName = null;
|
|
||||||
public readonly string NotificationType = null;
|
|
||||||
|
|
||||||
public NotificationReferenceAttribute(string type = null, string typeFromField = null)
|
|
||||||
{
|
|
||||||
NotificationType = type;
|
|
||||||
NotificationTypeFieldName = typeFromField;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Field)]
|
[AttributeUsage(AttributeTargets.Field)]
|
||||||
public sealed class SequenceReferenceAttribute : Attribute
|
public sealed class SequenceReferenceAttribute : Attribute
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ using System;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using OpenRA.GameRules;
|
using OpenRA.GameRules;
|
||||||
|
using OpenRA.Mods.Common.Traits;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
|
|
||||||
namespace OpenRA.Mods.Common.Lint
|
namespace OpenRA.Mods.Common.Lint
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OpenRA.GameRules;
|
using OpenRA.GameRules;
|
||||||
|
using OpenRA.Mods.Common.Traits;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
|
|
||||||
namespace OpenRA.Mods.Common.Lint
|
namespace OpenRA.Mods.Common.Lint
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using OpenRA.Mods.Common.Traits;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
|
|
||||||
namespace OpenRA.Mods.Common.Lint
|
namespace OpenRA.Mods.Common.Lint
|
||||||
|
|||||||
37
OpenRA.Mods.Common/Traits/LintAttributes.cs
Normal file
37
OpenRA.Mods.Common/Traits/LintAttributes.cs
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007-2020 The OpenRA Developers (see AUTHORS)
|
||||||
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
|
* available to you under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation, either version 3 of
|
||||||
|
* the License, or (at your option) any later version. For more
|
||||||
|
* information, see COPYING.
|
||||||
|
*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace OpenRA.Mods.Common.Traits
|
||||||
|
{
|
||||||
|
[AttributeUsage(AttributeTargets.Field)]
|
||||||
|
public sealed class VoiceSetReferenceAttribute : Attribute { }
|
||||||
|
|
||||||
|
[AttributeUsage(AttributeTargets.Field)]
|
||||||
|
public sealed class VoiceReferenceAttribute : Attribute { }
|
||||||
|
|
||||||
|
[AttributeUsage(AttributeTargets.Field)]
|
||||||
|
public sealed class LocomotorReferenceAttribute : Attribute { }
|
||||||
|
|
||||||
|
[AttributeUsage(AttributeTargets.Field)]
|
||||||
|
public sealed class NotificationReferenceAttribute : Attribute
|
||||||
|
{
|
||||||
|
public readonly string NotificationTypeFieldName = null;
|
||||||
|
public readonly string NotificationType = null;
|
||||||
|
|
||||||
|
public NotificationReferenceAttribute(string type = null, string typeFromField = null)
|
||||||
|
{
|
||||||
|
NotificationType = type;
|
||||||
|
NotificationTypeFieldName = typeFromField;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user