new-frontiers-14 / frontier-station-14

A multiplayer game about paranoia and chaos on a space station. Remake of the cult-classic Space Station 13.
https://spacestation14.io
GNU Affero General Public License v3.0
80 stars 465 forks source link

Shotgun spread refactor Cherry Picked #1860

Closed VividPups closed 4 weeks ago

VividPups commented 1 month ago

About the PR

This is Cherry-picked from this PR https://github.com/space-wizards/space-station-14/pull/27773 (I'm not quite sure how to give Proper credit and whatnot to the OG people)

Why / Balance

Needed for a guns

Testimonial

" I added a new component, ProjectileSpreadComponent. The new component now holds the projectile count and spread data that was previously in the CartridgeAmmoComponent, as well as an additional entity prototype field. In the GunSystem, the code for spawning the original bullet uses the switch case's preferred method (spawning the bullet from the cartridge prototype for CartridgeAmmoComponent and just launching the projectile it already has for AmmoComponent) but uses the ProjectileSpreadComponent to launch the rest of the spread. " - RiceMar1244

Media

Additional Info

I'm not sure if this would cause in huge breaking or problems. I know the guns from frontier would need to be look at first before merge

Changelog No CL!

VividPups commented 1 month ago

imma wait for a maintainer before attempting to fix any Conflicts so, a better understanding can happen/would happen if I make said changes

whatston3 commented 1 month ago

Should be fine, tests seem alright, clamp is still wonky, unsure why - projectiles will never hit unless user is within 1 m of the mob.

VividPups commented 1 month ago

Should be fine, tests seem alright, clamp is still wonky, unsure why - projectiles will never hit unless user is within 1 m of the mob.

Clamp?

VividPups commented 1 month ago

So this all good to go? or is there still problems on whats it called?

whatston3 commented 4 weeks ago

Talked through the changes with Erhard, happy enough with this. Blood cult janitor might need another look.