From 1bbd25c2861e4a6982c336b066073eb48295e32c Mon Sep 17 00:00:00 2001 From: GrrrKitten Date: Wed, 13 Mar 2024 19:40:42 -0400 Subject: [PATCH 01/14] adds shockwaves to explosions via Tivi+Ivanmixo --- code/__DEFINES/layers.dm | 3 +++ code/__DEFINES/qdel.dm | 1 + code/_onclick/hud/rendering/plane_master.dm | 7 +++++++ code/_onclick/hud/rendering/render_plate.dm | 4 ++++ code/datums/autocells/explosion.dm | 3 +++ code/game/objects/effects/temporary_visuals.dm | 17 +++++++++++++++++ 6 files changed, 35 insertions(+) diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index 63e79cdf676d..ee958d87f580 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -11,6 +11,9 @@ //#define AREA_LAYER 1 +#define DISPLACEMENT_PLATE_RENDER_LAYER 1 +#define DISPLACEMENT_PLATE_RENDER_TARGET "*DISPLACEMENT_PLATE_RENDER_TARGET" + #define UNDER_TURF_LAYER 1.99 #define TURF_LAYER 2 diff --git a/code/__DEFINES/qdel.dm b/code/__DEFINES/qdel.dm index 2093f80be50e..624602307b9f 100644 --- a/code/__DEFINES/qdel.dm +++ b/code/__DEFINES/qdel.dm @@ -54,6 +54,7 @@ #define QDESTROYING(X) (!X || X.gc_destroyed == GC_CURRENTLY_BEING_QDELETED) #define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), (time) > GC_FILTER_QUEUE ? WEAKREF(item) : item), time, TIMER_STOPPABLE) +#define QDEL_IN_STOPPABLE(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), (time) > GC_FILTER_QUEUE ? WEAKREF(item) : item), time, TIMER_STOPPABLE) #define QDEL_IN_CLIENT_TIME(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), item), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME) #define QDEL_NULL(item) qdel(item); item = null #define QDEL_NULL_LIST(x) if(x) { for(var/y in x) { qdel(y) }}; if(x) {x.Cut(); x = null } // Second x check to handle items that LAZYREMOVE on qdel. diff --git a/code/_onclick/hud/rendering/plane_master.dm b/code/_onclick/hud/rendering/plane_master.dm index 6625120d1514..c4f070bdd842 100644 --- a/code/_onclick/hud/rendering/plane_master.dm +++ b/code/_onclick/hud/rendering/plane_master.dm @@ -189,3 +189,10 @@ plane = ESCAPE_MENU_PLANE appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR render_relay_plane = RENDER_PLANE_MASTER + +/atom/movable/screen/plane_master/displacement + name = "displacement plane" + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + plane = DISPLACEMENT_PLATE_RENDER_LAYER + render_target = DISPLACEMENT_PLATE_RENDER_TARGET + render_relay_plane = null diff --git a/code/_onclick/hud/rendering/render_plate.dm b/code/_onclick/hud/rendering/render_plate.dm index 18236c6ee759..cb579eb4ff6a 100644 --- a/code/_onclick/hud/rendering/render_plate.dm +++ b/code/_onclick/hud/rendering/render_plate.dm @@ -39,6 +39,10 @@ plane = RENDER_PLANE_GAME render_relay_plane = RENDER_PLANE_MASTER +/atom/movable/screen/plane_master/rendering_plate/game_world/Initialize(mapload, datum/hud/hud_owner) + . = ..() + add_filter("displacer", 1, displacement_map_filter(render_source = DISPLACEMENT_PLATE_RENDER_TARGET, size = 10)) + ///render plate for OOC stuff like ghosts, hud-screen effects, etc /atom/movable/screen/plane_master/rendering_plate/non_game name = "non-game rendering plate" diff --git a/code/datums/autocells/explosion.dm b/code/datums/autocells/explosion.dm index 367567a6d40d..a449dbdc843c 100644 --- a/code/datums/autocells/explosion.dm +++ b/code/datums/autocells/explosion.dm @@ -282,6 +282,9 @@ as having entered the turf. if(QDELETED(E)) return + if(power >= 150) //shockwave for anything over 150 power + new /obj/effect/temp_visual/shockwave(epicenter, power/60) + E.power = power E.power_falloff = falloff E.falloff_shape = falloff_shape diff --git a/code/game/objects/effects/temporary_visuals.dm b/code/game/objects/effects/temporary_visuals.dm index 4dc07b76f3cb..6aca5453e6fa 100644 --- a/code/game/objects/effects/temporary_visuals.dm +++ b/code/game/objects/effects/temporary_visuals.dm @@ -96,3 +96,20 @@ splatter_type = "csplatter" color = BLOOD_COLOR_SYNTHETIC +//------------------------------------------ +//Shockwaves +//------------------------------------------ + +/obj/effect/temp_visual/shockwave + icon = 'icons/effects/light_overlays/shockwave.dmi' + icon_state = "shockwave" + plane = DISPLACEMENT_PLATE_RENDER_LAYER + pixel_x = -496 + pixel_y = -496 + +/obj/effect/temp_visual/shockwave/Initialize(mapload, radius) + . = ..() + deltimer(timerid) + timerid = QDEL_IN_STOPPABLE(src, 0.5 * radius) + transform = matrix().Scale(32 / 1024, 32 / 1024) + animate(src, time = 1/2 * radius, transform=matrix().Scale((32 / 1024) * radius * 1.5, (32 / 1024) * radius * 1.5)) From 85d466cf6bb74efb570c097a441458666cac54ee Mon Sep 17 00:00:00 2001 From: GrrrKitten <158611449+GrrrKitten@users.noreply.github.com> Date: Mon, 25 Mar 2024 22:25:18 -0400 Subject: [PATCH 02/14] Update code/datums/autocells/explosion.dm Co-authored-by: harryob --- code/datums/autocells/explosion.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/autocells/explosion.dm b/code/datums/autocells/explosion.dm index a449dbdc843c..ecc6f9925800 100644 --- a/code/datums/autocells/explosion.dm +++ b/code/datums/autocells/explosion.dm @@ -283,7 +283,7 @@ as having entered the turf. return if(power >= 150) //shockwave for anything over 150 power - new /obj/effect/temp_visual/shockwave(epicenter, power/60) + new /obj/effect/shockwave(epicenter, power/60) E.power = power E.power_falloff = falloff From bfa87657038bdbdc952f47b86bd7d7bb68283041 Mon Sep 17 00:00:00 2001 From: GrrrKitten <158611449+GrrrKitten@users.noreply.github.com> Date: Mon, 25 Mar 2024 22:25:29 -0400 Subject: [PATCH 03/14] Update code/game/objects/effects/temporary_visuals.dm Co-authored-by: harryob --- code/game/objects/effects/temporary_visuals.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/effects/temporary_visuals.dm b/code/game/objects/effects/temporary_visuals.dm index 6aca5453e6fa..f08b8ba436d7 100644 --- a/code/game/objects/effects/temporary_visuals.dm +++ b/code/game/objects/effects/temporary_visuals.dm @@ -110,6 +110,6 @@ /obj/effect/temp_visual/shockwave/Initialize(mapload, radius) . = ..() deltimer(timerid) - timerid = QDEL_IN_STOPPABLE(src, 0.5 * radius) + QDEL_IN(src, 0.5 * radius) transform = matrix().Scale(32 / 1024, 32 / 1024) animate(src, time = 1/2 * radius, transform=matrix().Scale((32 / 1024) * radius * 1.5, (32 / 1024) * radius * 1.5)) From d5bd4f349392712e706802d2d2562a2ef395dd99 Mon Sep 17 00:00:00 2001 From: GrrrKitten <158611449+GrrrKitten@users.noreply.github.com> Date: Mon, 25 Mar 2024 22:26:05 -0400 Subject: [PATCH 04/14] Update code/game/objects/effects/temporary_visuals.dm Co-authored-by: harryob --- code/game/objects/effects/temporary_visuals.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/effects/temporary_visuals.dm b/code/game/objects/effects/temporary_visuals.dm index f08b8ba436d7..45a48a6f01af 100644 --- a/code/game/objects/effects/temporary_visuals.dm +++ b/code/game/objects/effects/temporary_visuals.dm @@ -100,14 +100,14 @@ //Shockwaves //------------------------------------------ -/obj/effect/temp_visual/shockwave +/obj/effect/shockwave icon = 'icons/effects/light_overlays/shockwave.dmi' icon_state = "shockwave" plane = DISPLACEMENT_PLATE_RENDER_LAYER pixel_x = -496 pixel_y = -496 -/obj/effect/temp_visual/shockwave/Initialize(mapload, radius) +/obj/effect/shockwave/Initialize(mapload, radius) . = ..() deltimer(timerid) QDEL_IN(src, 0.5 * radius) From f7eb8e6dc0a3548a5c7c1b6529c9f7d0fff4d1fb Mon Sep 17 00:00:00 2001 From: GrrrKitten Date: Mon, 25 Mar 2024 22:26:39 -0400 Subject: [PATCH 05/14] removes qdel in stoppable --- code/__DEFINES/qdel.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/__DEFINES/qdel.dm b/code/__DEFINES/qdel.dm index 624602307b9f..2093f80be50e 100644 --- a/code/__DEFINES/qdel.dm +++ b/code/__DEFINES/qdel.dm @@ -54,7 +54,6 @@ #define QDESTROYING(X) (!X || X.gc_destroyed == GC_CURRENTLY_BEING_QDELETED) #define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), (time) > GC_FILTER_QUEUE ? WEAKREF(item) : item), time, TIMER_STOPPABLE) -#define QDEL_IN_STOPPABLE(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), (time) > GC_FILTER_QUEUE ? WEAKREF(item) : item), time, TIMER_STOPPABLE) #define QDEL_IN_CLIENT_TIME(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), item), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME) #define QDEL_NULL(item) qdel(item); item = null #define QDEL_NULL_LIST(x) if(x) { for(var/y in x) { qdel(y) }}; if(x) {x.Cut(); x = null } // Second x check to handle items that LAZYREMOVE on qdel. From 8dba9adaa4ad24e2d9a8c502da970c856149faa1 Mon Sep 17 00:00:00 2001 From: GrrrKitten Date: Mon, 25 Mar 2024 22:55:17 -0400 Subject: [PATCH 06/14] whoopsies forgot to commit --- code/game/objects/effects/temporary_visuals.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/game/objects/effects/temporary_visuals.dm b/code/game/objects/effects/temporary_visuals.dm index 45a48a6f01af..af3f3692587f 100644 --- a/code/game/objects/effects/temporary_visuals.dm +++ b/code/game/objects/effects/temporary_visuals.dm @@ -109,7 +109,6 @@ /obj/effect/shockwave/Initialize(mapload, radius) . = ..() - deltimer(timerid) QDEL_IN(src, 0.5 * radius) transform = matrix().Scale(32 / 1024, 32 / 1024) animate(src, time = 1/2 * radius, transform=matrix().Scale((32 / 1024) * radius * 1.5, (32 / 1024) * radius * 1.5)) From 96d088437b22290c0b3cd88248a2927c26828326 Mon Sep 17 00:00:00 2001 From: GrrrKitten Date: Tue, 26 Mar 2024 15:16:38 -0400 Subject: [PATCH 07/14] adds shockwaves to xeno screeches (queen + predalien) --- .../game/objects/effects/temporary_visuals.dm | 12 +++- .../mob/living/carbon/xenomorph/Abilities.dm | 2 +- .../abilities/predalien/predalien_powers.dm | 3 +- .../living/carbon/xenomorph/update_icons.dm | 60 +++++++++++-------- 4 files changed, 46 insertions(+), 31 deletions(-) diff --git a/code/game/objects/effects/temporary_visuals.dm b/code/game/objects/effects/temporary_visuals.dm index af3f3692587f..9357476c5c68 100644 --- a/code/game/objects/effects/temporary_visuals.dm +++ b/code/game/objects/effects/temporary_visuals.dm @@ -107,8 +107,14 @@ pixel_x = -496 pixel_y = -496 -/obj/effect/shockwave/Initialize(mapload, radius) +/obj/effect/shockwave/Initialize(mapload, radius, speed, y_offset, x_offset) . = ..() - QDEL_IN(src, 0.5 * radius) + if(!speed) + speed = 1 + if(y_offset) + pixel_y += y_offset + if(x_offset) + pixel_x += x_offset + QDEL_IN(src, 0.5 * radius * speed) transform = matrix().Scale(32 / 1024, 32 / 1024) - animate(src, time = 1/2 * radius, transform=matrix().Scale((32 / 1024) * radius * 1.5, (32 / 1024) * radius * 1.5)) + animate(src, time = 0.5 * radius * speed, transform=matrix().Scale((32 / 1024) * radius * 1.5, (32 / 1024) * radius * 1.5)) diff --git a/code/modules/mob/living/carbon/xenomorph/Abilities.dm b/code/modules/mob/living/carbon/xenomorph/Abilities.dm index 806b0646590d..e2c6e361bbb2 100644 --- a/code/modules/mob/living/carbon/xenomorph/Abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/Abilities.dm @@ -142,7 +142,7 @@ playsound(xeno.loc, pick(xeno.screech_sound_effect_list), 75, 0, status = 0) xeno.visible_message(SPAN_XENOHIGHDANGER("[xeno] emits an ear-splitting guttural roar!")) - xeno.create_shriekwave() //Adds the visual effect. Wom wom wom + xeno.create_shriekwave(xeno, 21) //Adds the visual effect. Wom wom wom, 21 shriekwaves for(var/mob/mob in view()) if(mob && mob.client) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm index 6e6fef86a2f4..7ab69bd28288 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm @@ -12,8 +12,7 @@ playsound(xeno.loc, pick(predalien_roar), 75, 0, status = 0) xeno.visible_message(SPAN_XENOHIGHDANGER("[xeno] emits a guttural roar!")) - xeno.create_shriekwave(color = "#FF0000") - + xeno.create_shriekwave(xeno, 10) //Adds the visual effect. Wom wom wom, 10 shriekwaves for(var/mob/living/carbon/carbon in view(7, xeno)) if(ishuman(carbon)) var/mob/living/carbon/human/human = carbon diff --git a/code/modules/mob/living/carbon/xenomorph/update_icons.dm b/code/modules/mob/living/carbon/xenomorph/update_icons.dm index 571f261ab981..abd5cb846002 100644 --- a/code/modules/mob/living/carbon/xenomorph/update_icons.dm +++ b/code/modules/mob/living/carbon/xenomorph/update_icons.dm @@ -196,31 +196,41 @@ overlays_standing[X_LEGCUFF_LAYER] = image("icon" = 'icons/mob/xenos/effects.dmi', "icon_state" = "legcuff", "layer" =-X_LEGCUFF_LAYER) apply_overlay(X_LEGCUFF_LAYER) -/mob/living/carbon/xenomorph/proc/create_shriekwave(color = null) - var/image/screech_image - - var/offset_x = 0 - var/offset_y = 0 - if(mob_size <= MOB_SIZE_XENO) - offset_x = -7 - offset_y = -10 - - if (color) - screech_image = image("icon"='icons/mob/xenos/overlay_effects64x64.dmi', "icon_state" = "shriek_waves_greyscale") // For Praetorian screech - screech_image.color = color - else - screech_image = image("icon"='icons/mob/xenos/overlay_effects64x64.dmi', "icon_state" = "shriek_waves") //Ehh, suit layer's not being used. - - screech_image.pixel_x = offset_x - screech_image.pixel_y = offset_y - - screech_image.appearance_flags |= RESET_COLOR - - remove_suit_layer() - - overlays_standing[X_SUIT_LAYER] = screech_image - apply_overlay(X_SUIT_LAYER) - addtimer(CALLBACK(src, PROC_REF(remove_overlay), X_SUIT_LAYER), 30) +/mob/living/carbon/xenomorph/proc/create_shriekwave(shrieking_xeno, shriekwaves_left) + var/offset_y = 8 + if(mob_size == MOB_SIZE_XENO) + offset_y = 24 + if(mob_size == MOB_SIZE_IMMOBILE) + offset_y = 28 + + //the shockwave center is updated eachtime shockwave is called and offset relative to the mob_size. + //due to the speed of the shockwaves, it isn't required to be tied to the exact mob movements + var/epicenter = src.loc ///center of the shockwave, set at the center of the tile that the mob is currently standing on + + //shockwaves are iterated, counting down once per shriekwave, with the total amount being determined on the respective xeno ability tile + if(shriekwaves_left > 18) + shriekwaves_left-- + new /obj/effect/shockwave(epicenter, 11, 0.5, offset_y) + addtimer(CALLBACK(src, PROC_REF(create_shriekwave), epicenter, shriekwaves_left), 2) + return + if(shriekwaves_left > 12) + shriekwaves_left-- + new /obj/effect/shockwave(epicenter, 10, 0.5, offset_y) + addtimer(CALLBACK(src, PROC_REF(create_shriekwave), epicenter, shriekwaves_left), 2) + return + if(shriekwaves_left > 4) + shriekwaves_left-- + new /obj/effect/shockwave(epicenter, 9, 0.7, offset_y) + addtimer(CALLBACK(src, PROC_REF(create_shriekwave), epicenter, shriekwaves_left), 2) + return + if(shriekwaves_left > 1) + shriekwaves_left-- + new /obj/effect/shockwave(epicenter, 7.5, 0.7, offset_y) + addtimer(CALLBACK(src, PROC_REF(create_shriekwave), epicenter, shriekwaves_left), 2) + return + if(shriekwaves_left == 1) + shriekwaves_left-- + addtimer(CALLBACK(src, PROC_REF(create_shriekwave), epicenter, shriekwaves_left), 1) /mob/living/carbon/xenomorph/proc/create_stomp() remove_suit_layer() From c4355f14dd189420d9efef596f2cf3df049c5f97 Mon Sep 17 00:00:00 2001 From: GrrrKitten Date: Tue, 26 Mar 2024 18:41:45 -0400 Subject: [PATCH 08/14] tones down the shriekwaves --- .../mob/living/carbon/xenomorph/Abilities.dm | 2 +- .../abilities/predalien/predalien_powers.dm | 2 +- .../mob/living/carbon/xenomorph/update_icons.dm | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/Abilities.dm b/code/modules/mob/living/carbon/xenomorph/Abilities.dm index e2c6e361bbb2..a594f5c168e3 100644 --- a/code/modules/mob/living/carbon/xenomorph/Abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/Abilities.dm @@ -142,7 +142,7 @@ playsound(xeno.loc, pick(xeno.screech_sound_effect_list), 75, 0, status = 0) xeno.visible_message(SPAN_XENOHIGHDANGER("[xeno] emits an ear-splitting guttural roar!")) - xeno.create_shriekwave(xeno, 21) //Adds the visual effect. Wom wom wom, 21 shriekwaves + xeno.create_shriekwave(xeno, 16) //Adds the visual effect. Wom wom wom, 21 shriekwaves for(var/mob/mob in view()) if(mob && mob.client) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm index 7ab69bd28288..fec64f5655dc 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm @@ -12,7 +12,7 @@ playsound(xeno.loc, pick(predalien_roar), 75, 0, status = 0) xeno.visible_message(SPAN_XENOHIGHDANGER("[xeno] emits a guttural roar!")) - xeno.create_shriekwave(xeno, 10) //Adds the visual effect. Wom wom wom, 10 shriekwaves + xeno.create_shriekwave(xeno, 8) //Adds the visual effect. Wom wom wom, 10 shriekwaves for(var/mob/living/carbon/carbon in view(7, xeno)) if(ishuman(carbon)) var/mob/living/carbon/human/human = carbon diff --git a/code/modules/mob/living/carbon/xenomorph/update_icons.dm b/code/modules/mob/living/carbon/xenomorph/update_icons.dm index abd5cb846002..4861336a73a5 100644 --- a/code/modules/mob/living/carbon/xenomorph/update_icons.dm +++ b/code/modules/mob/living/carbon/xenomorph/update_icons.dm @@ -208,29 +208,29 @@ var/epicenter = src.loc ///center of the shockwave, set at the center of the tile that the mob is currently standing on //shockwaves are iterated, counting down once per shriekwave, with the total amount being determined on the respective xeno ability tile - if(shriekwaves_left > 18) + if(shriekwaves_left > 12) shriekwaves_left-- new /obj/effect/shockwave(epicenter, 11, 0.5, offset_y) addtimer(CALLBACK(src, PROC_REF(create_shriekwave), epicenter, shriekwaves_left), 2) return - if(shriekwaves_left > 12) + if(shriekwaves_left > 8) shriekwaves_left-- new /obj/effect/shockwave(epicenter, 10, 0.5, offset_y) - addtimer(CALLBACK(src, PROC_REF(create_shriekwave), epicenter, shriekwaves_left), 2) + addtimer(CALLBACK(src, PROC_REF(create_shriekwave), epicenter, shriekwaves_left), 3) return if(shriekwaves_left > 4) shriekwaves_left-- - new /obj/effect/shockwave(epicenter, 9, 0.7, offset_y) - addtimer(CALLBACK(src, PROC_REF(create_shriekwave), epicenter, shriekwaves_left), 2) + new /obj/effect/shockwave(epicenter, 9, 0.5, offset_y) + addtimer(CALLBACK(src, PROC_REF(create_shriekwave), epicenter, shriekwaves_left), 3) return if(shriekwaves_left > 1) shriekwaves_left-- - new /obj/effect/shockwave(epicenter, 7.5, 0.7, offset_y) - addtimer(CALLBACK(src, PROC_REF(create_shriekwave), epicenter, shriekwaves_left), 2) + new /obj/effect/shockwave(epicenter, 7.5, 0.5, offset_y) + addtimer(CALLBACK(src, PROC_REF(create_shriekwave), epicenter, shriekwaves_left), 3) return if(shriekwaves_left == 1) shriekwaves_left-- - addtimer(CALLBACK(src, PROC_REF(create_shriekwave), epicenter, shriekwaves_left), 1) + new /obj/effect/shockwave(epicenter, 10, 0.7, offset_y) /mob/living/carbon/xenomorph/proc/create_stomp() remove_suit_layer() From d73b490ea705986fb2e6e0afd4396082a0f93e7a Mon Sep 17 00:00:00 2001 From: GrrrKitten Date: Tue, 26 Mar 2024 20:18:03 -0400 Subject: [PATCH 09/14] minor adjustment and typo fix --- code/modules/mob/living/carbon/xenomorph/Abilities.dm | 2 +- .../carbon/xenomorph/abilities/predalien/predalien_powers.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/Abilities.dm b/code/modules/mob/living/carbon/xenomorph/Abilities.dm index a594f5c168e3..c7f74b8e65e2 100644 --- a/code/modules/mob/living/carbon/xenomorph/Abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/Abilities.dm @@ -142,7 +142,7 @@ playsound(xeno.loc, pick(xeno.screech_sound_effect_list), 75, 0, status = 0) xeno.visible_message(SPAN_XENOHIGHDANGER("[xeno] emits an ear-splitting guttural roar!")) - xeno.create_shriekwave(xeno, 16) //Adds the visual effect. Wom wom wom, 21 shriekwaves + xeno.create_shriekwave(xeno, 15) //Adds the visual effect. Wom wom wom, 15 shriekwaves for(var/mob/mob in view()) if(mob && mob.client) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm index fec64f5655dc..c64634b9a9bd 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm @@ -12,7 +12,7 @@ playsound(xeno.loc, pick(predalien_roar), 75, 0, status = 0) xeno.visible_message(SPAN_XENOHIGHDANGER("[xeno] emits a guttural roar!")) - xeno.create_shriekwave(xeno, 8) //Adds the visual effect. Wom wom wom, 10 shriekwaves + xeno.create_shriekwave(xeno, 8) //Adds the visual effect. Wom wom wom, 8 shriekwaves for(var/mob/living/carbon/carbon in view(7, xeno)) if(ishuman(carbon)) var/mob/living/carbon/human/human = carbon From 23c093ff8c0bb240822b00146d92a35ac9ac3230 Mon Sep 17 00:00:00 2001 From: GrrrKitten Date: Tue, 26 Mar 2024 22:34:48 -0400 Subject: [PATCH 10/14] adds some randomness to shriekwaves for better visuals --- .../mob/living/carbon/xenomorph/update_icons.dm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/update_icons.dm b/code/modules/mob/living/carbon/xenomorph/update_icons.dm index 4861336a73a5..635bdf856208 100644 --- a/code/modules/mob/living/carbon/xenomorph/update_icons.dm +++ b/code/modules/mob/living/carbon/xenomorph/update_icons.dm @@ -206,31 +206,35 @@ //the shockwave center is updated eachtime shockwave is called and offset relative to the mob_size. //due to the speed of the shockwaves, it isn't required to be tied to the exact mob movements var/epicenter = src.loc ///center of the shockwave, set at the center of the tile that the mob is currently standing on + var/stage1_radius = rand(11, 12) + var/stage2_radius = rand(9, 11) + var/stage3_radius = rand(8, 10) + var/stage4_radius = 7.5 //shockwaves are iterated, counting down once per shriekwave, with the total amount being determined on the respective xeno ability tile if(shriekwaves_left > 12) shriekwaves_left-- - new /obj/effect/shockwave(epicenter, 11, 0.5, offset_y) + new /obj/effect/shockwave(epicenter, stage1_radius, 0.5, offset_y) addtimer(CALLBACK(src, PROC_REF(create_shriekwave), epicenter, shriekwaves_left), 2) return if(shriekwaves_left > 8) shriekwaves_left-- - new /obj/effect/shockwave(epicenter, 10, 0.5, offset_y) + new /obj/effect/shockwave(epicenter, stage2_radius, 0.5, offset_y) addtimer(CALLBACK(src, PROC_REF(create_shriekwave), epicenter, shriekwaves_left), 3) return if(shriekwaves_left > 4) shriekwaves_left-- - new /obj/effect/shockwave(epicenter, 9, 0.5, offset_y) + new /obj/effect/shockwave(epicenter, stage3_radius, 0.5, offset_y) addtimer(CALLBACK(src, PROC_REF(create_shriekwave), epicenter, shriekwaves_left), 3) return if(shriekwaves_left > 1) shriekwaves_left-- - new /obj/effect/shockwave(epicenter, 7.5, 0.5, offset_y) + new /obj/effect/shockwave(epicenter, stage4_radius, 0.5, offset_y) addtimer(CALLBACK(src, PROC_REF(create_shriekwave), epicenter, shriekwaves_left), 3) return if(shriekwaves_left == 1) shriekwaves_left-- - new /obj/effect/shockwave(epicenter, 10, 0.7, offset_y) + new /obj/effect/shockwave(epicenter, 10, 0.6, offset_y) /mob/living/carbon/xenomorph/proc/create_stomp() remove_suit_layer() From fa6f38666d1f8d8709b9d88842c8ecc95b47515d Mon Sep 17 00:00:00 2001 From: GrrrKitten Date: Sat, 20 Apr 2024 04:55:26 -0400 Subject: [PATCH 11/14] minor refactor, tweaks the VFX some and removes a shockwave each --- .../game/objects/effects/temporary_visuals.dm | 8 +++++-- .../mob/living/carbon/xenomorph/Abilities.dm | 2 +- .../abilities/predalien/predalien_powers.dm | 2 +- .../living/carbon/xenomorph/update_icons.dm | 21 ++++++++++--------- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/code/game/objects/effects/temporary_visuals.dm b/code/game/objects/effects/temporary_visuals.dm index 9357476c5c68..c9ec8b09ced4 100644 --- a/code/game/objects/effects/temporary_visuals.dm +++ b/code/game/objects/effects/temporary_visuals.dm @@ -107,7 +107,7 @@ pixel_x = -496 pixel_y = -496 -/obj/effect/shockwave/Initialize(mapload, radius, speed, y_offset, x_offset) +/obj/effect/shockwave/Initialize(mapload, radius, speed, easing_type, y_offset, x_offset) . = ..() if(!speed) speed = 1 @@ -117,4 +117,8 @@ pixel_x += x_offset QDEL_IN(src, 0.5 * radius * speed) transform = matrix().Scale(32 / 1024, 32 / 1024) - animate(src, time = 0.5 * radius * speed, transform=matrix().Scale((32 / 1024) * radius * 1.5, (32 / 1024) * radius * 1.5)) + if(!easing_type) + animate(src, time = 0.5 * radius * speed, transform=matrix().Scale((32 / 1024) * radius * 1.5, (32 / 1024) * radius * 1.5)) + return + animate(src, time = 0.5 * radius * speed, transform=matrix().Scale((32 / 1024) * radius * 1.5, (32 / 1024) * radius * 1.5), easing = easing_type) + diff --git a/code/modules/mob/living/carbon/xenomorph/Abilities.dm b/code/modules/mob/living/carbon/xenomorph/Abilities.dm index c7f74b8e65e2..e345fddf3e01 100644 --- a/code/modules/mob/living/carbon/xenomorph/Abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/Abilities.dm @@ -142,7 +142,7 @@ playsound(xeno.loc, pick(xeno.screech_sound_effect_list), 75, 0, status = 0) xeno.visible_message(SPAN_XENOHIGHDANGER("[xeno] emits an ear-splitting guttural roar!")) - xeno.create_shriekwave(xeno, 15) //Adds the visual effect. Wom wom wom, 15 shriekwaves + xeno.create_shriekwave(14) //Adds the visual effect. Wom wom wom, 14 shriekwaves for(var/mob/mob in view()) if(mob && mob.client) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm index c64634b9a9bd..3ec4855f9c3a 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm @@ -12,7 +12,7 @@ playsound(xeno.loc, pick(predalien_roar), 75, 0, status = 0) xeno.visible_message(SPAN_XENOHIGHDANGER("[xeno] emits a guttural roar!")) - xeno.create_shriekwave(xeno, 8) //Adds the visual effect. Wom wom wom, 8 shriekwaves + xeno.create_shriekwave(7) //Adds the visual effect. Wom wom wom, 7 shriekwaves for(var/mob/living/carbon/carbon in view(7, xeno)) if(ishuman(carbon)) var/mob/living/carbon/human/human = carbon diff --git a/code/modules/mob/living/carbon/xenomorph/update_icons.dm b/code/modules/mob/living/carbon/xenomorph/update_icons.dm index 635bdf856208..311ee23d8a57 100644 --- a/code/modules/mob/living/carbon/xenomorph/update_icons.dm +++ b/code/modules/mob/living/carbon/xenomorph/update_icons.dm @@ -196,7 +196,7 @@ overlays_standing[X_LEGCUFF_LAYER] = image("icon" = 'icons/mob/xenos/effects.dmi', "icon_state" = "legcuff", "layer" =-X_LEGCUFF_LAYER) apply_overlay(X_LEGCUFF_LAYER) -/mob/living/carbon/xenomorph/proc/create_shriekwave(shrieking_xeno, shriekwaves_left) +/mob/living/carbon/xenomorph/proc/create_shriekwave(shriekwaves_left) var/offset_y = 8 if(mob_size == MOB_SIZE_XENO) offset_y = 24 @@ -206,6 +206,7 @@ //the shockwave center is updated eachtime shockwave is called and offset relative to the mob_size. //due to the speed of the shockwaves, it isn't required to be tied to the exact mob movements var/epicenter = src.loc ///center of the shockwave, set at the center of the tile that the mob is currently standing on + var/easing = QUAD_EASING | EASE_OUT var/stage1_radius = rand(11, 12) var/stage2_radius = rand(9, 11) var/stage3_radius = rand(8, 10) @@ -214,27 +215,27 @@ //shockwaves are iterated, counting down once per shriekwave, with the total amount being determined on the respective xeno ability tile if(shriekwaves_left > 12) shriekwaves_left-- - new /obj/effect/shockwave(epicenter, stage1_radius, 0.5, offset_y) - addtimer(CALLBACK(src, PROC_REF(create_shriekwave), epicenter, shriekwaves_left), 2) + new /obj/effect/shockwave(epicenter, stage1_radius, 0.5, easing, offset_y) + addtimer(CALLBACK(src, PROC_REF(create_shriekwave), shriekwaves_left), 2) return if(shriekwaves_left > 8) shriekwaves_left-- - new /obj/effect/shockwave(epicenter, stage2_radius, 0.5, offset_y) - addtimer(CALLBACK(src, PROC_REF(create_shriekwave), epicenter, shriekwaves_left), 3) + new /obj/effect/shockwave(epicenter, stage2_radius, 0.5, easing, offset_y) + addtimer(CALLBACK(src, PROC_REF(create_shriekwave), shriekwaves_left), 3) return if(shriekwaves_left > 4) shriekwaves_left-- - new /obj/effect/shockwave(epicenter, stage3_radius, 0.5, offset_y) - addtimer(CALLBACK(src, PROC_REF(create_shriekwave), epicenter, shriekwaves_left), 3) + new /obj/effect/shockwave(epicenter, stage3_radius, 0.5, easing, offset_y) + addtimer(CALLBACK(src, PROC_REF(create_shriekwave), shriekwaves_left), 3) return if(shriekwaves_left > 1) shriekwaves_left-- - new /obj/effect/shockwave(epicenter, stage4_radius, 0.5, offset_y) - addtimer(CALLBACK(src, PROC_REF(create_shriekwave), epicenter, shriekwaves_left), 3) + new /obj/effect/shockwave(epicenter, stage4_radius, 0.5, easing, offset_y) + addtimer(CALLBACK(src, PROC_REF(create_shriekwave), shriekwaves_left), 3) return if(shriekwaves_left == 1) shriekwaves_left-- - new /obj/effect/shockwave(epicenter, 10, 0.6, offset_y) + new /obj/effect/shockwave(epicenter, 10.5, 0.6, easing, offset_y) /mob/living/carbon/xenomorph/proc/create_stomp() remove_suit_layer() From eade9506674e0369e1ebe1d6db29dff867c7a223 Mon Sep 17 00:00:00 2001 From: GrrrKitten <158611449+GrrrKitten@users.noreply.github.com> Date: Sun, 21 Apr 2024 09:02:40 -0400 Subject: [PATCH 12/14] Update code/game/objects/effects/temporary_visuals.dm Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- code/game/objects/effects/temporary_visuals.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/effects/temporary_visuals.dm b/code/game/objects/effects/temporary_visuals.dm index c9ec8b09ced4..a9db0f784d48 100644 --- a/code/game/objects/effects/temporary_visuals.dm +++ b/code/game/objects/effects/temporary_visuals.dm @@ -107,7 +107,7 @@ pixel_x = -496 pixel_y = -496 -/obj/effect/shockwave/Initialize(mapload, radius, speed, easing_type, y_offset, x_offset) +/obj/effect/shockwave/Initialize(mapload, radius, speed, easing_type = LINEAR_EASING, y_offset, x_offset) . = ..() if(!speed) speed = 1 From 269879cb549d064de36b3a330f662ed3056ccd08 Mon Sep 17 00:00:00 2001 From: GrrrKitten <158611449+GrrrKitten@users.noreply.github.com> Date: Sun, 21 Apr 2024 09:02:54 -0400 Subject: [PATCH 13/14] Update code/game/objects/effects/temporary_visuals.dm Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- code/game/objects/effects/temporary_visuals.dm | 3 --- 1 file changed, 3 deletions(-) diff --git a/code/game/objects/effects/temporary_visuals.dm b/code/game/objects/effects/temporary_visuals.dm index a9db0f784d48..d05e7789b1d5 100644 --- a/code/game/objects/effects/temporary_visuals.dm +++ b/code/game/objects/effects/temporary_visuals.dm @@ -117,8 +117,5 @@ pixel_x += x_offset QDEL_IN(src, 0.5 * radius * speed) transform = matrix().Scale(32 / 1024, 32 / 1024) - if(!easing_type) - animate(src, time = 0.5 * radius * speed, transform=matrix().Scale((32 / 1024) * radius * 1.5, (32 / 1024) * radius * 1.5)) - return animate(src, time = 0.5 * radius * speed, transform=matrix().Scale((32 / 1024) * radius * 1.5, (32 / 1024) * radius * 1.5), easing = easing_type) From 36bb18190c37182d57514ffe857be0902890d736 Mon Sep 17 00:00:00 2001 From: GrrrKitten <158611449+GrrrKitten@users.noreply.github.com> Date: Sun, 21 Apr 2024 09:03:06 -0400 Subject: [PATCH 14/14] Update code/modules/mob/living/carbon/xenomorph/update_icons.dm Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- code/modules/mob/living/carbon/xenomorph/update_icons.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/update_icons.dm b/code/modules/mob/living/carbon/xenomorph/update_icons.dm index 311ee23d8a57..b90b77bd99b0 100644 --- a/code/modules/mob/living/carbon/xenomorph/update_icons.dm +++ b/code/modules/mob/living/carbon/xenomorph/update_icons.dm @@ -205,7 +205,7 @@ //the shockwave center is updated eachtime shockwave is called and offset relative to the mob_size. //due to the speed of the shockwaves, it isn't required to be tied to the exact mob movements - var/epicenter = src.loc ///center of the shockwave, set at the center of the tile that the mob is currently standing on + var/epicenter = loc //center of the shockwave, set at the center of the tile that the mob is currently standing on var/easing = QUAD_EASING | EASE_OUT var/stage1_radius = rand(11, 12) var/stage2_radius = rand(9, 11)