From: Tayrtahn Date: Mon, 19 May 2025 22:18:10 +0000 (-0400) Subject: Cleanup 2 warnings in `ReagentDispenserSystem` (#37622) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=004e084b5ab38ba35cb3890e28da940fb9cc305f;p=space-station-14.git Cleanup 2 warnings in `ReagentDispenserSystem` (#37622) * Cleanup 2 warnings in ReagentDispenserSystem * Eh, let's be specific --- diff --git a/Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs b/Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs index 3dc3cff2ec..3cba02a599 100644 --- a/Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs @@ -50,7 +50,7 @@ namespace Content.Server.Chemistry.EntitySystems SubscribeLocalEvent(OnEjectReagentMessage); SubscribeLocalEvent(OnClearContainerSolutionMessage); - SubscribeLocalEvent(OnMapInit, before: new []{typeof(ItemSlotsSystem)}); + SubscribeLocalEvent(OnMapInit, before: new[] { typeof(ItemSlotsSystem) }); } private void SubscribeUpdateUiState(Entity ent, ref T ev) @@ -134,7 +134,7 @@ namespace Content.Server.Chemistry.EntitySystems // Ensure that the reagent is something this reagent dispenser can dispense. var storageLocation = message.StorageLocation; var storedContainer = storage.StoredItems.FirstOrDefault(kvp => kvp.Value == storageLocation).Key; - if (storedContainer == null) + if (storedContainer == EntityUid.Invalid) return; var outputContainer = _itemSlotsSystem.GetItemOrNull(reagentDispenser, SharedReagentDispenser.OutputSlotName); @@ -165,7 +165,7 @@ namespace Content.Server.Chemistry.EntitySystems var storageLocation = message.StorageLocation; var storedContainer = storage.StoredItems.FirstOrDefault(kvp => kvp.Value == storageLocation).Key; - if (storedContainer == null) + if (storedContainer == EntityUid.Invalid) return; _handsSystem.TryPickupAnyHand(message.Actor, storedContainer);