Allow pacifists to use disabling modes of energy magnum and energy shotgun (#41029)
Pacifists can stun with emagnum and eshotgun
This commit is contained in:
@@ -6,6 +6,7 @@ using Content.Shared.IdentityManagement;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Throwing;
|
||||
using Content.Shared.Weapons.Ranged.Components;
|
||||
using Content.Shared.Weapons.Ranged.Events;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
@@ -65,6 +66,10 @@ public sealed class PacificationSystem : EntitySystem
|
||||
if (HasComp<PacifismAllowedGunComponent>(args.Used))
|
||||
return;
|
||||
|
||||
if (TryComp<BatteryWeaponFireModesComponent>(args.Used, out var component))
|
||||
if (component.FireModes[component.CurrentFireMode].PacifismAllowedMode)
|
||||
return;
|
||||
|
||||
// Disallow firing guns in all cases.
|
||||
ShowPopup(ent, args.Used, "pacified-cannot-fire-gun");
|
||||
args.Cancel();
|
||||
|
||||
Reference in New Issue
Block a user