Punpun guns (#5563)

* turn clumsygunns off on punpun (this shit broken)

* fix

* punpun fails 20% of the time, new clumsygunshootcheck system
This commit is contained in:
Theo 2026-04-10 12:35:16 -05:00 committed by GitHub
parent fe7643caa3
commit f6759ea97b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 1 deletions

View File

@ -26,6 +26,14 @@ public sealed partial class ClumsyComponent : Component
[DataField, AutoNetworkedField]
public float ClumsyDefaultCheck = 0.5f;
// Begin DeltaV Changes - Gun
/// <summary>
/// Chance for a clumsy entity to fail when shooting a weapon
/// </summary>
[DataField, AutoNetworkedField]
public float ClumsyGunShootCheck = 0.5f;
// End DeltaV Changes - Gun
/// <summary>
/// Default stun time.
/// If a system needs to use something else, add a new variable in the component, do not modify this number.

View File

@ -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)

View File

@ -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