Fix access for vehicles and mechs (#20737)
* fix access for vehicles and mechs * optimize
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using System.Numerics;
|
||||
using Content.Shared.Access.Components;
|
||||
using Content.Shared.Access.Systems;
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Audio;
|
||||
using Content.Shared.Buckle;
|
||||
@@ -35,7 +34,6 @@ public abstract partial class SharedVehicleSystem : EntitySystem
|
||||
[Dependency] private readonly SharedAmbientSoundSystem _ambientSound = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
[Dependency] private readonly TagSystem _tagSystem = default!;
|
||||
[Dependency] private readonly AccessReaderSystem _access = default!;
|
||||
[Dependency] private readonly SharedPopupSystem _popupSystem = default!;
|
||||
[Dependency] private readonly SharedHandVirtualItemSystem _virtualItemSystem = default!;
|
||||
[Dependency] private readonly SharedActionsSystem _actionsSystem = default!;
|
||||
@@ -326,11 +324,7 @@ public abstract partial class SharedVehicleSystem : EntitySystem
|
||||
{
|
||||
if (component.Rider == null)
|
||||
return;
|
||||
var rider = component.Rider.Value;
|
||||
|
||||
args.Entities.Add(rider);
|
||||
_access.FindAccessItemsInventory(rider, out var items);
|
||||
args.Entities.UnionWith(items);
|
||||
args.Entities.Add(component.Rider.Value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user