Fix verbs in-hand.

Properly this time.
This commit is contained in:
Pieter-Jan Briers
2020-08-20 21:45:28 +02:00
parent e9d302f6e5
commit fc2ee61f75
6 changed files with 63 additions and 64 deletions

View File

@@ -207,11 +207,10 @@ namespace Content.Client.GameObjects.EntitySystems
//Get verbs, component dependent.
foreach (var (component, verb) in VerbUtility.GetVerbs(entity))
{
if (verb.RequireInteractionRange && !VerbUtility.InVerbUseRange(user, entity))
continue;
if (verb.BlockedByContainers && !user.IsInSameOrNoContainer(entity))
if (!VerbUtility.VerbAccessChecks(user, entity, verb))
{
continue;
}
var verbData = verb.GetData(user, component);
@@ -232,11 +231,10 @@ namespace Content.Client.GameObjects.EntitySystems
//Get global verbs. Visible for all entities regardless of their components.
foreach (var globalVerb in VerbUtility.GetGlobalVerbs(Assembly.GetExecutingAssembly()))
{
if (globalVerb.RequireInteractionRange && !VerbUtility.InVerbUseRange(user, entity))
continue;
if (globalVerb.BlockedByContainers && !user.IsInSameOrNoContainer(entity))
if (!VerbUtility.VerbAccessChecks(user, entity, globalVerb))
{
continue;
}
var verbData = globalVerb.GetData(user, entity);