diff --git a/Content.Server/Payload/EntitySystems/PayloadSystem.cs b/Content.Server/Payload/EntitySystems/PayloadSystem.cs index 11e97c5b93..542c3559d5 100644 --- a/Content.Server/Payload/EntitySystems/PayloadSystem.cs +++ b/Content.Server/Payload/EntitySystems/PayloadSystem.cs @@ -150,7 +150,9 @@ public sealed class PayloadSystem : EntitySystem private void HandleChemicalPayloadTrigger(Entity entity, ref TriggerEvent args) { - // TODO: Adjust to the new trigger system + if (args.Key != null && !entity.Comp.KeysIn.Contains(args.Key)) + return; + if (entity.Comp.BeakerSlotA.Item is not EntityUid beakerA || entity.Comp.BeakerSlotB.Item is not EntityUid beakerB || !TryComp(beakerA, out FitsInDispenserComponent? compA) diff --git a/Content.Shared/Payload/Components/ChemicalPayloadComponent.cs b/Content.Shared/Payload/Components/ChemicalPayloadComponent.cs index d00382ee84..3b29d78777 100644 --- a/Content.Shared/Payload/Components/ChemicalPayloadComponent.cs +++ b/Content.Shared/Payload/Components/ChemicalPayloadComponent.cs @@ -1,4 +1,5 @@ using Content.Shared.Containers.ItemSlots; +using Content.Shared.Trigger.Systems; using Robust.Shared.Serialization; namespace Content.Shared.Payload.Components; @@ -14,6 +15,12 @@ public sealed partial class ChemicalPayloadComponent : Component [DataField("beakerSlotB", required: true)] public ItemSlot BeakerSlotB = new(); + + /// + /// The keys that will activate the chemical payload. + /// + [DataField] + public List KeysIn = new() { TriggerSystem.DefaultTriggerKey }; } [Serializable, NetSerializable]