Skip to content

Commit

Permalink
Dropship Missile Refactor (#3732)
Browse files Browse the repository at this point in the history
# About the pull request
Refactors Dropship Missiles to not use Spawn().
<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

# Explain why it's good for the game
While proposing a new CAS feature, this part of the code uses a function
we shouldn't be using. With a suggestion from Harry I simply swapped out
the parts that we could replace without having to do a bigger overhaul.
# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
refactor: refactored dropship_ammo so that missiles don't use Spawn()
/:cl:
  • Loading branch information
blackdragonTOW committed Jul 2, 2023
1 parent b32e80f commit d87e833
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions code/modules/cm_marines/dropship_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,8 @@

/obj/structure/ship_ammo/rocket/widowmaker/detonate_on(turf/impact)
impact.ceiling_debris_check(3)
spawn(5)
cell_explosion(impact, 300, 40, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, create_cause_data(initial(name), source_mob)) //Your standard HE splash damage rocket. Good damage, good range, good speed, it's an all rounder
qdel(src)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(cell_explosion), impact, 300, 40, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, create_cause_data(initial(name)), source_mob), 0.5 SECONDS) //Your standard HE splash damage rocket. Good damage, good range, good speed, it's an all rounder
QDEL_IN(src, 0.5 SECONDS)

/obj/structure/ship_ammo/rocket/banshee
name = "\improper AGM-227 'Banshee'"
Expand All @@ -301,10 +300,9 @@

/obj/structure/ship_ammo/rocket/banshee/detonate_on(turf/impact)
impact.ceiling_debris_check(3)
spawn(5)
cell_explosion(impact, 175, 20, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, create_cause_data(initial(name), source_mob)) //Small explosive power with a small fall off for a big explosion range
fire_spread(impact, create_cause_data(initial(name), source_mob), 4, 15, 50, "#00b8ff") //Very intense but the fire doesn't last very long
qdel(src)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(cell_explosion), impact, 175, 20, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, create_cause_data(initial(name)), source_mob), 0.5 SECONDS) //Small explosive power with a small fall off for a big explosion range
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(fire_spread), impact, create_cause_data(initial(name), source_mob), 4, 15, 50, "#00b8ff"), 0.5 SECONDS) //Very intense but the fire doesn't last very long
QDEL_IN(src, 0.5 SECONDS)

/obj/structure/ship_ammo/rocket/keeper
name = "\improper GBU-67 'Keeper II'"
Expand All @@ -317,9 +315,8 @@

/obj/structure/ship_ammo/rocket/keeper/detonate_on(turf/impact)
impact.ceiling_debris_check(3)
spawn(5)
cell_explosion(impact, 450, 100, EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL, null, create_cause_data(initial(name), source_mob)) //Insane fall off combined with insane damage makes the Keeper useful for single targets, but very bad against multiple.
qdel(src)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(cell_explosion), impact, 450, 100, EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL, null, create_cause_data(initial(name)), source_mob), 0.5 SECONDS) //Insane fall off combined with insane damage makes the Keeper useful for single targets, but very bad against multiple.
QDEL_IN(src, 0.5 SECONDS)

/obj/structure/ship_ammo/rocket/harpoon
name = "\improper AGM-84 'Harpoon'"
Expand All @@ -333,9 +330,8 @@
//Looks kinda OP but all it can actually do is just to blow windows and some of other things out, cant do much damage.
/obj/structure/ship_ammo/rocket/harpoon/detonate_on(turf/impact)
impact.ceiling_debris_check(3)
spawn(5)
cell_explosion(impact, 150, 16, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, create_cause_data(initial(name), source_mob))
qdel(src)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(cell_explosion), impact, 150, 16, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, create_cause_data(initial(name)), source_mob), 0.5 SECONDS)
QDEL_IN(src, 0.5 SECONDS)

/obj/structure/ship_ammo/rocket/napalm
name = "\improper XN-99 'Napalm'"
Expand All @@ -347,10 +343,9 @@

/obj/structure/ship_ammo/rocket/napalm/detonate_on(turf/impact)
impact.ceiling_debris_check(3)
spawn(5)
cell_explosion(impact, 200, 25, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, create_cause_data(initial(name), source_mob))
fire_spread(impact, create_cause_data(initial(name), source_mob), 6, 60, 30, "#EE6515") //Color changed into napalm's color to better convey how intense the fire actually is.
qdel(src)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(cell_explosion), impact, 200, 25, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, create_cause_data(initial(name)), source_mob), 0.5 SECONDS)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(fire_spread), impact, create_cause_data(initial(name), source_mob), 6, 60, 30, "#EE6515"), 0.5 SECONDS) //Color changed into napalm's color to better convey how intense the fire actually is.
QDEL_IN(src, 0.5 SECONDS)



Expand Down

0 comments on commit d87e833

Please sign in to comment.