[MIRROR] Explosions Part I - Directional Explosions #2807
Merged
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.
Mirrored on Nova: NovaSector/NovaSector#1895
Original PR: tgstation/tgstation#82429
About The Pull Request
Adds the ability for explosions to be directional. This is achieved by adding an angle check to
prepare_explosion_turfs()
to drop any turfs outside the cone of the explosion. If the arc covers a full 360 degrees, as is the default, it will accept all the turfs without performing the angle check.Uses this functionality to rework both rocket launcher backblast and X4 explosions. Rocket launcher backblast has been changed from a shotgun of indendiary bullets to a directional explosion of similar length. X4 now uses a directional explosion to "ensure user safety".
Apparently the old method of moving the explosion one tile away didn't even work, as it blew up
target
before trying to check its density for the directional behaviour.https://youtu.be/Mzdt7d7Le2Y
Why It's Good For The Game
Directional explosions - Useful functionality for a range of potential use cases, which can be implemented with minimal extra processing cost (Worst case scenario being very large directional explosions)
Backblast - Looks way cooler than a bunch of projectiles, and should be significantly more functional in high-lag situations where projectile code tends to get fucky
X4 - More predictable for players wanting to use it as a breaching charge, you can actually stand near the charge and not have to worry about being hoist upon your own petard.
Changelog
🆑 Thunder12345
add: Added support for directional explosions.
add: Rocket launcher backblast is now 271% more explosive, check your six for friendlies!
add: X4 charges now explode in a cone away from the user when placed on a sufficiently solid object.
fix: X4 charges will now behave correctly when placed on dense atoms (note: don't try to read a variable from an atom you just blew up)
/:cl: