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)
|
private void OnShootAttempt(Entity<PacifiedComponent> ent, ref ShotAttemptedEvent args)
|
||||||
{
|
{
|
||||||
|
if (HasComp<PacifismAllowedGunComponent>(args.Used))
|
||||||
|
return;
|
||||||
|
|
||||||
// Disallow firing guns in all cases.
|
// Disallow firing guns in all cases.
|
||||||
ShowPopup(ent, args.Used, "pacified-cannot-fire-gun");
|
ShowPopup(ent, args.Used, "pacified-cannot-fire-gun");
|
||||||
args.Cancel();
|
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
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -869,6 +869,7 @@
|
|||||||
- type: Sprite
|
- type: Sprite
|
||||||
- type: Item
|
- type: Item
|
||||||
size: Normal
|
size: Normal
|
||||||
|
- type: PacifismAllowedGun
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: FoamWeaponBase
|
parent: FoamWeaponBase
|
||||||
|
|||||||
@@ -199,7 +199,7 @@
|
|||||||
sprite: Objects/Weapons/Guns/Rifles/foam_rifle.rsi
|
sprite: Objects/Weapons/Guns/Rifles/foam_rifle.rsi
|
||||||
- type: Item
|
- type: Item
|
||||||
sprite: Objects/Weapons/Guns/Rifles/foam_rifle_inhand_64x.rsi
|
sprite: Objects/Weapons/Guns/Rifles/foam_rifle_inhand_64x.rsi
|
||||||
- type: BallisticAmmoProvider
|
- type: BallisticAmmoProvider
|
||||||
whitelist:
|
whitelist:
|
||||||
tags:
|
tags:
|
||||||
- BulletFoam
|
- BulletFoam
|
||||||
@@ -216,3 +216,4 @@
|
|||||||
soundEmpty:
|
soundEmpty:
|
||||||
path: /Audio/Weapons/Guns/Empty/empty.ogg
|
path: /Audio/Weapons/Guns/Empty/empty.ogg
|
||||||
clumsyProof: true
|
clumsyProof: true
|
||||||
|
- type: PacifismAllowedGun
|
||||||
|
|||||||
Reference in New Issue
Block a user