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 // Try a clumsy roll
// TODO: Who put this here // 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++) for (var i = 0; i < ammo.Count; i++)
{ {

View File

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

View File

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

View File

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

View File

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