//Don't filter anything if the device list is empty
if (component.Devices.Count == 0)
{
- if (component.IsAllowList) args.Cancel();
+ if (component.IsAllowList)
+ args.Cancel();
return;
}
foreach (var recipient in args.Recipients)
{
- if (component.Devices.Contains(recipient.Owner) == component.IsAllowList) filteredRecipients.Add(recipient);
+ if (component.Devices.Contains(recipient.Owner) == component.IsAllowList)
+ filteredRecipients.Add(recipient);
}
args.ModifiedRecipients = filteredRecipients;
var old = device.Devices.ToList();
device.Devices.ExceptWith(toRemove);
RaiseLocalEvent(uid, new DeviceListUpdateEvent(old, device.Devices.ToList()));
- Dirty(device);
+ Dirty(uid, device);
toRemove.Clear();
}
}
/// </summary>
private void OnUiClosed(EntityUid uid, NetworkConfiguratorComponent component, BoundUIClosedEvent args)
{
- component.ActiveDeviceList = null;
if (TryComp(component.ActiveDeviceList, out DeviceListComponent? list))
{
list.Configurators.Remove(uid);
}
+ component.ActiveDeviceList = null;
+
if (args.UiKey is NetworkConfiguratorUiKey.Link)
{
component.ActiveDeviceLink = null;