From 036d3b09d43371154d5ff26f664e661ea151ccc9 Mon Sep 17 00:00:00 2001 From: jona <93538252+wannkunstbeikor@users.noreply.github.com> Date: Sun, 5 Nov 2023 14:12:32 +0100 Subject: [PATCH] [Sdk] Added EbxArrayMetaAttribute to types --- FrostySdk/Attributes/EbxArrayMetaAttribute.cs | 4 ++-- FrostySdk/Sdk/TypeInfoDatas/ArrayInfoData.cs | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/FrostySdk/Attributes/EbxArrayMetaAttribute.cs b/FrostySdk/Attributes/EbxArrayMetaAttribute.cs index 93c31e66..980a3385 100644 --- a/FrostySdk/Attributes/EbxArrayMetaAttribute.cs +++ b/FrostySdk/Attributes/EbxArrayMetaAttribute.cs @@ -3,11 +3,11 @@ namespace Frosty.Sdk.Attributes; -[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] +[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Delegate)] public class EbxArrayMetaAttribute : Attribute { public TypeFlags Flags { get; set; } - + public EbxArrayMetaAttribute(ushort flags) { Flags = flags; diff --git a/FrostySdk/Sdk/TypeInfoDatas/ArrayInfoData.cs b/FrostySdk/Sdk/TypeInfoDatas/ArrayInfoData.cs index 2c8432cb..69ac1d61 100644 --- a/FrostySdk/Sdk/TypeInfoDatas/ArrayInfoData.cs +++ b/FrostySdk/Sdk/TypeInfoDatas/ArrayInfoData.cs @@ -29,9 +29,7 @@ public override void CreateType(StringBuilder sb) { sb.AppendLine($"[{nameof(ArrayGuidAttribute)}(\"{m_guid}\")]"); } - if (m_nameHash != 0) - { - sb.AppendLine($"[{nameof(ArrayHashAttribute)}({m_nameHash})]"); - } + sb.AppendLine($"[{nameof(ArrayHashAttribute)}({m_nameHash})]"); + sb.AppendLine($"[{nameof(EbxArrayMetaAttribute)}({(ushort)m_flags})]"); } }