Commit Graph

7 Commits

Author SHA1 Message Date
nikthechampiongr 11d85b8796
Create DeviceNetworkJammerComponent & System as a general way for entities to act as jammers (#26342)
* Add DeviceNetworkJammerComponent & System

Allows for entities to "jam" DeviceNetwork packets.

Whenever a device attempts to send a packet, the
DeviceNetworkJammerSystem listens for the BeforePacketSentEvent.
From there if any entity with the jammer component is within range of
either the sender or receiver of the packet the event will be cancelled.
Additionally jammers can only block packets in certain networks. If a
packet is not being transmitted in one of the networks it can block then
even if the jammer is in range the event will not be cancelled.

The range is stored in the jammer component along with the networks it
can jam.

Jammable network ids are stored as strings which seems to be how custom
networks are stored (E.g. network ids for suit sensors).

To allow for all of this, the BeforePacketSentEvent was modified to
provide the NetworkId.

* Make JammerSystem for the radio jammer use the DeviceNetworkJammer. Remove redundant event.

* Replace calls to TryDistance with InRange

(cherry picked from commit 266cc85f57)
2024-03-27 18:35:36 +01:00
nikthechampiongr 554aa0774b
Make radio jammer block suit sensors (#26046)
* Make radio jammer block suit sensors

* Fix stupid

Use CancellableEventArgs instead of doing what the hell I was doing before.

* Address Reviews.

Change the event from a CancellableEntityEventArgs to a ByRefEvent.

(cherry picked from commit dce24dfd03)
2024-03-17 15:07:58 +01:00
Tayrtahn 3f54180d28
Hotfix for errors in handheld lights and radio jammers (#25880)
(cherry picked from commit e5536e0652)
2024-03-07 01:52:49 +01:00
Tayrtahn a8d082374d
Remove all obsolete BatteryComponent method calls (#25871)
Removed all obsolete, non-ECS method calls to BatteryComponent

(cherry picked from commit 2935e5bd78)
2024-03-07 01:52:46 +01:00
Slava0135 811b35a1cf
display item charge on examine (#16116) 2023-05-05 22:44:21 +10:00
Slava0135 8aef835d33
radio systems replace all entity query with enumerator (#15449) 2023-04-23 18:29:08 +10:00
Slava0135 7886d27dda
Add radio jammer (#14369) 2023-04-14 12:50:19 -07:00