Make clumsy entities able to shoot funny weapons (#18156)

* Make clumsy entities able to shoot funny weapons

* remove unneeded line
This commit is contained in:
Arendian
2023-07-19 23:22:07 +02:00
committed by GitHub
parent 3caa1ea356
commit 580d481710
5 changed files with 13 additions and 2 deletions

View File

@@ -74,7 +74,7 @@ public sealed partial class GunSystem : SharedGunSystem
// Try a clumsy roll
// TODO: Who put this here
if (TryComp<ClumsyComponent>(user, out var clumsy))
if (TryComp<ClumsyComponent>(user, out var clumsy) && gun.ClumsyProof == false)
{
for (var i = 0; i < ammo.Count; i++)
{

View File

@@ -142,6 +142,13 @@ public partial class GunComponent : Component
/// </summary>
[DataField("showExamineText")]
public bool ShowExamineText = true;
/// <summary>
/// Whether or not someone with the
/// clumsy trait can shoot this
/// </summary>
[DataField("clumsyProof")]
public bool ClumsyProof = false;
}
[Flags]

View File

@@ -597,6 +597,7 @@
- SemiAuto
soundGunshot:
path: /Audio/Weapons/Guns/Gunshots/revolver.ogg
clumsyProof: true
- type: RevolverAmmoProvider
whitelist:
tags:

View File

@@ -12,6 +12,7 @@
sprite: Objects/Weapons/Guns/Pistols/water_pistol.rsi
size: 10
- type: Gun
clumsyProof: true
cameraRecoilScalar: 0 #no recoil
fireRate: 1
selectedMode: SemiAuto
@@ -101,4 +102,4 @@
- enum.DamageStateVisualLayers.Base:
icon: Rainbow
- enum.PowerDeviceVisualLayers.Powered:
detail2: Sixteen
detail2: Sixteen

View File

@@ -27,6 +27,7 @@
path: /Audio/Effects/thunk.ogg
soundEmpty:
path: /Audio/Items/hiss.ogg
clumsyProof: true
- type: ContainerAmmoProvider
container: storagebase
- type: PneumaticCannon
@@ -85,6 +86,7 @@
path: /Audio/Effects/thunk.ogg
soundEmpty:
path: /Audio/Items/hiss.ogg
clumsyProof: true
- type: ContainerAmmoProvider
container: storagebase
- type: Item