Equipment verbs & admin inventory access. (#14315)
This commit is contained in:
@@ -93,6 +93,7 @@ namespace Content.Shared.Verbs
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: fix this garbage and use proper generics or reflection or something else, not this.
|
||||
if (types.Contains(typeof(InteractionVerb)))
|
||||
{
|
||||
var verbEvent = new GetVerbsEvent<InteractionVerb>(user, target, @using, hands, canInteract, canAccess);
|
||||
@@ -145,6 +146,14 @@ namespace Content.Shared.Verbs
|
||||
verbs.UnionWith(verbEvent.Verbs);
|
||||
}
|
||||
|
||||
if (types.Contains(typeof(EquipmentVerb)))
|
||||
{
|
||||
var access = canAccess || _interactionSystem.CanAccessEquipment(user, target);
|
||||
var verbEvent = new GetVerbsEvent<EquipmentVerb>(user, target, @using, hands, canInteract, access);
|
||||
RaiseLocalEvent(target, verbEvent);
|
||||
verbs.UnionWith(verbEvent.Verbs);
|
||||
}
|
||||
|
||||
return verbs;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user