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:
SnappingOpossum
2025-10-31 06:19:36 +11:00
committed by GitHub
parent a181063eaf
commit 1cc726a609
3 changed files with 13 additions and 0 deletions

View File

@@ -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();