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:
@@ -102,6 +102,13 @@ namespace Content.Server.DeviceNetwork.Components
|
|||||||
[DataField("sendBroadcastAttemptEvent")]
|
[DataField("sendBroadcastAttemptEvent")]
|
||||||
public bool SendBroadcastAttemptEvent = false;
|
public bool SendBroadcastAttemptEvent = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether this device's address can be saved to device-lists
|
||||||
|
/// </summary>
|
||||||
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
[DataField("savableAddress")]
|
||||||
|
public bool SavableAddress = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A list of device-lists that this device is on.
|
/// A list of device-lists that this device is on.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -106,6 +106,13 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem
|
|||||||
if (!targetUid.HasValue || !Resolve(targetUid.Value, ref device, false))
|
if (!targetUid.HasValue || !Resolve(targetUid.Value, ref device, false))
|
||||||
return;
|
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;
|
var address = device.Address;
|
||||||
if (string.IsNullOrEmpty(address))
|
if (string.IsNullOrEmpty(address))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
- type: DeviceNetwork
|
- type: DeviceNetwork
|
||||||
deviceNetId: Wireless
|
deviceNetId: Wireless
|
||||||
transmitFrequencyId: SuitSensor
|
transmitFrequencyId: SuitSensor
|
||||||
|
savableAddress: false
|
||||||
- type: WirelessNetworkConnection
|
- type: WirelessNetworkConnection
|
||||||
range: 1200
|
range: 1200
|
||||||
- type: StationLimitedNetwork
|
- type: StationLimitedNetwork
|
||||||
|
|||||||
@@ -244,6 +244,7 @@
|
|||||||
deviceNetId: Wireless
|
deviceNetId: Wireless
|
||||||
receiveFrequencyId: CyborgControl
|
receiveFrequencyId: CyborgControl
|
||||||
transmitFrequencyId: RoboticsConsole
|
transmitFrequencyId: RoboticsConsole
|
||||||
|
savableAddress: false
|
||||||
- type: OnUseTimerTrigger
|
- type: OnUseTimerTrigger
|
||||||
delay: 10
|
delay: 10
|
||||||
examinable: false
|
examinable: false
|
||||||
|
|||||||
@@ -67,6 +67,7 @@
|
|||||||
deviceNetId: Wireless
|
deviceNetId: Wireless
|
||||||
receiveFrequencyId: PDA
|
receiveFrequencyId: PDA
|
||||||
prefix: device-address-prefix-console
|
prefix: device-address-prefix-console
|
||||||
|
savableAddress: false
|
||||||
- type: WirelessNetworkConnection
|
- type: WirelessNetworkConnection
|
||||||
range: 500
|
range: 500
|
||||||
- type: CartridgeLoader
|
- type: CartridgeLoader
|
||||||
|
|||||||
Reference in New Issue
Block a user