Skip to content

Commit

Permalink
Use old reagent dispenser beaker slot ID (#24209)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
0x6273 authored Jan 18, 2024
1 parent a32f0da commit 7a7d001
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Content.IntegrationTests/Tests/Chemistry/DispenserTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public async Task InsertEjectBuiTest()
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ public sealed partial class ReagentDispenserComponent : Component
[DataField]
public EntityWhitelist? StorageWhitelist;

/// <summary>
/// Slot for container to dispense into.
/// </summary>
public static string BeakerSlotId = "ReagentDispenser-beakerSlot";

[DataField]
public ItemSlot BeakerSlot = new();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ private void OnMapInit(EntityUid uid, ReagentDispenserComponent component, MapIn
_itemSlotsSystem.AddItemSlot(uid, component.StorageSlotIds[i], component.StorageSlots[i]);
}

_itemSlotsSystem.AddItemSlot(uid, ReagentDispenserComponent.BeakerSlotId, component.BeakerSlot);
_itemSlotsSystem.AddItemSlot(uid, SharedReagentDispenser.OutputSlotName, component.BeakerSlot);
}
}
}
2 changes: 1 addition & 1 deletion Content.Shared/Chemistry/SharedReagentDispenser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7a7d001

Please sign in to comment.