Device-list limiting (#30997)

* PDA can no longer be linked to multitool

* Ignore previous commit, it would've broken things

* Added SavableAddress field to DeviceNetwork component and PDA for testing. Still need to implement

* System works, borg and pda addresses cannot be saved, but they still connect to the net.

* Suit sensors can no longer be added to network configurators, still work for monitoring purposes.

---------

Co-authored-by: Zachary Yona <magicalusf@gmail.com>
This commit is contained in:
Zachary Yona
2024-08-18 23:13:03 -04:00
committed by GitHub
parent ed3e10741f
commit f272097e07
5 changed files with 17 additions and 0 deletions

View File

@@ -106,6 +106,13 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem
if (!targetUid.HasValue || !Resolve(targetUid.Value, ref device, false))
return;
//This checks if the device is marked as having a savable address,
//to avoid adding pdas and whatnot to air alarms. This flag is true
//by default, so this will only prevent devices from being added to
//network configurator lists if manually set to false in the prototype
if (!device.SavableAddress)
return;
var address = device.Address;
if (string.IsNullOrEmpty(address))
{