diff --git a/Content.IntegrationTests/Tests/MaterialArbitrageTest.cs b/Content.IntegrationTests/Tests/MaterialArbitrageTest.cs index 42c5471c44..51be2fb431 100644 --- a/Content.IntegrationTests/Tests/MaterialArbitrageTest.cs +++ b/Content.IntegrationTests/Tests/MaterialArbitrageTest.cs @@ -359,7 +359,7 @@ public sealed class MaterialArbitrageTest { var ent = entManager.SpawnEntity(id, testMap.GridCoords); stackSys.SetCount(ent, 1); - priceCache[id] = price = pricing.GetPrice(ent); + priceCache[id] = price = pricing.GetPrice(ent, false); entManager.DeleteEntity(ent); }); } diff --git a/Content.Server/Cargo/Systems/PricingSystem.cs b/Content.Server/Cargo/Systems/PricingSystem.cs index 9e1970d63c..f878eeee75 100644 --- a/Content.Server/Cargo/Systems/PricingSystem.cs +++ b/Content.Server/Cargo/Systems/PricingSystem.cs @@ -199,7 +199,7 @@ public sealed class PricingSystem : EntitySystem /// This fires off an event to calculate the price. /// Calculating the price of an entity that somehow contains itself will likely hang. /// - public double GetPrice(EntityUid uid) + public double GetPrice(EntityUid uid, bool includeContents = true) { var ev = new PriceCalculationEvent(); RaiseLocalEvent(uid, ref ev); @@ -222,7 +222,7 @@ public sealed class PricingSystem : EntitySystem price += GetStaticPrice(uid); } - if (TryComp(uid, out var containers)) + if (includeContents && TryComp(uid, out var containers)) { foreach (var container in containers.Containers.Values) {