Makes flare gun not use ChamberMagazineAmmoProvider #33291
+161
−27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About the PR
Adds optional bolt mechanics to the BallisticAmmoProvider component so that the reworked flare gun can make use of them while still enabling things like accepting ammo from shell dispensers. Generally enables break action ballistic weapons that can actually break open.
Why / Balance
Making the flare gun use ChamberMagazineAmmoProvider for the bolting mechanics felt inappropriate, but I think what it aimed to accomplish was cool enough that I wanted to help out and give the desired bolting mechanics to the ammo provider it previously used.
Technical details
For transparency, alot of the code for bolting on ballistic weapons was taken from bolting on magazine weapons, but repurposed and tested to the best of my ability. Considering that not-weapons like the ammo boxes also use the BallisticAmmoProvider component, I made sure to test everything thoroughly and I show proof that the boxes still work in the provided video.
Media
2024-11-13.01-05-06.mp4
Requirements
Breaking changes
I dont think that it is a breaking change, but I want to note that one of the differences between the current reworked flare gun and the one in this PR is that this flare gun auto ejects its shells when firing. The ChamberMagazineAmmoProvider has the benefit of an AutoCycle data field. I tried to implement this for ballistic guns, but I ran into issues that caused exceptions involving the "unspawned ammo" that is present in a shotgun when it is first spawned in.
Changelog
I dont think CL is necessary