Commit Graph

20 Commits

Author SHA1 Message Date
nikthechampiongr
266cc85f57 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
2024-03-24 21:59:16 -04:00
Leon Friedrich
0b803e5f8d Try fix invalid entities in device networks (#22845)
* Try fix invalid entities in device networks

* more fixes

* a

* fix device merging
2023-12-21 21:18:40 -07:00
deltanedas
e837f2fd85 air alarm signal ports and other stuff (#18642)
Co-authored-by: deltanedas <@deltanedas:kde.org>
2023-08-21 14:18:30 -07:00
metalgearsloth
68480af109 Update content vectors to numerics (#17759) 2023-07-08 14:08:32 +10:00
Julian Giebel
49cb9d0e1e Prevent infinite loops in device linking (#16856) 2023-05-29 02:14:06 +10:00
Julian Giebel
2bb1fde4dc Remove devices from device lists when they get deleted (#16783)
* Implement device network device shutdown subscribtion
Implement removing devices from device lists when they get deleted

* Improve name and doc comment for DeviceShutDownEvent

* Change ShutdownSubscriber data field tag

* Change UpdateRemovalSubscription name to UpdateShutdownSubscription
2023-05-25 16:08:22 -06:00
Julian Giebel
c2b87dfeda Add a crew monitoring server (#7542) 2023-01-22 21:07:57 -04:00
Visne
c6d3e4f3bd Fix warnings and code cleanup/fixes (#13570) 2023-01-19 13:56:45 +11:00
Flipp Syder
b6a548fb97 adds examinable text for address to some device networked entities (#11455) 2022-09-22 14:00:54 -05:00
Flipp Syder
d447b0f80e Air alarm patches (#11004) 2022-09-04 02:04:15 -07:00
metalgearsloth
8905996cfc Make raiselocalevent not broadcast by default (#8998) 2022-06-22 09:53:41 +10:00
Julian Giebel
f4be8b5793 Device network DeviceLists and the NetworkConfigurator (Makes air alarms usable) (#7697)
* Implement DeviceList
Implement NetworkConfigurator
I sould really get into the habit of making smaller commits

* Remove ApcNetworkComponent from vents, scrubbers anf firelocks

* Change BeforeBroadcastAttemptEvent#Recepients to readonly IReadonlySet and add a ModifiedRecepients field

* Address revievs in NetworkConfigurationSystem

* Fix red and green button styles

* Change NetworkConfiguratorSystem#UpdateState to remove saved entites that don't exist anymore

* Add AtmosDevices device net id

* Add const strings for style classes
Fix wrong margin for NetworkConfiguratorConfigurationMenu

* Hello? Github?

* Add access check before opening the configuration ui

* Address reviews

* Fix call to access reader

* You shall not live again IgnoreComponent

* Fix interaction verb check

* Fix configuration window not closing when target gets deleted / out of range

* Change device is already saved message to say 'network device: ... is already saves'

* Apply suggestions from code review

Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>

* Fix applied suggestion

Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com>
Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
2022-06-09 18:28:24 -07:00
wrexbe
6fa431cfce Unrestrict device net ids (#8332) 2022-05-22 07:36:21 -07:00
wrexbe
a91aed082f Cleaning device net system (#8153) 2022-05-17 09:52:37 +10:00
Leon Friedrich
a4d55235cc Rejig Device networks (#7380) 2022-04-08 22:27:10 +10:00
mirrorcult
ec4d4688c7 Seal/abstract/virtual everything (#6739) 2022-02-16 18:23:23 +11:00
Vera Aguilera Puerto
5cd42c9ad6 Inline UID 2021-12-03 15:53:09 +01:00
Vera Aguilera Puerto
f3edecf994 Some manual TryGetComponent inlines 2021-12-03 12:51:44 +01:00
Julian Giebel
45caf25ea9 Apc device network and apc based light switch (#4908)
* Remove WireNet node group from cables
Implement extension cable components and system
Remove connection over distance logic from ApcPower... components

* Add extension cable components to prototypes

* Implement ApcNetwork
Implement ApcNetSwitch

* Fix ignoredComponents.cs

* Add friend attribute to new components

* Add construction graph for a light switch

* Address reviews

* Fix broken test

* Move ConnectionType enum to DeviceNetworkComponent
Change netId data definition to use the ConnectionType enum values

Co-authored-by: Julian Giebel <j.giebel@netrocks.info>
2021-10-23 16:23:19 -07:00
Julian Giebel
a6f2c21919 Device network as ecs (#4205)
* Work on DeviceNetworkSystem

* Implement device networking as ecs
Remove mailing unit code for now
Remove device network metadata

* Implement integration tests for device networking

* Remove manual updating DeviceNetworkSystem and use WaitRunTicks

* Fix wrong component name in ignored components

* Apply suggestions from code review

Co-authored-by: mirrorcult <notzombiedude@gmail.com>

* Rename NetworkUtils to DeviceNetworkConstants
Change connection type constants to enum
Remove create function from network payload class

* Change broken nodegroup check in wirenet to grid check

* Change ComponentManager to entity manager in DeviceNetworkSystem

* Fix smaller mistakes

* Wtf random test fail pls run them again smh

* Fix DataField in DeviceNetworkComponent

* Fix yaml in DeviceNetworkTest

* Fix DeviceNetworkComponent DeviceNetId property

Co-authored-by: Julian Giebel <j.giebel@netrocks.info>
Co-authored-by: mirrorcult <notzombiedude@gmail.com>
2021-10-11 14:41:18 -07:00