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:
@@ -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++)
|
||||
{
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -597,6 +597,7 @@
|
||||
- SemiAuto
|
||||
soundGunshot:
|
||||
path: /Audio/Weapons/Guns/Gunshots/revolver.ogg
|
||||
clumsyProof: true
|
||||
- type: RevolverAmmoProvider
|
||||
whitelist:
|
||||
tags:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user