From 7196c773c047108d579ce146f10f89318e0abc8c Mon Sep 17 00:00:00 2001 From: goet <6637097+goet@users.noreply.github.com> Date: Tue, 24 Sep 2024 18:32:04 +0200 Subject: [PATCH] readd setter method to system --- .../VendingMachines/VendingMachineSystem.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Content.Server/VendingMachines/VendingMachineSystem.cs b/Content.Server/VendingMachines/VendingMachineSystem.cs index 38407a98c72943..90fe4cb7d8ae7b 100644 --- a/Content.Server/VendingMachines/VendingMachineSystem.cs +++ b/Content.Server/VendingMachines/VendingMachineSystem.cs @@ -192,6 +192,18 @@ public void SetShooting(EntityUid uid, bool canShoot, VendingMachineComponent? c component.CanShoot = canShoot; } + /// + /// Sets the property of the vending machine. + /// + public void SetContraband(EntityUid uid, bool contraband, VendingMachineComponent? component = null) + { + if (!Resolve(uid, ref component)) + return; + + component.Contraband = contraband; + Dirty(uid, component); + } + public void Deny(EntityUid uid, VendingMachineComponent? vendComponent = null) { if (!Resolve(uid, ref vendComponent))