diff --git a/Content.Shared/Access/Systems/AccessReaderSystem.cs b/Content.Shared/Access/Systems/AccessReaderSystem.cs index b486d6dd9c..f8b0b47f1a 100644 --- a/Content.Shared/Access/Systems/AccessReaderSystem.cs +++ b/Content.Shared/Access/Systems/AccessReaderSystem.cs @@ -250,13 +250,13 @@ namespace Content.Shared.Access.Systems /// private bool FindAccessTagsItem(EntityUid uid, [NotNullWhen(true)] out HashSet? tags) { - if (EntityManager.TryGetComponent(uid, out AccessComponent? access)) + if (TryComp(uid, out AccessComponent? access)) { tags = access.Tags; return true; } - if (EntityManager.TryGetComponent(uid, out PDAComponent? pda) && + if (TryComp(uid, out PDAComponent? pda) && pda.ContainedID?.Owner is {Valid: true} id) { tags = EntityManager.GetComponent(id).Tags; @@ -273,7 +273,7 @@ namespace Content.Shared.Access.Systems /// private bool FindStationRecordKeyItem(EntityUid uid, [NotNullWhen(true)] out StationRecordKey? key) { - if (EntityManager.TryGetComponent(uid, out StationRecordKeyStorageComponent? storage) && storage.Key != null) + if (TryComp(uid, out StationRecordKeyStorageComponent? storage) && storage.Key != null) { key = storage.Key; return true; diff --git a/Content.Shared/Mech/EntitySystems/SharedMechSystem.cs b/Content.Shared/Mech/EntitySystems/SharedMechSystem.cs index 4261567fa7..114e7f9620 100644 --- a/Content.Shared/Mech/EntitySystems/SharedMechSystem.cs +++ b/Content.Shared/Mech/EntitySystems/SharedMechSystem.cs @@ -155,7 +155,7 @@ public abstract class SharedMechSystem : EntitySystem args.Entities.Add(pilot.Value); _access.FindAccessItemsInventory(pilot.Value, out var items); - args.Entities = args.Entities.Union(items).ToHashSet(); + args.Entities.UnionWith(items); } private void SetupUser(EntityUid mech, EntityUid pilot, SharedMechComponent? component = null) diff --git a/Content.Shared/Vehicle/SharedVehicleSystem.cs b/Content.Shared/Vehicle/SharedVehicleSystem.cs index 9e260a746d..aaf28e54b2 100644 --- a/Content.Shared/Vehicle/SharedVehicleSystem.cs +++ b/Content.Shared/Vehicle/SharedVehicleSystem.cs @@ -1,4 +1,3 @@ -using System.Linq; using Content.Shared.Access.Components; using Content.Shared.Access.Systems; using Content.Shared.Vehicle.Components; @@ -12,8 +11,6 @@ using Robust.Shared.Serialization; using Robust.Shared.Containers; using Content.Shared.Tag; using Content.Shared.Audio; -using Content.Shared.Hands.EntitySystems; -using Content.Shared.Inventory; namespace Content.Shared.Vehicle; @@ -192,7 +189,7 @@ public abstract partial class SharedVehicleSystem : EntitySystem args.Entities.Add(rider); _access.FindAccessItemsInventory(rider, out var items); - args.Entities = args.Entities.Union(items).ToHashSet(); + args.Entities.UnionWith(items); } ///