BeeStation / NSV13

NSV13, a Ship-to-ship Combat SS13 Server
GNU Affero General Public License v3.0
115 stars 257 forks source link

Some ammo rack fixes/tweaks #2639

Closed benbot16 closed 1 month ago

benbot16 commented 1 month ago

About The Pull Request

This PR improves the code for ammo racks a bit, allows for loading ammo racks via attackby, adds some sanity checks to ammunition exiting ammo racks, and adjusts jamming SFX to only play when the ammo rack first jams. It also adjusts the to_chat messages to hopefully be a bit clearer.

It also moves ammo rack code into its own DM file, moves the circuits into the NSV circuit file, and organizes the code a bit.

Why It's Good For The Game

This fixes a couple of edge cases with racks (such as getting nulls in the ammo list, oil sometimes not fully repairing racks). It also removes the SFX-spam capability of jammed ammo racks, and hopefully cuts down on accidentally disassembling racks while trying to unjam them.

Testing Photographs and Procedure

Screenshots&Videos ![image](https://github.com/BeeStation/NSV13/assets/9423435/7c691e50-9bde-4811-8295-2af85c338d04) ![image](https://github.com/BeeStation/NSV13/assets/9423435/0501e5dc-2353-42df-b07b-3b5e9d172f1d) ![image](https://github.com/BeeStation/NSV13/assets/9423435/90ccac12-09aa-485e-b6b2-9aff5c32cb45)

Changelog

:cl: add: Ammo racks may now be loaded by attacking them with ammunition tweak: Jam SFX now plays on jam instead of on load attempt fix: Fixes a few ammo rack-related edge cases /:cl: