Kill ContainerHelpers (#20908)
This commit is contained in:
@@ -6,15 +6,17 @@ namespace Content.Client.Interactable
|
||||
{
|
||||
public sealed class InteractionSystem : SharedInteractionSystem
|
||||
{
|
||||
[Dependency] private readonly SharedContainerSystem _container = default!;
|
||||
|
||||
public override bool CanAccessViaStorage(EntityUid user, EntityUid target)
|
||||
{
|
||||
if (!EntityManager.EntityExists(target))
|
||||
return false;
|
||||
|
||||
if (!target.TryGetContainer(out var container))
|
||||
if (!_container.TryGetContainingContainer(target, out var container))
|
||||
return false;
|
||||
|
||||
if (!TryComp(container.Owner, out StorageComponent? storage))
|
||||
if (!HasComp<StorageComponent>(container.Owner))
|
||||
return false;
|
||||
|
||||
// we don't check if the user can access the storage entity itself. This should be handed by the UI system.
|
||||
|
||||
Reference in New Issue
Block a user