Type fixes

This commit is contained in:
CWX
2025-01-24 12:27:57 +00:00
parent 8cc8300a70
commit 9cf43cda89
6 changed files with 10 additions and 37 deletions
@@ -576,7 +576,7 @@ public record HideoutImprovement
public record Production // use this instead of productive and scavcase
{
public List<Product>? Products { get; set; }
public List<Item>? Products { get; set; }
/** Seconds passed of production */
public double? Progress { get; set; }
@@ -665,17 +665,8 @@ public record HideoutSlot
public List<HideoutItem>? Items { get; set; }
}
public record HideoutItem
public record HideoutItem : Item
{
[JsonPropertyName("_id")]
public string? Id { get; set; }
[JsonPropertyName("_tpl")]
public string? Template { get; set; }
[JsonPropertyName("upd")]
public Upd? Upd { get; set; }
[JsonPropertyName("count")]
public double? Count { get; set; }
}
@@ -9,7 +9,7 @@ public record Item
public required string Id { get; set; }
[JsonPropertyName("_tpl")]
public required string Template { get; set; }
public string Template { get; set; }
[JsonPropertyName("parentId")]
public string? ParentId { get; set; }
@@ -25,20 +25,6 @@ public record Item
[JsonPropertyName("upd")]
public Upd? Upd { get; set; }
public ItemEvent.Product ConvertToProduct()
{
// TODO - maybe this entire product item can be replaced with Item?
return new ItemEvent.Product
{
Id = Id,
Template = Template,
ParentId = ParentId,
SlotId = SlotId,
Upd = Upd,
Location = (ItemLocation)Location
};
}
}
public record ItemLocation
@@ -9,7 +9,7 @@ public record AddItemDirectRequest
/// Item and child mods to add to player inventory
/// </summary>
[JsonPropertyName("itemWithModsToAdd")]
public List<HideoutItem>? ItemWithModsToAdd { get; set; }
public List<Item>? ItemWithModsToAdd { get; set; }
[JsonPropertyName("foundInRaid")]
public bool? FoundInRaid { get; set; }
@@ -136,13 +136,13 @@ public record EquipmentBuildChange
public record ItemChanges
{
[JsonPropertyName("new")]
public List<Product>? NewItems { get; set; }
public List<Item>? NewItems { get; set; }
[JsonPropertyName("change")]
public List<Product>? ChangedItems { get; set; }
public List<Item>? ChangedItems { get; set; }
[JsonPropertyName("del")]
public List<Product> DeletedItems { get; set; } // Only needs _id property
public List<Item> DeletedItems { get; set; } // Only needs _id property
}
/** Related to TraderInfo */
@@ -163,7 +163,3 @@ public record TraderData
[JsonPropertyName("disabled")]
public bool? Disabled { get; set; }
}
public record Product : Item
{
}