]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Use old reagent dispenser beaker slot ID (#24209)
author0x6273 <0x40@keemail.me>
Thu, 18 Jan 2024 01:30:30 +0000 (02:30 +0100)
committerGitHub <noreply@github.com>
Thu, 18 Jan 2024 01:30:30 +0000 (17:30 -0800)
Change the slot ID back to what it was to keep old map saves with an item in the slot loading correctly.

This also fixes the "You can't put this in the dispenser!" message not appearing when inserting an item without FitsInDispenserComponent because the whitelisted slot name wasn't changed.

Content.IntegrationTests/Tests/Chemistry/DispenserTest.cs
Content.Server/Chemistry/Components/ReagentDispenserComponent.cs
Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs
Content.Shared/Chemistry/SharedReagentDispenser.cs
Resources/Prototypes/Entities/Structures/Dispensers/base_structuredispensers.yml

index 98bb7da6b77d9470dcca1d395d80b8fdc17cc965..a5449308be4a433815b06ac54dcaeb368f0c6cd4 100644 (file)
@@ -25,7 +25,7 @@ public sealed class DispenserTest : InteractionTest
         await Interact();
 
         // Eject beaker via BUI.
-        var ev = new ItemSlotButtonPressedEvent(ReagentDispenserComponent.BeakerSlotId);
+        var ev = new ItemSlotButtonPressedEvent(SharedReagentDispenser.OutputSlotName);
         await SendBui(ReagentDispenserUiKey.Key, ev);
 
         // Beaker is back in the player's hands
index 4cf0d2e29e0517a0c7f3a1c10ffb045fcc5841d7..eb1839ef2ec4c474375dcf9a396ddbaf7e61265f 100644 (file)
@@ -39,11 +39,6 @@ namespace Content.Server.Chemistry.Components
         [DataField]
         public EntityWhitelist? StorageWhitelist;
 
-        /// <summary>
-        /// Slot for container to dispense into.
-        /// </summary>
-        public static string BeakerSlotId = "ReagentDispenser-beakerSlot";
-
         [DataField]
         public ItemSlot BeakerSlot = new();
 
index 109d5f351ac3cb9b66962676d5f7a46fd1a58134..d5ec310f87e26a1c167999f9b4af467681cecf59 100644 (file)
@@ -202,7 +202,7 @@ namespace Content.Server.Chemistry.EntitySystems
                 _itemSlotsSystem.AddItemSlot(uid, component.StorageSlotIds[i], component.StorageSlots[i]);
             }
 
-            _itemSlotsSystem.AddItemSlot(uid, ReagentDispenserComponent.BeakerSlotId, component.BeakerSlot);
+            _itemSlotsSystem.AddItemSlot(uid, SharedReagentDispenser.OutputSlotName, component.BeakerSlot);
         }
     }
 }
index be71bf8a7765ee012f40d1915d3f31a5f25b8cd9..22cb87dcdb91ec820ddd03703b284471c88280f7 100644 (file)
@@ -8,7 +8,7 @@ namespace Content.Shared.Chemistry
     /// </summary>
     public sealed class SharedReagentDispenser
     {
-        public const string OutputSlotName = "ReagentDispenser-beakerSlot";
+        public const string OutputSlotName = "beakerSlot";
     }
 
     [Serializable, NetSerializable]
index 4ce88c15827cb5d9c0f99fac26bc84569a09cb95..c54e9f548be713ce254cf22842e8d426a5784b08 100644 (file)
@@ -68,7 +68,7 @@
     containers:
       machine_board: !type:Container
       machine_parts: !type:Container
-      ReagentDispenser-beakerSlot: !type:ContainerSlot
+      beakerSlot: !type:ContainerSlot
   - type: StaticPrice
     price: 1000
   - type: Wires