Removal interaction without hands (#8843)
This commit is contained in:
@@ -30,7 +30,7 @@ namespace Content.Server.Construction
|
||||
|
||||
private void AddDeconstructVerb(EntityUid uid, ConstructionComponent component, GetVerbsEvent<Verb> args)
|
||||
{
|
||||
if (!args.CanAccess || !args.CanInteract)
|
||||
if (!args.CanAccess || !args.CanInteract || args.Hands == null)
|
||||
return;
|
||||
|
||||
if (component.TargetNode == component.DeconstructionNode ||
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Content.Server.Cuffs
|
||||
private void AddUncuffVerb(EntityUid uid, CuffableComponent component, GetVerbsEvent<Verb> args)
|
||||
{
|
||||
// Can the user access the cuffs, and is there even anything to uncuff?
|
||||
if (!args.CanAccess || component.CuffedHandCount == 0)
|
||||
if (!args.CanAccess || component.CuffedHandCount == 0 || args.Hands == null)
|
||||
return;
|
||||
|
||||
// We only check can interact if the user is not uncuffing themselves. As a result, the verb will show up
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Content.Server.Engineering.EntitySystems
|
||||
}
|
||||
private void AddDisassembleVerb(EntityUid uid, DisassembleOnAltVerbComponent component, GetVerbsEvent<AlternativeVerb> args)
|
||||
{
|
||||
if (!args.CanInteract || !args.CanAccess)
|
||||
if (!args.CanInteract || !args.CanAccess || args.Hands == null)
|
||||
return;
|
||||
|
||||
AlternativeVerb verb = new()
|
||||
|
||||
@@ -110,7 +110,7 @@ public sealed class SharpSystem : EntitySystem
|
||||
|
||||
private void OnGetInteractionVerbs(EntityUid uid, SharedButcherableComponent component, GetVerbsEvent<InteractionVerb> args)
|
||||
{
|
||||
if (component.Type != ButcheringType.Knife)
|
||||
if (component.Type != ButcheringType.Knife || args.Hands == null)
|
||||
return;
|
||||
|
||||
bool disabled = false;
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace Content.Server.Medical.SuitSensors
|
||||
return;
|
||||
|
||||
// standard interaction checks
|
||||
if (!args.CanAccess || !args.CanInteract)
|
||||
if (!args.CanAccess || !args.CanInteract || args.Hands == null)
|
||||
return;
|
||||
|
||||
args.Verbs.UnionWith(new[]
|
||||
|
||||
@@ -41,7 +41,7 @@ public sealed class StickySystem : EntitySystem
|
||||
|
||||
private void AddUnstickVerb(EntityUid uid, StickyComponent component, GetVerbsEvent<Verb> args)
|
||||
{
|
||||
if (component.StuckTo == null || !component.CanUnstick || !args.CanInteract)
|
||||
if (component.StuckTo == null || !component.CanUnstick || !args.CanInteract || args.Hands == null)
|
||||
return;
|
||||
|
||||
// we can't use args.CanAccess, because it stuck in another container
|
||||
|
||||
@@ -50,7 +50,7 @@ public abstract partial class SharedGunSystem
|
||||
|
||||
private void OnBallisticVerb(EntityUid uid, BallisticAmmoProviderComponent component, GetVerbsEvent<Verb> args)
|
||||
{
|
||||
if (!args.CanAccess || !args.CanInteract) return;
|
||||
if (!args.CanAccess || !args.CanInteract || args.Hands == null) return;
|
||||
|
||||
args.Verbs.Add(new Verb()
|
||||
{
|
||||
|
||||
@@ -98,7 +98,7 @@ public partial class SharedGunSystem
|
||||
|
||||
private void OnRevolverVerbs(EntityUid uid, RevolverAmmoProviderComponent component, GetVerbsEvent<Verb> args)
|
||||
{
|
||||
if (!args.CanAccess || !args.CanInteract) return;
|
||||
if (!args.CanAccess || !args.CanInteract || args.Hands == null) return;
|
||||
|
||||
args.Verbs.Add(new Verb()
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
allowSpectator: false # otherwise they can play client-side music
|
||||
inHandsOnly: false
|
||||
singleUser: true
|
||||
requireHands: true
|
||||
verbText: verb-instrument-openui
|
||||
key: enum.InstrumentUiKey.Key
|
||||
- type: InteractionOutline
|
||||
|
||||
Reference in New Issue
Block a user