diff --git a/Content.Server/PDA/Ringer/RingerSystem.cs b/Content.Server/PDA/Ringer/RingerSystem.cs index e15dcfaa2b..0cc4ea86c2 100644 --- a/Content.Server/PDA/Ringer/RingerSystem.cs +++ b/Content.Server/PDA/Ringer/RingerSystem.cs @@ -43,13 +43,19 @@ namespace Content.Server.PDA.Ringer SubscribeLocalEvent(RingerPlayRingtone); SubscribeLocalEvent(UpdateRingerUserInterfaceDriver); - SubscribeLocalEvent(OnCurrencyInsert); + SubscribeLocalEvent(OnCurrencyInsert); } //Event Functions - private void OnCurrencyInsert(EntityUid uid, RingerUplinkComponent uplink, CurrencyInsertAttemptEvent args) + private void OnCurrencyInsert(EntityUid uid, RingerComponent ringer, CurrencyInsertAttemptEvent args) { + if (!TryComp(uid, out var uplink)) + { + args.Cancel(); + return; + } + // if the store can be locked, it must be unlocked first before inserting currency. Stops traitor checking. if (!uplink.Unlocked) args.Cancel(); diff --git a/Content.Server/Store/Systems/StoreSystem.cs b/Content.Server/Store/Systems/StoreSystem.cs index 0fd92cfb96..c13a9583be 100644 --- a/Content.Server/Store/Systems/StoreSystem.cs +++ b/Content.Server/Store/Systems/StoreSystem.cs @@ -5,11 +5,11 @@ using Content.Shared.Implants.Components; using Content.Shared.Interaction; using Content.Shared.Popups; using Content.Shared.Stacks; +using Content.Shared.Store.Components; using JetBrains.Annotations; using Robust.Shared.Prototypes; -using System.Linq; -using Content.Shared.Store.Components; using Robust.Shared.Utility; +using System.Linq; namespace Content.Server.Store.Systems;