Add SequenceReference support for dictionaries.
This commit is contained in:
@@ -13,6 +13,13 @@ using System;
|
||||
|
||||
namespace OpenRA.Traits
|
||||
{
|
||||
public enum LintDictionaryReference
|
||||
{
|
||||
None = 0,
|
||||
Keys = 1,
|
||||
Values = 2
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Field)]
|
||||
public sealed class ActorReferenceAttribute : Attribute
|
||||
{
|
||||
@@ -29,15 +36,19 @@ namespace OpenRA.Traits
|
||||
[AttributeUsage(AttributeTargets.Field)]
|
||||
public sealed class SequenceReferenceAttribute : Attribute
|
||||
{
|
||||
public readonly string ImageReference; // The field name in the same trait info that contains the image name.
|
||||
// The field name in the same trait info that contains the image name.
|
||||
public readonly string ImageReference;
|
||||
public readonly bool Prefix;
|
||||
public readonly bool AllowNullImage;
|
||||
public readonly LintDictionaryReference DictionaryReference;
|
||||
|
||||
public SequenceReferenceAttribute(string imageReference = null, bool prefix = false, bool allowNullImage = false)
|
||||
public SequenceReferenceAttribute(string imageReference = null, bool prefix = false, bool allowNullImage = false,
|
||||
LintDictionaryReference dictionaryReference = LintDictionaryReference.None)
|
||||
{
|
||||
ImageReference = imageReference;
|
||||
Prefix = prefix;
|
||||
AllowNullImage = allowNullImage;
|
||||
DictionaryReference = dictionaryReference;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user