Revert "Upstream (#148)"

This reverts commit 9f00d4b9aa.
This commit is contained in:
Jabak
2024-10-22 22:47:57 +03:00
parent 9f00d4b9aa
commit dbc492f3f3
96 changed files with 1080 additions and 1047 deletions

View File

@@ -72,7 +72,19 @@ namespace Content.Shared.Verbs
extraCategories = new();
// accessibility checks
var canAccess = force || _interactionSystem.InRangeAndAccessible(user, target);
bool canAccess = false;
if (force || target == user)
canAccess = true;
else if (_interactionSystem.InRangeUnobstructed(user, target))
{
// Note that being in a container does not count as an obstruction for InRangeUnobstructed
// Therefore, we need extra checks to ensure the item is actually accessible:
if (ContainerSystem.IsInSameOrParentContainer(user, target))
canAccess = true;
else
// the item might be in a backpack that the user has open
canAccess = _interactionSystem.CanAccessViaStorage(user, target);
}
// A large number of verbs need to check action blockers. Instead of repeatedly having each system individually
// call ActionBlocker checks, just cache it for the verb request.