mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
Non-uplink PDAs no longer can have TC inserted into them (#28985)
* PDAs no longer can have TC inserted into them * far better way of doing this --------- Co-authored-by: John Doe <johndoe@gmail.com>
This commit is contained in:
parent
24e7653c98
commit
6d71ec1b14
2 changed files with 10 additions and 4 deletions
|
|
@ -43,13 +43,19 @@ namespace Content.Server.PDA.Ringer
|
|||
SubscribeLocalEvent<RingerComponent, RingerPlayRingtoneMessage>(RingerPlayRingtone);
|
||||
SubscribeLocalEvent<RingerComponent, RingerRequestUpdateInterfaceMessage>(UpdateRingerUserInterfaceDriver);
|
||||
|
||||
SubscribeLocalEvent<RingerUplinkComponent, CurrencyInsertAttemptEvent>(OnCurrencyInsert);
|
||||
SubscribeLocalEvent<RingerComponent, CurrencyInsertAttemptEvent>(OnCurrencyInsert);
|
||||
}
|
||||
|
||||
//Event Functions
|
||||
|
||||
private void OnCurrencyInsert(EntityUid uid, RingerUplinkComponent uplink, CurrencyInsertAttemptEvent args)
|
||||
private void OnCurrencyInsert(EntityUid uid, RingerComponent ringer, CurrencyInsertAttemptEvent args)
|
||||
{
|
||||
if (!TryComp<RingerUplinkComponent>(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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue