Misc implant fixes (#17172)

This commit is contained in:
Leon Friedrich
2023-06-07 15:53:11 +12:00
committed by GitHub
parent 1a3f8f2c2c
commit 677ef07aa2
8 changed files with 132 additions and 79 deletions

View File

@@ -34,10 +34,18 @@ namespace Content.Server.PDA.Ringer
SubscribeLocalEvent<RingerComponent, RingerPlayRingtoneMessage>(RingerPlayRingtone);
SubscribeLocalEvent<RingerComponent, RingerRequestUpdateInterfaceMessage>(UpdateRingerUserInterfaceDriver);
SubscribeLocalEvent<RingerUplinkComponent, CurrencyInsertAttemptEvent>(OnCurrencyInsert);
}
//Event Functions
private void OnCurrencyInsert(EntityUid uid, RingerUplinkComponent uplink, CurrencyInsertAttemptEvent args)
{
// if the store can be locked, it must be unlocked first before inserting currency. Stops traitor checking.
if (!uplink.Unlocked)
args.Cancel();
}
private void RingerPlayRingtone(EntityUid uid, RingerComponent ringer, RingerPlayRingtoneMessage args)
{
EnsureComp<ActiveRingerComponent>(uid);