]> git.smokeofanarchy.ru Git - space-station-14.git/commit
Adds BallisticAmmoSelfRefillerComponent (#38537)
authorCentronias <me@centronias.com>
Wed, 17 Dec 2025 22:52:32 +0000 (14:52 -0800)
committerGitHub <noreply@github.com>
Wed, 17 Dec 2025 22:52:32 +0000 (22:52 +0000)
commit3c15d9f312db4543ff6b10ff502ae392bf36eafd
treef5fea2167b65ac80ff606505b5b5179710bf65ff
parent97508e81a8da0eac59b036579aa06f95baa926db
Adds BallisticAmmoSelfRefillerComponent (#38537)

* Adds BallisticAmmoSelfRefillerComponent

And uses it to replace battery-based refilling of the Syndicate L6 and Viper modules.

# Automagic Ballistic Ammo Refilling
- Add `BallisticAmmoSelfRefillerComponent`
- Handle `EmpPulseEvent` to pause refilling behavior for EMP's duration

# Supporting Changes
- Change `Content.Server.Weapons.Ranged.Systems.Update` override in `GunSystem.AutoFire.cs` to `UpdateAutoFire`
- Add `Content.Server.Weapons.Ranged.Systems.Update` to `GunSystem.cs` so that it can call `UpdateAutoFire` and `UpdateBallistic`
- Add public methods to GunSystem for use by refilling implementation
  - PauseSelfRefill
  - IsFullBallistic (same as #299)
  - CanInsertBallistic (same as #299)
  - TryBallisticInsert (same as #299)

* _timing -> Timing

* unspawned count stuff

* imagine building the code before pushing

* - apply to c20r ROW
- make predicted/shared

* revert server system import only changes

* oop

* o great and wise Slarti

* Scar comments

* field deltas + correct serializer

* review

---------

Co-authored-by: ScarKy0 <scarky0@onet.eu>
Content.Shared/Weapons/Ranged/Components/BallisticAmmoSelfRefillerComponent.cs [new file with mode: 0644]
Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs
Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs
Resources/Prototypes/Entities/Objects/Weapons/Guns/LMGs/lmgs.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/Pistols/pistols.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/SMGs/smgs.yml