diff --git a/ArchiSteamFarm/Steam/Data/InventoryDescription.cs b/ArchiSteamFarm/Steam/Data/InventoryDescription.cs index d5e001739..13de996c9 100644 --- a/ArchiSteamFarm/Steam/Data/InventoryDescription.cs +++ b/ArchiSteamFarm/Steam/Data/InventoryDescription.cs @@ -184,14 +184,8 @@ public sealed class InventoryDescription { } } - [JsonInclude] - [JsonPropertyName("type")] - public string TypeText { - get => Body.type; - private init => Body.type = value; - } - - internal EAssetRarity Rarity { + [JsonIgnore] + public EAssetRarity Rarity { get { if (CachedRarity.HasValue) { return CachedRarity.Value; @@ -256,7 +250,8 @@ public sealed class InventoryDescription { } } - internal uint RealAppID { + [JsonIgnore] + public uint RealAppID { get { if (CachedRealAppID.HasValue) { return CachedRealAppID.Value; @@ -312,7 +307,7 @@ public sealed class InventoryDescription { [JsonDisallowNull] [JsonInclude] [JsonPropertyName("tags")] - internal ImmutableHashSet Tags { + public ImmutableHashSet Tags { get => Body.tags.Select(static tag => new Tag(tag.category, tag.internal_name, tag.localized_category_name, tag.localized_tag_name, tag.color)).ToImmutableHashSet(); private init { @@ -337,12 +332,13 @@ public sealed class InventoryDescription { [JsonInclude] [JsonPropertyName("tradable")] [JsonRequired] - internal bool Tradable { + public bool Tradable { get => Body.tradable; private init => Body.tradable = value; } - internal EAssetType Type { + [JsonIgnore] + public EAssetType Type { get { if (CachedType.HasValue) { return CachedType.Value; @@ -509,6 +505,13 @@ public sealed class InventoryDescription { } } + [JsonInclude] + [JsonPropertyName("type")] + public string TypeText { + get => Body.type; + private init => Body.type = value; + } + private EAssetRarity? CachedRarity; private uint? CachedRealAppID; private EAssetType? CachedType;