Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Immersive AA Sequence (3) #11

Closed

Conversation

PhantomEpicness
Copy link
Contributor

@PhantomEpicness PhantomEpicness commented Apr 15, 2022

About The Pull Request

https://gitlab.com/cmdevs/colonial-warfare/-/merge_requests/2334#199ac99bb022d31cfd33a4cc3572ef30e96db9b9

This now 6 months on gitlab old PR is meant to make hijacks more immersive, as you can now hear the IX-50 MGAD firing upon its target and xenos/dchat can actually feel the ship getting rocked as they evade the AA fdire.

Added a variety of sounds for, well variety and incase devs don't like a few so I won't have to redo.

Has an immersive sequence inside the dropship. Complete with sparks, explosions and the whole 9 yards!
(tested to be non lethal to larva)

Not really intended to rework the entire sound backend but ended up reworking a bit of it at the cost of some of my sanity

Also slightly reworked and fixed the soundbackend to support this, thanks @mekkiti for the massive help you lent me over hours of pain.

Reworking the entire sound system is not really the intention of this MR but it turned out that we needed to make a few tweaks here and there to support cool sounds. I do not want to remake the entire sound system because that's out of the scope of this MR and tweaking it to work was already painful enough.

I also filtered and improved the code a bit while porting.

Why It's Good For The Game

  • Cool and immersive sequence! Now you can experience being shredded by AA as a xenomorph or watch as dchat with a mouth full of popcorn!
  • Unfortunately for the marines, it does next to no damage for balance purposes. The explosion effects, even if stacked on a single poor larva, couldn't even kill it.
  • Immersion and RP fluff announcements. The announcements actually tell whats going on instead of "threat deflected lol". It actually tells players that the threat is still coming which is something that is missing from the current.
  • AA is actually fleshed out.

The sounds

Haven't been changed since gitlab, listen to it there because github doesnt support sound embedding
https://gitlab.com/cmdevs/colonial-warfare/-/merge_requests/2046

Demo

LARVA.mp4

This old video demonstrates that it is non lethal to even larva. It is outdated however, the fire effects were toned down due to further testing showing it to be more deadlier than the explosions and a bit more explosion and shrapnel effects were added. Sounds were fixed too.

Still shouldn't be able to kill larva, the explosions are so weak, you need 7-8 explosions on a larva to kill it and thats not counting the crit hp.

Changelog

馃啈 TotalEpicness
add: Hijack now has an immersive AA deterrence sequence if hijacked dropship is crashing into protected area.
sound: Added sounds for the IX-50 MGAD system when it activates. BRRRRT!!!!
grammar: MGAD cannon description changed to something more appropriate and realistic.
/:cl:

@github-actions github-actions bot added Sound Blast 5 minutes of bass boosted music to our players Feature Feature coder badge Tweak labels Apr 15, 2022
@Watermelon914 Watermelon914 added Grammar and Formatting Fixes the codebase's tpyos and grammatical's errors and removed Tweak labels Apr 15, 2022
@@ -1,8 +1,8 @@
var/obj/structure/anti_air_cannon/almayer_aa_cannon
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this variable

You don't need GLOB.AAgunLocation because you can just make a global variable called GLOB.aa_gun and then do GLOB.aa_gun.loc

@@ -1,8 +1,8 @@
var/obj/structure/anti_air_cannon/almayer_aa_cannon

