Add checks for various complex interactions (#37246)
* Prevent toggling radiation collectors * Prevent resisting locks * Prevent unbuckling others, early exit before doafter * Prevent camera and camera router setup * Prevent rotating and flipping * Also prevent adding the unbuckle verb. * Revert ResistLocker changes * Prevent emitter tampering * Also prevent lock verb * Prevent toggling welders * Prevent gun open/close bolt, rack and switch mode * Prevent toggling stun batons
This commit is contained in:
@@ -62,7 +62,7 @@ namespace Content.Server.Singularity.EntitySystems
|
||||
|
||||
private void OnActivate(EntityUid uid, EmitterComponent component, ActivateInWorldEvent args)
|
||||
{
|
||||
if (args.Handled)
|
||||
if (args.Handled || !args.Complex)
|
||||
return;
|
||||
|
||||
if (TryComp(uid, out LockComponent? lockComp) && lockComp.Locked)
|
||||
@@ -101,7 +101,7 @@ namespace Content.Server.Singularity.EntitySystems
|
||||
|
||||
private void OnGetVerb(EntityUid uid, EmitterComponent component, GetVerbsEvent<Verb> args)
|
||||
{
|
||||
if (!args.CanAccess || !args.CanInteract || args.Hands == null)
|
||||
if (!args.CanAccess || !args.CanInteract || !args.CanComplexInteract || args.Hands == null)
|
||||
return;
|
||||
|
||||
if (TryComp<LockComponent>(uid, out var lockComp) && lockComp.Locked)
|
||||
|
||||
Reference in New Issue
Block a user