]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix StoreTests EventBus usage (#38489)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Sat, 2 Aug 2025 15:23:44 +0000 (17:23 +0200)
committerGitHub <noreply@github.com>
Sat, 2 Aug 2025 15:23:44 +0000 (17:23 +0200)
Fix split off from #37349 to avoid needing to sync the content/engine PRs.

Content.IntegrationTests/Tests/StoreTests.cs

index e6aed787553109d7474a22145066eb790945f8d1..39df0fc8cc3a9184bfc899b4eb55d93c5e91ef9e 100644 (file)
@@ -128,7 +128,7 @@ public sealed class StoreTests
 
 
                     var buyMsg = new StoreBuyListingMessage(discountedListingItem.ID){Actor = human};
-                    server.EntMan.EventBus.RaiseComponentEvent(pda, storeComponent, buyMsg);
+                    server.EntMan.EventBus.RaiseLocalEvent(pda, buyMsg);
 
                     var newBalance = storeComponent.Balance[UplinkSystem.TelecrystalCurrencyPrototype];
                     Assert.That(newBalance.Value, Is.EqualTo((originalBalance - plainDiscountedCost).Value), "Expected to have balance reduced by discounted cost");
@@ -141,7 +141,7 @@ public sealed class StoreTests
                     Assert.That(costAfterBuy.Value, Is.EqualTo(prototypeCost.Value), "Expected cost after discount refund to be equal to prototype cost.");
 
                     var refundMsg = new StoreRequestRefundMessage { Actor = human };
-                    server.EntMan.EventBus.RaiseComponentEvent(pda, storeComponent, refundMsg);
+                    server.EntMan.EventBus.RaiseLocalEvent(pda, refundMsg);
 
                     // get refreshed item after refund re-generated items
                     discountedListingItem = storeComponent.FullListingsCatalog.First(x => x.ID == itemId);