refactor(backend): simplify cargo kind loading
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user