From f6759ea97bd8523f4bf8912013813928e22e0d3a Mon Sep 17 00:00:00 2001 From: Theo Date: Fri, 10 Apr 2026 12:35:16 -0500 Subject: [PATCH] Punpun guns (#5563) * turn clumsygunns off on punpun (this shit broken) * fix * punpun fails 20% of the time, new clumsygunshootcheck system --- Content.Shared/Clumsy/ClumsyComponent.cs | 8 ++++++++ Content.Shared/Clumsy/ClumsySystem.cs | 2 +- Resources/Prototypes/Entities/Mobs/NPCs/pets.yml | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Content.Shared/Clumsy/ClumsyComponent.cs b/Content.Shared/Clumsy/ClumsyComponent.cs index 9e6e851c8c..b40c48cdae 100644 --- a/Content.Shared/Clumsy/ClumsyComponent.cs +++ b/Content.Shared/Clumsy/ClumsyComponent.cs @@ -26,6 +26,14 @@ public sealed partial class ClumsyComponent : Component [DataField, AutoNetworkedField] public float ClumsyDefaultCheck = 0.5f; + // Begin DeltaV Changes - Gun + /// + /// Chance for a clumsy entity to fail when shooting a weapon + /// + [DataField, AutoNetworkedField] + public float ClumsyGunShootCheck = 0.5f; + // End DeltaV Changes - Gun + /// /// Default stun time. /// If a system needs to use something else, add a new variable in the component, do not modify this number. diff --git a/Content.Shared/Clumsy/ClumsySystem.cs b/Content.Shared/Clumsy/ClumsySystem.cs index 9d0767aa3e..f057414920 100644 --- a/Content.Shared/Clumsy/ClumsySystem.cs +++ b/Content.Shared/Clumsy/ClumsySystem.cs @@ -124,7 +124,7 @@ public sealed class ClumsySystem : EntitySystem // TODO: Replace with RandomPredicted once the engine PR is merged var seed = SharedRandomExtensions.HashCodeCombine((int)_timing.CurTick.Value, GetNetEntity(args.Gun).Id); var rand = new System.Random(seed); - if (!rand.Prob(ent.Comp.ClumsyDefaultCheck)) + if (!rand.Prob(ent.Comp.ClumsyGunShootCheck)) // DeltaV change from default to gun check return; if (ent.Comp.GunShootFailDamage != null) diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml b/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml index 23427e65f7..e1799341d3 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/pets.yml @@ -917,6 +917,10 @@ attributes: proper: true gender: male + #DeltaV Changes - he can shoot his gun 80% of the time + - type: Clumsy + clumsyGunShootCheck: 0.2 + #DeltaV Changes end - type: entity name: Tropico