Type fixes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user