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:
@@ -78,7 +78,7 @@ public abstract partial class SharedGunSystem
|
||||
/// </summary>
|
||||
private void OnChamberActivationVerb(EntityUid uid, ChamberMagazineAmmoProviderComponent component, GetVerbsEvent<ActivationVerb> args)
|
||||
{
|
||||
if (!args.CanAccess || !args.CanInteract || component.BoltClosed == null || !component.CanRack)
|
||||
if (!args.CanAccess || !args.CanInteract || !args.CanComplexInteract || args.Hands == null || component.BoltClosed == null || !component.CanRack)
|
||||
return;
|
||||
|
||||
args.Verbs.Add(new ActivationVerb()
|
||||
@@ -131,7 +131,7 @@ public abstract partial class SharedGunSystem
|
||||
/// </summary>
|
||||
private void OnChamberInteractionVerb(EntityUid uid, ChamberMagazineAmmoProviderComponent component, GetVerbsEvent<InteractionVerb> args)
|
||||
{
|
||||
if (!args.CanAccess || !args.CanInteract || component.BoltClosed == null)
|
||||
if (!args.CanAccess || !args.CanInteract || !args.CanComplexInteract || args.Hands == null || component.BoltClosed == null)
|
||||
return;
|
||||
|
||||
args.Verbs.Add(new InteractionVerb()
|
||||
|
||||
Reference in New Issue
Block a user