Let Pacifists Use Certain Guns(Foam Weapons) (#29835)
Let Pacifists Use Certain Guns(foam)
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.CombatMode.Pacification;
|
||||
|
||||
/// <summary>
|
||||
/// Guns with this component can be fired by pacifists
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class PacifismAllowedGunComponent : Component
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user