Fix being able to do most verbs from within a container (#1613)
* Fix being able to do most verbs from within a container * Fix missing container check when using global verbs
This commit is contained in:
@@ -210,6 +210,9 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
if (verb.RequireInteractionRange && !VerbUtility.InVerbUseRange(user, entity))
|
||||
continue;
|
||||
|
||||
if (verb.BlockedByContainers && !user.IsInSameOrNoContainer(entity))
|
||||
continue;
|
||||
|
||||
var verbData = verb.GetData(user, component);
|
||||
|
||||
if (verbData.IsInvisible)
|
||||
@@ -232,6 +235,9 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
if (globalVerb.RequireInteractionRange && !VerbUtility.InVerbUseRange(user, entity))
|
||||
continue;
|
||||
|
||||
if (globalVerb.BlockedByContainers && !user.IsInSameOrNoContainer(entity))
|
||||
continue;
|
||||
|
||||
var verbData = globalVerb.GetData(user, entity);
|
||||
|
||||
if (verbData.IsInvisible)
|
||||
|
||||
@@ -11,6 +11,8 @@ namespace Content.Client.GlobalVerbs
|
||||
{
|
||||
public override bool RequireInteractionRange => false;
|
||||
|
||||
public override bool BlockedByContainers => false;
|
||||
|
||||
public override void GetData(IEntity user, IEntity target, VerbData data)
|
||||
{
|
||||
data.Visibility = VerbVisibility.Visible;
|
||||
|
||||
Reference in New Issue
Block a user