-
Notifications
You must be signed in to change notification settings - Fork 444
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
Conversation
@@ -1,8 +1,8 @@ | |||
var/obj/structure/anti_air_cannon/almayer_aa_cannon |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make this snake_case
var/datum/effect_system/spark_spread/s = new | ||
var/datum/effect_system/spark_spread/s2 = new | ||
var/datum/effect_system/spark_spread/s3 = new |
There was a problem hiding this comment.
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.
var/turf/T | ||
var/mob/M |
There was a problem hiding this comment.
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
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!")) |
There was a problem hiding this comment.
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.
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) |
There was a problem hiding this comment.
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
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!")) |
There was a problem hiding this comment.
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
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 |
electrified fences baseground
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
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: