Add events for GunComponent values, muzzle flashes and cartridge spread (#24077)
* Add a modifier event for GunComponent values * Add docs * Add VV readwrite to modified values * Add more docs * More docs * Add Gun parameter to GunRefreshModifiersEvent * Add another event for handling cartridge spread * Fix pneumatic speed
This commit is contained in:
@@ -183,10 +183,10 @@ public abstract partial class SharedGunSystem
|
||||
|
||||
// Reset shotting for cycling
|
||||
if (Resolve(uid, ref gunComp, false) &&
|
||||
gunComp is { FireRate: > 0f } &&
|
||||
gunComp is { FireRateModified: > 0f } &&
|
||||
!Paused(uid))
|
||||
{
|
||||
gunComp.NextFire = Timing.CurTime + TimeSpan.FromSeconds(1 / gunComp.FireRate);
|
||||
gunComp.NextFire = Timing.CurTime + TimeSpan.FromSeconds(1 / gunComp.FireRateModified);
|
||||
}
|
||||
|
||||
Dirty(uid, component);
|
||||
|
||||
Reference in New Issue
Block a user