refactor(backend): simplify cargo kind loading

This commit is contained in:
2026-03-27 15:18:42 -04:00
parent e8fb033a01
commit 3237735b08
11 changed files with 35 additions and 82 deletions

View File

@@ -801,7 +801,7 @@ internal sealed class SimulationProjectionService
.Select(storageKind => new StationStorageUsageSnapshot(
storageKind.ToDataValue(),
station.Inventory
.Where(entry => world.ItemDefinitions.TryGetValue(entry.Key, out var definition) && definition.CargoStorageKind == storageKind)
.Where(entry => world.ItemDefinitions.TryGetValue(entry.Key, out var definition) && definition.CargoKind == storageKind)
.Sum(entry => entry.Value),
GetStationStorageCapacity(world, station, storageKind)))
.Where(snapshot => snapshot.Capacity > 0.01f)