Rewrote container item space system to use 2 dimensional arrays (#442)

* Rewrote container item space system to use 2 dimensional arrays

* Moved container helper code into extension methods

* Reduced amount of parameters passed into `RowIsFull`

* Skip root trader items

* Remove debug

---------

Co-authored-by: Chomp <dev@dev.sp-tarkov.com>
This commit is contained in:
Chomp
2025-07-03 16:36:13 +01:00
committed by GitHub
parent a9918f9e1c
commit 4e2d4dc708
12 changed files with 416 additions and 393 deletions
@@ -23,11 +23,6 @@ public readonly struct MongoId : IEquatable<MongoId>
return;
}
if (id == "hideout")
{
throw new Exception("wtf");
}
if (id.Length != 24)
{
// TODO: Items.json root item has an empty parentId property
@@ -0,0 +1,33 @@
using System.Text.Json.Serialization;
namespace SPTarkov.Server.Core.Models.Spt.Inventory;
public class FindSlotResult
{
public FindSlotResult(bool success)
{
Success = success;
}
public FindSlotResult(bool success, int x, int y, bool rotation)
{
Success = success;
X = x;
Y = y;
Rotation = rotation;
}
public FindSlotResult() { }
[JsonPropertyName("success")]
public bool? Success { get; set; }
[JsonPropertyName("x")]
public int? X { get; set; }
[JsonPropertyName("y")]
public int? Y { get; set; }
[JsonPropertyName("rotation")]
public bool? Rotation { get; set; }
}