Let Pacifists Use Certain Guns(Foam Weapons) (#29835)

Let Pacifists Use Certain Guns(foam)
This commit is contained in:
Cojoke
2024-07-09 08:46:21 -05:00
committed by GitHub
parent 7bf77beb9e
commit 62d8665484
4 changed files with 17 additions and 1 deletions

View File

@@ -62,6 +62,9 @@ public sealed class PacificationSystem : EntitySystem
private void OnShootAttempt(Entity<PacifiedComponent> ent, ref ShotAttemptedEvent args)
{
if (HasComp<PacifismAllowedGunComponent>(args.Used))
return;
// Disallow firing guns in all cases.
ShowPopup(ent, args.Used, "pacified-cannot-fire-gun");
args.Cancel();