From d87637e6abc805e21dffd21b735f4c2ea0aae97a Mon Sep 17 00:00:00 2001 From: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com> Date: Sat, 27 Sep 2025 11:54:45 -0400 Subject: [PATCH] Adjusts easing in places where EASE_IN/OUT was applied without a curve. (#92976) Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com> --- code/_onclick/hud/radial.dm | 2 +- code/datums/brain_damage/imaginary_friend.dm | 2 +- code/datums/components/callouts.dm | 2 +- code/datums/elements/corrupted_organ.dm | 2 +- code/game/objects/items/tcg/tcg.dm | 2 +- code/game/turfs/open/water.dm | 4 ++-- code/modules/antagonists/cult/blood_magic.dm | 2 +- code/modules/antagonists/heretic/magic/mansus_grasp.dm | 2 +- code/modules/hallucination/mother.dm | 2 +- .../mob/living/basic/minebots/minebot_abilities.dm | 2 +- code/modules/mob/living/living.dm | 4 ++-- code/modules/mob/living/living_update_icons.dm | 2 +- .../simple_animal/hostile/megafauna/blood_drunk_miner.dm | 6 +++--- .../living/simple_animal/hostile/megafauna/hierophant.dm | 4 ++-- .../simple_animal/hostile/mining_mobs/elites/pandora.dm | 4 ++-- tools/ci/check_grep.sh | 8 ++++++++ 16 files changed, 29 insertions(+), 21 deletions(-) diff --git a/code/_onclick/hud/radial.dm b/code/_onclick/hud/radial.dm index 441ebe8a1a9..e71876ba1e5 100644 --- a/code/_onclick/hud/radial.dm +++ b/code/_onclick/hud/radial.dm @@ -233,7 +233,7 @@ GLOBAL_LIST_EMPTY(radial_menus) E.pixel_x = px if(anim_flag & BUTTON_FADE_IN) - animate(E, alpha = 255, time = 0.15 SECONDS, easing = EASE_OUT) + animate(E, alpha = 255, time = 0.15 SECONDS, easing = CUBIC_EASING|EASE_OUT) else E.alpha = 255 diff --git a/code/datums/brain_damage/imaginary_friend.dm b/code/datums/brain_damage/imaginary_friend.dm index 42779b5c81a..2c99da7c6f0 100644 --- a/code/datums/brain_damage/imaginary_friend.dm +++ b/code/datums/brain_damage/imaginary_friend.dm @@ -392,7 +392,7 @@ var/obj/visual = image('icons/hud/screen_gen.dmi', our_tile, "arrow", FLY_LAYER) INVOKE_ASYNC(GLOBAL_PROC, GLOBAL_PROC_REF(flick_overlay_global), visual, group_clients(), 2.5 SECONDS) - animate(visual, pixel_x = (tile.x - our_tile.x) * ICON_SIZE_X + pointed_atom.pixel_x, pixel_y = (tile.y - our_tile.y) * ICON_SIZE_Y + pointed_atom.pixel_y, time = 1.7, easing = EASE_OUT) + animate(visual, pixel_x = (tile.x - our_tile.x) * ICON_SIZE_X + pointed_atom.pixel_x, pixel_y = (tile.y - our_tile.y) * ICON_SIZE_Y + pointed_atom.pixel_y, time = 1.7, easing = SINE_EASING|EASE_OUT) /mob/eye/imaginary_friend/create_thinking_indicator() if(active_thinking_indicator || active_typing_indicator || !HAS_TRAIT(src, TRAIT_THINKING_IN_CHARACTER)) diff --git a/code/datums/components/callouts.dm b/code/datums/components/callouts.dm index c6b27bf17dc..7c4ff3934b9 100644 --- a/code/datums/components/callouts.dm +++ b/code/datums/components/callouts.dm @@ -142,7 +142,7 @@ color = colorize_string(creator.get_voice(), 2, 0.9) update_appearance() var/turf/target_loc = get_turf(target) - animate(src, pixel_x = (target_loc.x - loc.x) * ICON_SIZE_X + target.pixel_x, pixel_y = (target_loc.y - loc.y) * ICON_SIZE_Y + target.pixel_y, time = 0.2 SECONDS, easing = EASE_OUT) + animate(src, pixel_x = (target_loc.x - loc.x) * ICON_SIZE_X + target.pixel_x, pixel_y = (target_loc.y - loc.y) * ICON_SIZE_Y + target.pixel_y, time = 0.2 SECONDS, easing = SINE_EASING|EASE_OUT) /datum/callout_option var/name = "ERROR" diff --git a/code/datums/elements/corrupted_organ.dm b/code/datums/elements/corrupted_organ.dm index 792ee2fc25a..ccf56b17c30 100644 --- a/code/datums/elements/corrupted_organ.dm +++ b/code/datums/elements/corrupted_organ.dm @@ -60,7 +60,7 @@ /obj/effect/temp_visual/curse_blast/Initialize(mapload) . = ..() animate(src, transform = matrix() * 0.2, time = 0, flags = ANIMATION_PARALLEL) - animate(transform = matrix() * 2, time = duration, easing = EASE_IN) + animate(transform = matrix() * 2, time = duration, easing = QUAD_EASING|EASE_IN) animate(src, alpha = 255, time = 0, flags = ANIMATION_PARALLEL) animate(alpha = 255, time = 0.2 SECONDS) diff --git a/code/game/objects/items/tcg/tcg.dm b/code/game/objects/items/tcg/tcg.dm index 7a50e142065..75544b7ae1b 100644 --- a/code/game/objects/items/tcg/tcg.dm +++ b/code/game/objects/items/tcg/tcg.dm @@ -162,7 +162,7 @@ GLOBAL_LIST_EMPTY(tcgcard_radial_choices) else ntransform.TurnTo(UNTAPPED_ANGLE , TAPPED_ANGLE) tapped = !tapped - animate(src, transform = ntransform, time = 2, easing = (EASE_IN|EASE_OUT)) + animate(src, transform = ntransform, time = 2, easing = SINE_EASING) /obj/item/tcgcard/proc/flip_card(mob/user) to_chat(user, span_notice("You turn the card over.")) diff --git a/code/game/turfs/open/water.dm b/code/game/turfs/open/water.dm index ee63072025f..7dde7cb70b1 100644 --- a/code/game/turfs/open/water.dm +++ b/code/game/turfs/open/water.dm @@ -172,8 +172,8 @@ holder.plane = MUTATE_PLANE(MASSIVE_OBJ_PLANE, src) add_filter("hot_spring_waves", 1, wave_filter(y = 1, size = 1, offset = 0, flags = WAVE_BOUNDED)) var/filter = get_filter("hot_spring_waves") - animate(filter, offset = 1, time = 3 SECONDS, loop = -1, easing = SINE_EASING|EASE_IN|EASE_OUT) - animate(offset = 0, time = 3 SECONDS, easing = SINE_EASING|EASE_IN|EASE_OUT) + animate(filter, offset = 1, time = 3 SECONDS, loop = -1, easing = QUAD_EASING) + animate(offset = 0, time = 3 SECONDS, easing = QUAD_EASING) /turf/open/water/hot_spring/Destroy() remove_shared_particles("hot_springs_[GET_TURF_PLANE_OFFSET(src)]") diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm index 1bafdb7a3ef..23af33c99e9 100644 --- a/code/modules/antagonists/cult/blood_magic.dm +++ b/code/modules/antagonists/cult/blood_magic.dm @@ -465,7 +465,7 @@ var/old_color = target.color target.color = COLOR_HERETIC_GREEN - animate(target, color = old_color, time = 4 SECONDS, easing = EASE_IN) + animate(target, color = old_color, time = 4 SECONDS, easing = SINE_EASING|EASE_IN) target.mob_light(range = 1.5, power = 2.5, color = COLOR_HERETIC_GREEN, duration = 0.5 SECONDS) playsound(target, 'sound/effects/magic/magic_block_mind.ogg', 150, TRUE) // insanely quiet diff --git a/code/modules/antagonists/heretic/magic/mansus_grasp.dm b/code/modules/antagonists/heretic/magic/mansus_grasp.dm index 03b44a393f1..bf99c063e20 100644 --- a/code/modules/antagonists/heretic/magic/mansus_grasp.dm +++ b/code/modules/antagonists/heretic/magic/mansus_grasp.dm @@ -54,7 +54,7 @@ var/old_color = carbon_hit.color carbon_hit.color = COLOR_CULT_RED - animate(carbon_hit, color = old_color, time = 4 SECONDS, easing = EASE_IN) + animate(carbon_hit, color = old_color, time = 4 SECONDS, easing = SINE_EASING|EASE_IN) carbon_hit.mob_light(range = 1.5, power = 2.5, color = COLOR_CULT_RED, duration = 0.5 SECONDS) playsound(carbon_hit, 'sound/effects/magic/curse.ogg', 50, TRUE) diff --git a/code/modules/hallucination/mother.dm b/code/modules/hallucination/mother.dm index a0b3194ce5f..e03a9ee0470 100644 --- a/code/modules/hallucination/mother.dm +++ b/code/modules/hallucination/mother.dm @@ -39,7 +39,7 @@ var/obj/visual = image('icons/hud/screen_gen.dmi', mother.loc, "arrow", FLY_LAYER) INVOKE_ASYNC(GLOBAL_PROC, GLOBAL_PROC_REF(flick_overlay_global), visual, list(hallucinator.client), 2.5 SECONDS) - animate(visual, pixel_x = (tile.x - mother.x) * ICON_SIZE_X, pixel_y = (tile.y - mother.y) * ICON_SIZE_Y, time = 1.7, easing = EASE_OUT) + animate(visual, pixel_x = (tile.x - mother.x) * ICON_SIZE_X, pixel_y = (tile.y - mother.y) * ICON_SIZE_Y, time = 1.7, easing = QUAD_EASING|EASE_OUT) /datum/hallucination/your_mother/proc/talk(text) var/plus_runechat = hallucinator.client?.prefs.read_preference(/datum/preference/toggle/enable_runechat) diff --git a/code/modules/mob/living/basic/minebots/minebot_abilities.dm b/code/modules/mob/living/basic/minebots/minebot_abilities.dm index bc778a7bfe7..6d6229d7e53 100644 --- a/code/modules/mob/living/basic/minebots/minebot_abilities.dm +++ b/code/modules/mob/living/basic/minebots/minebot_abilities.dm @@ -131,7 +131,7 @@ /obj/effect/temp_visual/rising_rocket/Initialize(mapload) . = ..() playsound(src, 'sound/items/weapons/minebot_rocket.ogg', 100, FALSE) - animate(src, pixel_y = base_pixel_y + 500, time = duration, easing = EASE_IN) + animate(src, pixel_y = base_pixel_y + 500, time = duration, easing = QUAD_EASING|EASE_IN) /obj/effect/temp_visual/falling_rocket name = "Missile" diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 0f3fc44e85c..24cf10356c9 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1253,7 +1253,7 @@ var/matrix/flipped_matrix = transform flipped_matrix.b = -flipped_matrix.b flipped_matrix.e = -flipped_matrix.e - animate(src, transform = flipped_matrix, time = 0.5 SECONDS, easing = EASE_OUT, flags = ANIMATION_PARALLEL) + animate(src, transform = flipped_matrix, time = 0.5 SECONDS, easing = SINE_EASING|EASE_OUT, flags = ANIMATION_PARALLEL) add_offsets(NEGATIVE_GRAVITY_TRAIT, y_add = 4) if(NEGATIVE_GRAVITY + 0.01 to 0) if(!istype(gravity_alert, /atom/movable/screen/alert/weightless)) @@ -1278,7 +1278,7 @@ var/matrix/flipped_matrix = transform flipped_matrix.b = -flipped_matrix.b flipped_matrix.e = -flipped_matrix.e - animate(src, transform = flipped_matrix, time = 0.5 SECONDS, easing = EASE_OUT, flags = ANIMATION_PARALLEL) + animate(src, transform = flipped_matrix, time = 0.5 SECONDS, easing = SINE_EASING|EASE_OUT, flags = ANIMATION_PARALLEL) remove_offsets(NEGATIVE_GRAVITY_TRAIT) /mob/living/singularity_pull(atom/singularity, current_size) diff --git a/code/modules/mob/living/living_update_icons.dm b/code/modules/mob/living/living_update_icons.dm index a8a517008c1..274a5a4f101 100644 --- a/code/modules/mob/living/living_update_icons.dm +++ b/code/modules/mob/living/living_update_icons.dm @@ -51,7 +51,7 @@ //if true, we want to avoid any animation time, it'll tween and not rotate at all otherwise. var/is_opposite_angle = REVERSE_ANGLE(lying_angle) == lying_prev var/animate_time = is_opposite_angle ? 0 : UPDATE_TRANSFORM_ANIMATION_TIME - animate(src, transform = ntransform, time = animate_time, dir = final_dir, easing = (EASE_IN|EASE_OUT)) + animate(src, transform = ntransform, time = animate_time, dir = final_dir, easing = SINE_EASING) for (var/hud_key in hud_list) var/image/hud_image = hud_list[hud_key] if (istype(hud_image)) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm index dc469a813bf..d597e0caef4 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm @@ -188,11 +188,11 @@ Difficulty: Medium if(dir & (EAST|WEST)) //Facing east or west final_dir = pick(NORTH, SOUTH) //So you fall on your side rather than your face or ass - animate(src, transform = our_matrix, pixel_y = -6, dir = final_dir, time = 2, easing = EASE_IN|EASE_OUT) + animate(src, transform = our_matrix, pixel_y = -6, dir = final_dir, time = 2, easing = QUAD_EASING) sleep(0.5 SECONDS) - animate(src, color = list("#A7A19E", "#A7A19E", "#A7A19E", list(0, 0, 0)), time = 10, easing = EASE_IN, flags = ANIMATION_PARALLEL) + animate(src, color = list("#A7A19E", "#A7A19E", "#A7A19E", list(0, 0, 0)), time = 10, easing = SINE_EASING|EASE_IN, flags = ANIMATION_PARALLEL) sleep(0.4 SECONDS) - animate(src, alpha = 0, time = 6, easing = EASE_OUT, flags = ANIMATION_PARALLEL) + animate(src, alpha = 0, time = 6, easing = SINE_EASING|EASE_OUT, flags = ANIMATION_PARALLEL) /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/guidance guidance = TRUE diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm index 185c208fd08..f4e00ff7efb 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm @@ -366,14 +366,14 @@ Difficulty: Hard for(var/t in RANGE_TURFS(1, source)) var/obj/effect/temp_visual/hierophant/blast/damaging/B = new(t, src, FALSE) B.damage = 30 - animate(src, alpha = 0, time = 2, easing = EASE_OUT) //fade out + animate(src, alpha = 0, time = 2, easing = SINE_EASING|EASE_OUT) //fade out SLEEP_CHECK_DEATH(1, src) visible_message(span_hierophant_warning("[src] fades out!")) ADD_TRAIT(src, TRAIT_UNDENSE, VANISHING_TRAIT) SLEEP_CHECK_DEATH(2, src) forceMove(T) SLEEP_CHECK_DEATH(1, src) - animate(src, alpha = 255, time = 2, easing = EASE_IN) //fade IN + animate(src, alpha = 255, time = 2, easing = SINE_EASING|EASE_IN) //fade IN SLEEP_CHECK_DEATH(1, src) REMOVE_TRAIT(src, TRAIT_UNDENSE, VANISHING_TRAIT) visible_message(span_hierophant_warning("[src] fades in!")) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/pandora.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/pandora.dm index 9746fef4675..01ec3612afd 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/pandora.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/pandora.dm @@ -146,14 +146,14 @@ new /obj/effect/temp_visual/hierophant/blast/damaging/pandora(t, src) for(var/t in RANGE_TURFS(1, source)) new /obj/effect/temp_visual/hierophant/blast/damaging/pandora(t, src) - animate(src, alpha = 0, time = 2, easing = EASE_OUT) //fade out + animate(src, alpha = 0, time = 2, easing = SINE_EASING|EASE_OUT) //fade out visible_message(span_hierophant_warning("[src] fades out!")) ADD_TRAIT(src, TRAIT_UNDENSE, VANISHING_TRAIT) addtimer(CALLBACK(src, PROC_REF(pandora_teleport_3), T), 0.2 SECONDS) /mob/living/simple_animal/hostile/asteroid/elite/pandora/proc/pandora_teleport_3(turf/T) forceMove(T) - animate(src, alpha = 255, time = 2, easing = EASE_IN) //fade IN + animate(src, alpha = 255, time = 2, easing = CIRCULAR_EASING|EASE_IN) //fade IN REMOVE_TRAIT(src, TRAIT_UNDENSE, VANISHING_TRAIT) visible_message(span_hierophant_warning("[src] fades in!")) diff --git a/tools/ci/check_grep.sh b/tools/ci/check_grep.sh index cfb5baf5dcb..6556e6ea0a2 100644 --- a/tools/ci/check_grep.sh +++ b/tools/ci/check_grep.sh @@ -259,6 +259,14 @@ if ls _maps/*.json | $grep "[A-Z]"; then echo -e "${RED}ERROR: Uppercase in a map .JSON file detected, these must be all lowercase.${NC}" st=1 fi; + +part "Ineffective easing flags in animate()" +if $grep 'easing\w*=\w*(EASE_IN|EASE_OUT|\(EASE_IN\w*\|\w*EASE_OUT\))' $code_files; then + echo + echo -e "${RED}ERROR: 'animate' was called with an easing argument and the default, LINEAR_EASING curve. This doesn't do anything and should be adjusted.${NC}" + st=1 +fi; + part "map json sanity" for json in _maps/*.json do