GLOBAL_VAR_INIT(AAgunLocation,0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not how you do global variables, look at using GLOBAL_DATUM

@@ -460,7 +460,7 @@
// At halftime, we announce whether or not the AA forced the dropship to divert
// The rounding is because transit time is decreased by 10 each loop. Travel time, however, might not be a multiple of 10
if(in_transit_time_left == round(travel_time / 2, 10) && true_crash_target_section != crash_target_section)
marine_announcement("A hostile aircraft on course for the [true_crash_target_section] has been successfully deterred.", "IX-50 MGAD System")
INVOKE_ASYNC(src, .proc/AA_sequence, turfs_int)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this snake_case

Comment on lines 604 to 606
var/datum/effect_system/spark_spread/s = new
var/datum/effect_system/spark_spread/s2 = new
var/datum/effect_system/spark_spread/s3 = new
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't need to make 3 separate spark systems.

Comment on lines +607 to +608
var/turf/T
var/mob/M
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need more detailed variable names

Comment on lines +621 to +625
for(M in shuttle_area)
if(isXeno(M))
to_chat(M, SPAN_HIGHDANGER("Alarms blare throughout the bird! The fleshy hosts are definately trying something!"))
else
to_chat(M, SPAN_HIGHDANGER("Lock-on alarms and missile warnings blare from the cockpit! Oh crap!"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improve your variable names please they should not be single-letter var names.

Comment on lines 639 to 661
sleep(5)
addtimer(CALLBACK(GLOBAL_PROC, .proc/cell_explosion,pick(turfs_int),5,1,EXPLOSION_FALLOFF_SHAPE_LINEAR,null,cause), 2 SECONDS)
sleep(5)
addtimer(CALLBACK(GLOBAL_PROC, .proc/cell_explosion,pick(turfs_int),5,1,EXPLOSION_FALLOFF_SHAPE_LINEAR,null,cause), 3 SECONDS)
sleep(2 SECONDS)
addtimer(CALLBACK(GLOBAL_PROC, .proc/cell_explosion,pick(turfs_int),5,1,EXPLOSION_FALLOFF_SHAPE_LINEAR,null,cause), 2 SECONDS)
create_shrapnel(pick(turfs_int), rand(5,9), , ,/datum/ammo/bullet/shrapnel/light/effect/, cause)
s.set_up(10, 1, pick(turfs_int)) // Spark system funny
s2.set_up(10, 1, pick(turfs_int))
s3.set_up(10, 1, pick(turfs_int))
s.start()
sleep(1 SECONDS)
INVOKE_ASYNC(GLOBAL_PROC, .proc/flame_radius,cause, 1, pick(turfs_int), 1, 16, FLAMESHAPE_DEFAULT, null)
create_shrapnel(pick(turfs_int), rand(5,9), , ,/datum/ammo/bullet/shrapnel/light/effect/ver2, cause)
addtimer(CALLBACK(GLOBAL_PROC, .proc/cell_explosion,pick(turfs_int),5,1,EXPLOSION_FALLOFF_SHAPE_LINEAR,null,cause), 3 SECONDS)
new /obj/effect/spawner/gibspawner/robot(pick(turfs_int))
new /obj/effect/spawner/gibspawner/robot(pick(turfs_int)) // A few random ass gibs
s2.start()
playsound(GLOB.AAgunLocation, sound_to_play2, 100, sound_range = 300, falloff = 250, echo = list(-1000, -3500, 1000, 0, 0, 1, -2000, 0.5, 6, 2), y_s_offset = 10) // making sure?
playsound_area(shuttle_area, sound_to_play, echo = list(-500, -2000, 1000, 500, 0, 0.8, 5, 5), y_s_offset = 10)
sleep(1 SECONDS)
s3.start()
create_shrapnel(pick(turfs_int), rand(5,9), , ,/datum/ammo/bullet/shrapnel/light/effect/ver1, cause)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't use sleep in code like this, you are literally using timers so just increment the time in which they get called

@Watermelon914 Watermelon914 marked this pull request as draft April 16, 2022 09:53
Comment on lines +621 to +625
for(M in shuttle_area)
if(isXeno(M))
to_chat(M, SPAN_HIGHDANGER("Alarms blare throughout the bird! The fleshy hosts are definately trying something!"))
else
to_chat(M, SPAN_HIGHDANGER("Lock-on alarms and missile warnings blare from the cockpit! Oh crap!"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This micro optimization is just not worth it. Just define M here instead of defining it early on

@github-actions
Copy link
Contributor

This PR has been inactive for long enough to be automatically marked as stale. This means it is at risk of being auto closed in ~ 7 days, please address any outstanding review items and ensure your PR is finished, if these are all true and you are auto-staled anyway, you need to actively ask maintainers if your PR will be merged. Once you have done any of the previous actions then you should request a maintainer remove the stale label on your PR, to reset the stale timer. If you feel no maintainer will respond in that time, you may wish to close this PR youself, while you seek maintainer comment, as you will then be able to reopen the PR yourself

@github-actions github-actions bot added the Stale beg a maintainer to review your PR label Apr 24, 2022
@PhantomEpicness
Copy link
Contributor Author

PhantomEpicness commented Apr 26, 2022

This PR has been inactive for long enough to be automatically marked as stale. This means it is at risk of being auto closed in ~ 7 days, please address any outstanding review items and ensure your PR is finished, if these are all true and you are auto-staled anyway, you need to actively ask maintainers if your PR will be merged. Once you have done any of the previous actions then you should request a maintainer remove the stale label on your PR, to reset the stale timer. If you feel no maintainer will respond in that time, you may wish to close this PR youself, while you seek maintainer comment, as you will then be able to reopen the PR yourself

ratio

@github-actions github-actions bot removed the Stale beg a maintainer to review your PR label Apr 27, 2022
cm13-github pushed a commit that referenced this pull request Aug 18, 2023
Doubleumc pushed a commit to Doubleumc/cmss13 that referenced this pull request Nov 19, 2023
cuberound pushed a commit to cuberound/cmss13 that referenced this pull request Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Feature coder badge Grammar and Formatting Fixes the codebase's tpyos and grammatical's errors Sound Blast 5 minutes of bass boosted music to our players
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants