Improve InteractionSystem range & BUI checks (#27999)

* Improve InteractionSystem range & BUI checks

* Ghost fixes

* AAA

* Fix test

* fix nullable

* revert to broadcast event

* Fixes for eengine PR

* Ah buckle code

* )
This commit is contained in:
Leon Friedrich
2024-05-24 17:03:03 +12:00
committed by GitHub
parent 01e7c9c37e
commit 76e13eed35
18 changed files with 232 additions and 248 deletions

View File

@@ -4,24 +4,6 @@ using Robust.Shared.Containers;
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 (!_container.TryGetContainingContainer(target, out var container))
return false;
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.
// Need to return if UI is open or not
return true;
}
}
// TODO Remove Shared prefix
public sealed class InteractionSystem : SharedInteractionSystem;
}