From b451aba32b893163cfa10203676046f516df8aee Mon Sep 17 00:00:00 2001 From: thedonkified Date: Wed, 25 Sep 2024 19:30:24 -0700 Subject: [PATCH 1/3] Extracts properties of effects into elements - Also adds an afterimage effect, no applications yet --- code/__HELPERS/icons.dm | 1 - code/datums/elements/drop_retrieval.dm | 4 +- .../elements/effects/copy_appearance.dm | 16 +++ code/datums/elements/effects/fading.dm | 10 ++ .../datums/elements/effects/pixel_shifting.dm | 24 ++++ code/datums/elements/effects/temporary.dm | 15 +++ code/game/objects/effects/afterimage.dm | 16 +++ code/game/objects/effects/bloodsplatter.dm | 67 ++++++++++ code/game/objects/effects/effect.dm | 2 + code/game/objects/effects/portals.dm | 17 +-- code/game/objects/effects/shockwave.dm | 22 ++++ .../game/objects/effects/temporary_visuals.dm | 121 ------------------ .../living/carbon/human/species/species.dm | 4 +- .../living/carbon/human/species/synthetic.dm | 4 +- .../carbon/human/species/yautja/_species.dm | 2 +- .../mob/living/carbon/xenomorph/Xenomorph.dm | 2 +- .../carbon/xenomorph/castes/Hellhound.dm | 2 +- .../mob/living/simple_animal/hostile/alien.dm | 2 +- .../hostile/retaliate/giant_lizard.dm | 2 +- code/modules/mob/mob_helpers.dm | 2 +- colonialmarines.dme | 8 +- 21 files changed, 195 insertions(+), 148 deletions(-) create mode 100644 code/datums/elements/effects/copy_appearance.dm create mode 100644 code/datums/elements/effects/fading.dm create mode 100644 code/datums/elements/effects/pixel_shifting.dm create mode 100644 code/datums/elements/effects/temporary.dm create mode 100644 code/game/objects/effects/afterimage.dm create mode 100644 code/game/objects/effects/bloodsplatter.dm create mode 100644 code/game/objects/effects/shockwave.dm delete mode 100644 code/game/objects/effects/temporary_visuals.dm diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index fcfb512e0c12..7f1201bd12e0 100644 --- a/code/__HELPERS/icons.dm +++ b/code/__HELPERS/icons.dm @@ -572,7 +572,6 @@ world swapped = 1 return result - /image/proc/flick_overlay(atom/A, duration) //originally code related to goonPS. This isn't the original code, but has the same effect A.overlays.Add(src) addtimer(CALLBACK(src, PROC_REF(flick_remove_overlay), A), duration) diff --git a/code/datums/elements/drop_retrieval.dm b/code/datums/elements/drop_retrieval.dm index e31ce0e96536..0b77fd6265f2 100644 --- a/code/datums/elements/drop_retrieval.dm +++ b/code/datums/elements/drop_retrieval.dm @@ -5,7 +5,7 @@ /datum/element/drop_retrieval/Attach(datum/target) . = ..() - if(!is_type_in_list(target, compatible_types)) + if (!is_type_in_list(target, compatible_types)) return ELEMENT_INCOMPATIBLE RegisterSignal(target, COMSIG_MOVABLE_PRE_THROW, PROC_REF(cancel_throw)) RegisterSignal(target, COMSIG_ITEM_DROPPED, PROC_REF(dropped)) @@ -40,7 +40,7 @@ /datum/element/drop_retrieval/gun/Attach(datum/target, slot) . = ..() - if(.) + if (.) return retrieval_slot = slot diff --git a/code/datums/elements/effects/copy_appearance.dm b/code/datums/elements/effects/copy_appearance.dm new file mode 100644 index 000000000000..85a8bffc5317 --- /dev/null +++ b/code/datums/elements/effects/copy_appearance.dm @@ -0,0 +1,16 @@ +/// Assigns an effects appearance to the appearance of a target atom +/datum/element/copy_appearance + +/datum/element/copy_appearance/Attach(datum/target, atom/to_copy) + . = ..() + if (. == ELEMENT_INCOMPATIBLE) + return + if (!istype(target, /obj/effect)) + return ELEMENT_INCOMPATIBLE + if (!isatom(to_copy)) + return ELEMENT_INCOMPATIBLE + var/obj/effect/effect = target + effect.name = to_copy.name + effect.appearance = to_copy.appearance + effect.setDir(to_copy.dir) + effect.mouse_opacity = MOUSE_OPACITY_TRANSPARENT diff --git a/code/datums/elements/effects/fading.dm b/code/datums/elements/effects/fading.dm new file mode 100644 index 000000000000..7f3344bbc7bd --- /dev/null +++ b/code/datums/elements/effects/fading.dm @@ -0,0 +1,10 @@ +/// Causes effect to fade over a specific duration +/datum/element/fading + +/datum/element/fading/Attach(datum/target, duration) + . = ..() + if (. == ELEMENT_INCOMPATIBLE) + return + if (!istype(target, /obj/effect)) + return ELEMENT_INCOMPATIBLE + animate(target, alpha = 0, time = duration) diff --git a/code/datums/elements/effects/pixel_shifting.dm b/code/datums/elements/effects/pixel_shifting.dm new file mode 100644 index 000000000000..3e42528193ff --- /dev/null +++ b/code/datums/elements/effects/pixel_shifting.dm @@ -0,0 +1,24 @@ +/// Does a pixel shift animation towards a specific target +/datum/element/pixel_shifting + +/** + * Function to attach the `shifting` element to the effect + * + * Params: + * - target (/datum): The effect we are attaching to, should be of type /obj/effect unless you messed up + * - to_shift_towards (/atom): The atom the effect will pixel shift towards + * - distance_ratio (num): The percentage of the distance between the effect and `to_shift_towards` that the effect should cover (0 <= distance_ratio <= 1) + * - duration (num): Duration of the animation (i.e. how fast the effect will pixel shift to its destination) + */ +/datum/element/pixel_shifting/Attach(datum/target, atom/to_shift_towards, distance_ratio = 1, duration) + . = ..() + if (. == ELEMENT_INCOMPATIBLE) + return + if (!istype(target, /obj/effect)) + return ELEMENT_INCOMPATIBLE + if (!istype(to_shift_towards)) + return ELEMENT_INCOMPATIBLE + var/obj/effect/effect = target + var/x_displacement = floor((to_shift_towards.x - effect.x) * distance_ratio * world.icon_size) + var/y_displacement = floor((to_shift_towards.y - effect.y) * distance_ratio * world.icon_size) + animate(target, pixel_x = x_displacement, pixel_y = y_displacement, time = duration) diff --git a/code/datums/elements/effects/temporary.dm b/code/datums/elements/effects/temporary.dm new file mode 100644 index 000000000000..931e56d71395 --- /dev/null +++ b/code/datums/elements/effects/temporary.dm @@ -0,0 +1,15 @@ +/// Sets an effect to delete itself after a specific amount of time +/datum/element/temporary + +/datum/element/temporary/Attach(datum/target, duration) + . = ..() + if (. == ELEMENT_INCOMPATIBLE) + return + if (!istype(target, /obj/effect)) + return ELEMENT_INCOMPATIBLE + addtimer(CALLBACK(src, PROC_REF(delete_effect), WEAKREF(target)), duration) + +/datum/element/temporary/proc/delete_effect(datum/weakref/target_ref) + SIGNAL_HANDLER + if (target_ref.resolve()) + qdel(target_ref) diff --git a/code/game/objects/effects/afterimage.dm b/code/game/objects/effects/afterimage.dm new file mode 100644 index 000000000000..3720c161c136 --- /dev/null +++ b/code/game/objects/effects/afterimage.dm @@ -0,0 +1,16 @@ +/obj/effect/afterimage + as_image = TRUE + +/** + * Params: + * - mapload: Whether effect is maploaded + * - to_copy: The atom that has an afterimage + * - fading_duration: How long it takes for afterimage to fade + * - fading_to_shift_ratio: How quickly afterimage will reach its target atom before fading (relative to the fading time) + */ +/obj/effect/afterimage/Initialize(mapload, atom/to_copy, fading_duration, fading_to_shift_ratio = 0.5) + . = ..() + AddElement(/datum/element/temporary, fading_duration) + AddElement(/datum/element/copy_appearance, to_copy) + AddElement(/datum/element/fading, fading_duration) + AddElement(/datum/element/pixel_shifting, to_copy, 1, floor(fading_duration * fading_to_shift_ratio)) diff --git a/code/game/objects/effects/bloodsplatter.dm b/code/game/objects/effects/bloodsplatter.dm new file mode 100644 index 000000000000..96fa14c2a944 --- /dev/null +++ b/code/game/objects/effects/bloodsplatter.dm @@ -0,0 +1,67 @@ +//------------------------------------------ +//BLOOD HITS +//------------------------------------------ + +/obj/effect/bloodsplatter + icon = 'icons/effects/blood.dmi' + var/duration = 5 + layer = ABOVE_XENO_LAYER + var/splatter_type = "splatter" + +/obj/effect/bloodsplatter/Initialize(mapload, set_dir, fx_duration, color_override) + . = ..() + if(color_override) + color = color_override + if(IS_DIAGONAL_DIR(set_dir)) + icon_state = "[splatter_type][pick(1, 2, 6)]" + else + icon_state = "[splatter_type][pick(3, 4, 5)]" + if(fx_duration) + duration = fx_duration + setDir(set_dir) + AddElement(/datum/element/temporary, duration) + var/target_pixel_x = 0 + var/target_pixel_y = 0 + switch(set_dir) + if(NORTH) + target_pixel_y = 16 + if(SOUTH) + target_pixel_y = -16 + if(EAST) + target_pixel_x = 16 + if(WEST) + target_pixel_x = -16 + if(NORTHEAST) + target_pixel_x = 16 + target_pixel_y = 16 + if(NORTHWEST) + target_pixel_x = -16 + target_pixel_y = 16 + if(SOUTHEAST) + target_pixel_x = 16 + target_pixel_y = -16 + if(SOUTHWEST) + target_pixel_x = -16 + target_pixel_y = -16 + animate(src, pixel_x = target_pixel_x, pixel_y = target_pixel_y, alpha = 0, time = duration) + + +/obj/effect/bloodsplatter/xenosplatter + splatter_type = "csplatter" + color = BLOOD_COLOR_XENO + +/obj/effect/bloodsplatter/human + splatter_type = "csplatter" + color = BLOOD_COLOR_HUMAN + +/obj/effect/bloodsplatter/hellhound + splatter_type = "csplatter" + color = BLOOD_COLOR_YAUTJA + +/obj/effect/bloodsplatter/yautjasplatter + splatter_type = "csplatter" + color = BLOOD_COLOR_YAUTJA_DARK + +/obj/effect/bloodsplatter/synthsplatter + splatter_type = "csplatter" + color = BLOOD_COLOR_SYNTHETIC diff --git a/code/game/objects/effects/effect.dm b/code/game/objects/effects/effect.dm index a1f07214844b..13f1517453ae 100644 --- a/code/game/objects/effects/effect.dm +++ b/code/game/objects/effects/effect.dm @@ -2,5 +2,7 @@ icon = 'icons/effects/effects.dmi' blocks_emissive = EMISSIVE_BLOCK_GENERIC + var/as_image = FALSE + /obj/effect/get_applying_acid_time() return -1 diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm index 3cce1a7ca9dc..697b15c7f9eb 100644 --- a/code/game/objects/effects/portals.dm +++ b/code/game/objects/effects/portals.dm @@ -11,27 +11,18 @@ anchored = TRUE /obj/effect/portal/Collided(atom/movable/AM) - spawn(0) - teleport(AM) - return - return + INVOKE_ASYNC(src, PROC_REF(teleport), AM) /obj/effect/portal/Crossed(AM as mob|obj) - spawn(0) - src.teleport(AM) - return - return + INVOKE_ASYNC(src, PROC_REF(teleport), AM) /obj/effect/portal/attack_hand(mob/user as mob) - spawn(0) - src.teleport(user) - return - return + INVOKE_ASYNC(src, PROC_REF(teleport), user) /obj/effect/portal/Initialize(mapload, ...) . = ..() GLOB.portal_list += src - QDEL_IN(src, 30 SECONDS) + AddElement(/datum/element/temporary, 30 SECONDS) /obj/effect/portal/Destroy() GLOB.portal_list -= src diff --git a/code/game/objects/effects/shockwave.dm b/code/game/objects/effects/shockwave.dm new file mode 100644 index 000000000000..37191aab388f --- /dev/null +++ b/code/game/objects/effects/shockwave.dm @@ -0,0 +1,22 @@ +//------------------------------------------ +//Shockwaves +//------------------------------------------ + +/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/shockwave/Initialize(mapload, radius, speed, easing_type = LINEAR_EASING, y_offset, x_offset) + . = ..() + if(!speed) + speed = 1 + if(y_offset) + pixel_y += y_offset + if(x_offset) + pixel_x += x_offset + AddElement(/datum/element/temporary, 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), easing = easing_type) diff --git a/code/game/objects/effects/temporary_visuals.dm b/code/game/objects/effects/temporary_visuals.dm deleted file mode 100644 index d05e7789b1d5..000000000000 --- a/code/game/objects/effects/temporary_visuals.dm +++ /dev/null @@ -1,121 +0,0 @@ -/obj/effect/temp_visual//ported (pasted) from TG13 - icon_state = null - anchored = TRUE - layer = ABOVE_MOB_LAYER - mouse_opacity = MOUSE_OPACITY_TRANSPARENT - //time, in deciseconds of duration - var/duration = 10 - ///if true, will pick a random direction when created. - var/randomdir = TRUE - ///id of the deletion timer - var/timerid - -/obj/effect/temp_visual/Initialize(mapload) - . = ..() - if(randomdir) - setDir(pick(GLOB.cardinals)) - - timerid = QDEL_IN(src, duration) - -/obj/effect/temp_visual/Destroy() - . = ..() - deltimer(timerid) - -/obj/effect/temp_visual/dir_setting - randomdir = FALSE - -/obj/effect/temp_visual/dir_setting/Initialize(mapload, set_dir) - if(set_dir) - setDir(set_dir) - . = ..() - -//------------------------------------------ -//BLOOD HITS -//------------------------------------------ - -/obj/effect/temp_visual/dir_setting/bloodsplatter - icon = 'icons/effects/blood.dmi' - duration = 5 - randomdir = FALSE - layer = ABOVE_XENO_LAYER - var/splatter_type = "splatter" - -/obj/effect/temp_visual/dir_setting/bloodsplatter/Initialize(mapload, set_dir, fx_duration, color_override) - if(color_override) - color = color_override - if(IS_DIAGONAL_DIR(set_dir)) - icon_state = "[splatter_type][pick(1, 2, 6)]" - else - icon_state = "[splatter_type][pick(3, 4, 5)]" - . = ..() - if(fx_duration) - duration = fx_duration - var/target_pixel_x = 0 - var/target_pixel_y = 0 - switch(set_dir) - if(NORTH) - target_pixel_y = 16 - if(SOUTH) - target_pixel_y = -16 - if(EAST) - target_pixel_x = 16 - if(WEST) - target_pixel_x = -16 - if(NORTHEAST) - target_pixel_x = 16 - target_pixel_y = 16 - if(NORTHWEST) - target_pixel_x = -16 - target_pixel_y = 16 - if(SOUTHEAST) - target_pixel_x = 16 - target_pixel_y = -16 - if(SOUTHWEST) - target_pixel_x = -16 - target_pixel_y = -16 - animate(src, pixel_x = target_pixel_x, pixel_y = target_pixel_y, alpha = 0, time = duration) - - -/obj/effect/temp_visual/dir_setting/bloodsplatter/xenosplatter - splatter_type = "csplatter" - color = BLOOD_COLOR_XENO - -/obj/effect/temp_visual/dir_setting/bloodsplatter/human - splatter_type = "csplatter" - color = BLOOD_COLOR_HUMAN - -/obj/effect/temp_visual/dir_setting/bloodsplatter/hellhound - splatter_type = "csplatter" - color = BLOOD_COLOR_YAUTJA - -/obj/effect/temp_visual/dir_setting/bloodsplatter/yautjasplatter - splatter_type = "csplatter" - color = BLOOD_COLOR_YAUTJA_DARK - -/obj/effect/temp_visual/dir_setting/bloodsplatter/synthsplatter - splatter_type = "csplatter" - color = BLOOD_COLOR_SYNTHETIC - -//------------------------------------------ -//Shockwaves -//------------------------------------------ - -/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/shockwave/Initialize(mapload, radius, speed, easing_type = LINEAR_EASING, y_offset, x_offset) - . = ..() - 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 = 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/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 42338c2c40a2..cc2849e57274 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -41,7 +41,7 @@ var/gibbed_anim = "gibbed-h" var/dusted_anim = "dust-h" var/remains_type = /obj/effect/decal/remains/xeno - var/bloodsplatter_type = /obj/effect/temp_visual/dir_setting/bloodsplatter/human + var/bloodsplatter_type = /obj/effect/bloodsplatter/human var/death_sound var/death_message = "seizes up and falls limp, their eyes dead and lifeless..." @@ -483,7 +483,7 @@ if(D) color_override = D.color - var/obj/effect/temp_visual/dir_setting/bloodsplatter/bloodsplatter = new bloodsplatter_type(human.loc, splatter_dir, 5, color_override) + var/obj/effect/bloodsplatter/bloodsplatter = new bloodsplatter_type(human.loc, splatter_dir, 5, color_override) return bloodsplatter /datum/species/proc/get_status_tab_items() diff --git a/code/modules/mob/living/carbon/human/species/synthetic.dm b/code/modules/mob/living/carbon/human/species/synthetic.dm index ab5a8d462713..741d9ba40324 100644 --- a/code/modules/mob/living/carbon/human/species/synthetic.dm +++ b/code/modules/mob/living/carbon/human/species/synthetic.dm @@ -12,7 +12,7 @@ rarity_value = 2 insulated = TRUE - bloodsplatter_type = /obj/effect/temp_visual/dir_setting/bloodsplatter/synthsplatter + bloodsplatter_type = /obj/effect/bloodsplatter/synthsplatter total_health = 150 //more health than regular humans @@ -139,6 +139,6 @@ uses_skin_color = TRUE mob_inherent_traits = list(TRAIT_SUPER_STRONG, TRAIT_INFILTRATOR_SYNTH, TRAIT_IRON_TEETH) - bloodsplatter_type = /obj/effect/temp_visual/dir_setting/bloodsplatter/human + bloodsplatter_type = /obj/effect/bloodsplatter/human blood_color = BLOOD_COLOR_HUMAN diff --git a/code/modules/mob/living/carbon/human/species/yautja/_species.dm b/code/modules/mob/living/carbon/human/species/yautja/_species.dm index 042c9917af61..fd3076cb2682 100644 --- a/code/modules/mob/living/carbon/human/species/yautja/_species.dm +++ b/code/modules/mob/living/carbon/human/species/yautja/_species.dm @@ -32,7 +32,7 @@ total_health = 175 //more health than regular humans timed_hug = FALSE - bloodsplatter_type = /obj/effect/temp_visual/dir_setting/bloodsplatter/yautjasplatter + bloodsplatter_type = /obj/effect/bloodsplatter/yautjasplatter heat_level_1 = 500 heat_level_2 = 700 diff --git a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm index eed2dce5f7a8..686c15b5c380 100644 --- a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm +++ b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm @@ -1062,7 +1062,7 @@ var/datum/reagent/D = GLOB.chemical_reagents_list[special_blood] if(D) color_override = D.color - new /obj/effect/temp_visual/dir_setting/bloodsplatter/xenosplatter(loc, splatter_dir, duration, color_override) + new /obj/effect/bloodsplatter/xenosplatter(loc, splatter_dir, duration, color_override) /mob/living/carbon/xenomorph/Collide(atom/movable/movable_atom) . = ..() diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Hellhound.dm b/code/modules/mob/living/carbon/xenomorph/castes/Hellhound.dm index 6ad08817f84a..b49712527973 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Hellhound.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Hellhound.dm @@ -130,7 +130,7 @@ return ..() /mob/living/carbon/xenomorph/hellhound/handle_blood_splatter(splatter_dir) - new /obj/effect/temp_visual/dir_setting/bloodsplatter/hellhound(loc, splatter_dir) + new /obj/effect/bloodsplatter/hellhound(loc, splatter_dir) /datum/behavior_delegate/hellhound_base name = "Base Hellhound Behavior Delegate" diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index 3f9a51355292..b89c956737e1 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -126,7 +126,7 @@ . = ..() if(P.damage) var/splatter_dir = get_dir(P.starting, loc)//loc is the xeno getting hit, P.starting is the turf of where the projectile got spawned - new /obj/effect/temp_visual/dir_setting/bloodsplatter/xenosplatter(loc, splatter_dir) + new /obj/effect/bloodsplatter/xenosplatter(loc, splatter_dir) if(prob(15)) roar_emote() diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/giant_lizard.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/giant_lizard.dm index 6bb0202c2deb..a92f25296408 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/giant_lizard.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/giant_lizard.dm @@ -393,7 +393,7 @@ add_splatter_floor(loc, FALSE) /mob/living/simple_animal/hostile/retaliate/giant_lizard/handle_blood_splatter(splatter_dir) - var/obj/effect/temp_visual/dir_setting/bloodsplatter/human/bloodsplatter = new(loc, splatter_dir) + var/obj/effect/bloodsplatter/human/bloodsplatter = new(loc, splatter_dir) bloodsplatter.pixel_y = -2 /mob/living/simple_animal/hostile/retaliate/giant_lizard/AttackingTarget(inherited_target = target_mob) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index f1007ab2ad4f..1b8a7d166b8e 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -527,7 +527,7 @@ GLOBAL_LIST_INIT(limb_types_by_name, list( start_pulling(pullify) /mob/proc/handle_blood_splatter(splatter_dir) - new /obj/effect/temp_visual/dir_setting/bloodsplatter/human(loc, splatter_dir) + new /obj/effect/bloodsplatter/human(loc, splatter_dir) /proc/get_mobs_in_z_level_range(turf/starting_turf, range) var/list/mobs_in_range = list() diff --git a/colonialmarines.dme b/colonialmarines.dme index 9fff0d7db91b..01322ea35015 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -505,6 +505,10 @@ #include "code\datums\elements\bullet_trait\penetrating\heavy.dm" #include "code\datums\elements\bullet_trait\penetrating\penetrating.dm" #include "code\datums\elements\bullet_trait\penetrating\weak.dm" +#include "code\datums\elements\effects\copy_appearance.dm" +#include "code\datums\elements\effects\fading.dm" +#include "code\datums\elements\effects\pixel_shifting.dm" +#include "code\datums\elements\effects\temporary.dm" #include "code\datums\elements\traitbound\_traitbound.dm" #include "code\datums\elements\traitbound\crawler.dm" #include "code\datums\elements\traitbound\gun_silenced.dm" @@ -1027,7 +1031,9 @@ #include "code\game\objects\shrapnel.dm" #include "code\game\objects\structures.dm" #include "code\game\objects\effects\acid_hole.dm" +#include "code\game\objects\effects\afterimage.dm" #include "code\game\objects\effects\aliens.dm" +#include "code\game\objects\effects\bloodsplatter.dm" #include "code\game\objects\effects\effect.dm" #include "code\game\objects\effects\elevator.dm" #include "code\game\objects\effects\glowshroom.dm" @@ -1037,9 +1043,9 @@ #include "code\game\objects\effects\portals.dm" #include "code\game\objects\effects\projector.dm" #include "code\game\objects\effects\rappel_rope.dm" +#include "code\game\objects\effects\shockwave.dm" #include "code\game\objects\effects\spiders.dm" #include "code\game\objects\effects\step_triggers.dm" -#include "code\game\objects\effects\temporary_visuals.dm" #include "code\game\objects\effects\decals\crayon.dm" #include "code\game\objects\effects\decals\floor_symbol.dm" #include "code\game\objects\effects\decals\hefa_cult_decals.dm" From d493e0caf0bfe324db7e6d148e777df21bebcce1 Mon Sep 17 00:00:00 2001 From: thedonkified Date: Wed, 25 Sep 2024 19:47:45 -0700 Subject: [PATCH 2/3] Fix failing unit tests --- code/game/objects/effects/afterimage.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/game/objects/effects/afterimage.dm b/code/game/objects/effects/afterimage.dm index 3720c161c136..a12b6c1d8fce 100644 --- a/code/game/objects/effects/afterimage.dm +++ b/code/game/objects/effects/afterimage.dm @@ -10,6 +10,10 @@ */ /obj/effect/afterimage/Initialize(mapload, atom/to_copy, fading_duration, fading_to_shift_ratio = 0.5) . = ..() + if (!to_copy) + stack_trace("Created a [type] without `to_copy`") + qdel(src) + return AddElement(/datum/element/temporary, fading_duration) AddElement(/datum/element/copy_appearance, to_copy) AddElement(/datum/element/fading, fading_duration) From 3f37c5aed24d04f99067ef408321f2e4fe4b6f3d Mon Sep 17 00:00:00 2001 From: thedonkified Date: Wed, 25 Sep 2024 19:53:27 -0700 Subject: [PATCH 3/3] lul --- code/game/objects/effects/afterimage.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/effects/afterimage.dm b/code/game/objects/effects/afterimage.dm index a12b6c1d8fce..544910961246 100644 --- a/code/game/objects/effects/afterimage.dm +++ b/code/game/objects/effects/afterimage.dm @@ -11,7 +11,7 @@ /obj/effect/afterimage/Initialize(mapload, atom/to_copy, fading_duration, fading_to_shift_ratio = 0.5) . = ..() if (!to_copy) - stack_trace("Created a [type] without `to_copy`") + log_debug("Created a [type] without `to_copy`") qdel(src) return AddElement(/datum/element/temporary, fading_duration)