mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Make some inventory description properties public
This commit is contained in:
@@ -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<Tag> Tags {
|
||||
public ImmutableHashSet<Tag> 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;
|
||||
|
||||
Reference in New Issue
Block a user