Strip someone through the examine button (#12409)
This commit is contained in:
@@ -37,6 +37,7 @@ namespace Content.Server.Strip
|
|||||||
base.Initialize();
|
base.Initialize();
|
||||||
|
|
||||||
SubscribeLocalEvent<StrippableComponent, GetVerbsEvent<Verb>>(AddStripVerb);
|
SubscribeLocalEvent<StrippableComponent, GetVerbsEvent<Verb>>(AddStripVerb);
|
||||||
|
SubscribeLocalEvent<StrippableComponent, GetVerbsEvent<ExamineVerb>>(AddStripExamineVerb);
|
||||||
|
|
||||||
// BUI
|
// BUI
|
||||||
SubscribeLocalEvent<StrippableComponent, StrippingSlotButtonPressed>(OnStripButtonPressed);
|
SubscribeLocalEvent<StrippableComponent, StrippingSlotButtonPressed>(OnStripButtonPressed);
|
||||||
@@ -132,6 +133,25 @@ namespace Content.Server.Strip
|
|||||||
args.Verbs.Add(verb);
|
args.Verbs.Add(verb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void AddStripExamineVerb(EntityUid uid, StrippableComponent component, GetVerbsEvent<ExamineVerb> args)
|
||||||
|
{
|
||||||
|
if (args.Hands == null || !args.CanAccess || !args.CanInteract || args.Target == args.User)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!HasComp<ActorComponent>(args.User))
|
||||||
|
return;
|
||||||
|
|
||||||
|
ExamineVerb verb = new()
|
||||||
|
{
|
||||||
|
Text = Loc.GetString("strip-verb-get-data-text"),
|
||||||
|
IconTexture = "/Textures/Interface/VerbIcons/outfit.svg.192dpi.png",
|
||||||
|
Act = () => StartOpeningStripper(args.User, component, true),
|
||||||
|
Category = VerbCategory.Examine,
|
||||||
|
};
|
||||||
|
|
||||||
|
args.Verbs.Add(verb);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Places item in user's active hand to an inventory slot.
|
/// Places item in user's active hand to an inventory slot.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user