Merge branch 'master' into offmed-staging
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using Content.Server.Chat.Systems;
|
||||
using Content.Server.Emp;
|
||||
using Content.Shared.Inventory.Events;
|
||||
using Content.Shared.Radio;
|
||||
using Content.Shared.Radio.Components;
|
||||
@@ -22,8 +21,6 @@ public sealed class HeadsetSystem : SharedHeadsetSystem
|
||||
SubscribeLocalEvent<HeadsetComponent, EncryptionChannelsChangedEvent>(OnKeysChanged);
|
||||
|
||||
SubscribeLocalEvent<WearingHeadsetComponent, EntitySpokeEvent>(OnSpeak);
|
||||
|
||||
SubscribeLocalEvent<HeadsetComponent, EmpPulseEvent>(OnEmpPulse);
|
||||
}
|
||||
|
||||
private void OnKeysChanged(EntityUid uid, HeadsetComponent component, EncryptionChannelsChangedEvent args)
|
||||
@@ -71,7 +68,6 @@ public sealed class HeadsetSystem : SharedHeadsetSystem
|
||||
protected override void OnGotUnequipped(EntityUid uid, HeadsetComponent component, GotUnequippedEvent args)
|
||||
{
|
||||
base.OnGotUnequipped(uid, component, args);
|
||||
component.IsEquipped = false;
|
||||
RemComp<ActiveRadioComponent>(uid);
|
||||
RemComp<WearingHeadsetComponent>(args.Equipee);
|
||||
}
|
||||
@@ -84,6 +80,9 @@ public sealed class HeadsetSystem : SharedHeadsetSystem
|
||||
if (component.Enabled == value)
|
||||
return;
|
||||
|
||||
component.Enabled = value;
|
||||
Dirty(uid, component);
|
||||
|
||||
if (!value)
|
||||
{
|
||||
RemCompDeferred<ActiveRadioComponent>(uid);
|
||||
@@ -115,13 +114,4 @@ public sealed class HeadsetSystem : SharedHeadsetSystem
|
||||
if (TryComp(parent, out ActorComponent? actor))
|
||||
_netMan.ServerSendMessage(args.ChatMsg, actor.PlayerSession.Channel);
|
||||
}
|
||||
|
||||
private void OnEmpPulse(EntityUid uid, HeadsetComponent component, ref EmpPulseEvent args)
|
||||
{
|
||||
if (component.Enabled)
|
||||
{
|
||||
args.Affected = true;
|
||||
args.Disabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user