Xenoborg jammer now ignores xenoborg associated frequencies (#38005)
* stop jammer from jamming radio of certain frequency * xenoborg jammer no longer jamms xenoborg radio * stop jammer from jamming device network signals from certain frequency * xenoborg jammer no longer jamms xenoborg camera signal * the old tale of the missing ; * backwards * fix issue with readonly * comments to the frequencies excluded * triple typo * clearer summary * add summary * fixed 4th hidden typo
This commit is contained in:
@@ -30,6 +30,10 @@ public sealed class DeviceNetworkJammerSystem : SharedDeviceNetworkJammerSystem
|
||||
if (!_jammer.GetJammableNetworks((uid, jammerComp)).Contains(ev.NetworkId))
|
||||
continue;
|
||||
|
||||
if (jammerComp.FrequenciesExcluded != null &&
|
||||
jammerComp.FrequenciesExcluded.Contains(ev.Frequency))
|
||||
continue;
|
||||
|
||||
if (_transform.InRange(jammerXform.Coordinates, ev.SenderTransform.Coordinates, jammerComp.Range)
|
||||
|| _transform.InRange(jammerXform.Coordinates, xform.Comp.Coordinates, jammerComp.Range))
|
||||
{
|
||||
|
||||
@@ -349,7 +349,7 @@ namespace Content.Server.DeviceNetwork.Systems
|
||||
if (connection.Owner == packet.Sender)
|
||||
continue;
|
||||
|
||||
BeforePacketSentEvent beforeEv = new(packet.Sender, xform, senderPos, connection.NetIdEnum.ToString());
|
||||
BeforePacketSentEvent beforeEv = new(packet.Sender, xform, senderPos, connection.NetIdEnum.ToString(), packet.Frequency);
|
||||
RaiseLocalEvent(connection.Owner, beforeEv, false);
|
||||
|
||||
if (!beforeEv.Cancelled)
|
||||
|
||||
Reference in New Issue
Block a user