]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Cleanup 2 warnings in `ReagentDispenserSystem` (#37622)
authorTayrtahn <tayrtahn@gmail.com>
Mon, 19 May 2025 22:18:10 +0000 (18:18 -0400)
committerGitHub <noreply@github.com>
Mon, 19 May 2025 22:18:10 +0000 (18:18 -0400)
* Cleanup 2 warnings in ReagentDispenserSystem

* Eh, let's be specific

Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs

index 3dc3cff2ec3de233c3ab51aae9273e125c4b1bdd..3cba02a5994e19459220c8ace7b47cba03ac4429 100644 (file)
@@ -50,7 +50,7 @@ namespace Content.Server.Chemistry.EntitySystems
             SubscribeLocalEvent<ReagentDispenserComponent, ReagentDispenserEjectContainerMessage>(OnEjectReagentMessage);
             SubscribeLocalEvent<ReagentDispenserComponent, ReagentDispenserClearContainerSolutionMessage>(OnClearContainerSolutionMessage);
 
-            SubscribeLocalEvent<ReagentDispenserComponent, MapInitEvent>(OnMapInit, before: new []{typeof(ItemSlotsSystem)});
+            SubscribeLocalEvent<ReagentDispenserComponent, MapInitEvent>(OnMapInit, before: new[] { typeof(ItemSlotsSystem) });
         }
 
         private void SubscribeUpdateUiState<T>(Entity<ReagentDispenserComponent> 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);