diff --git a/Content.IntegrationTests/Tests/StoreTests.cs b/Content.IntegrationTests/Tests/StoreTests.cs index 1fdcbdbe72..f9ae29ea63 100644 --- a/Content.IntegrationTests/Tests/StoreTests.cs +++ b/Content.IntegrationTests/Tests/StoreTests.cs @@ -82,14 +82,6 @@ public sealed class StoreTests var storeComponent = entManager.GetComponent(pda); var discountComponent = entManager.GetComponent(pda); - Assert.That( - discountComponent.Discounts, - Has.Exactly(6).Items, - $"After applying discount total discounted items count was expected to be '6' " - + $"but was actually {discountComponent.Discounts.Count}- this can be due to discount " - + $"categories settings (maxItems, weight) not being realistically set, or default " - + $"discounted count being changed from '6' in StoreDiscountSystem.InitializeDiscounts." - ); var discountedListingItems = storeComponent.FullListingsCatalog .Where(x => x.IsCostModified) .OrderBy(x => x.ID) diff --git a/Content.Server/StoreDiscount/Systems/StoreDiscountSystem.cs b/Content.Server/StoreDiscount/Systems/StoreDiscountSystem.cs index b8d58af20d..f76948f12a 100644 --- a/Content.Server/StoreDiscount/Systems/StoreDiscountSystem.cs +++ b/Content.Server/StoreDiscount/Systems/StoreDiscountSystem.cs @@ -75,8 +75,7 @@ public sealed class StoreDiscountSystem : EntitySystem // WD EDIT START private void OnMapInit(EntityUid uid, StoreDiscountComponent component, MapInitEvent args) { - - if (!TryComp(uid, out var store)) + if (!TryComp(uid, out var store) || component.Discounts.Count != 0) return; var uplinkInitializedEvent = new StoreInitializedEvent(