Fix right-click verbs.
This commit is contained in:
@@ -113,8 +113,17 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
if (verb.RequireInteractionRange && !VerbUtility.InVerbUseRange(userEntity, entity))
|
||||
continue;
|
||||
|
||||
if (verb.BlockedByContainers && !userEntity.IsInSameOrNoContainer(entity))
|
||||
if (verb.BlockedByContainers)
|
||||
{
|
||||
if (!userEntity.IsInSameOrNoContainer(entity))
|
||||
{
|
||||
if (!ContainerHelpers.TryGetContainer(entity, out var container) ||
|
||||
container.Owner != userEntity)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var verbData = verb.GetData(userEntity, component);
|
||||
if (verbData.IsInvisible)
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace Content.Shared.GameObjects.Verbs
|
||||
/// <summary>
|
||||
/// If true, this verb requires both the user and the entity on which
|
||||
/// this verb resides to be in the same container or no container.
|
||||
/// OR the user can be the entity's container
|
||||
/// </summary>
|
||||
public virtual bool BlockedByContainers => true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user