Skip to content

Commit

Permalink
Updates some animations
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMelbert committed Feb 1, 2025
1 parent 4786873 commit facaf4a
Show file tree
Hide file tree
Showing 24 changed files with 156 additions and 129 deletions.
14 changes: 7 additions & 7 deletions code/datums/components/riding/riding_vehicle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,10 @@
switch(pass_index)
if(1)
return list(
TEXT_NORTH = list(-10, -4),
TEXT_SOUTH = list( 16, -4),
TEXT_EAST = list( -4, 30),
TEXT_WEST = list( 4, -3),
TEXT_NORTH = list(-10, -4, LYING_MOB_LAYER),
TEXT_SOUTH = list( 16, -4, LYING_MOB_LAYER),
TEXT_EAST = list( -4, 30, LYING_MOB_LAYER),
TEXT_WEST = list( 4, -3, LYING_MOB_LAYER),
)
if(2)
return list(
Expand All @@ -284,15 +284,15 @@
return list(
TEXT_NORTH = list(-10, -18, ABOVE_MOB_LAYER + 0.1),
TEXT_SOUTH = list( 16, 25, VEHICLE_LAYER),
TEXT_EAST = list(-22, 30,),
TEXT_EAST = list(-22, 30, LYING_MOB_LAYER),
TEXT_WEST = list( 22, -3, ABOVE_MOB_LAYER),
)
if(4)
return list(
TEXT_NORTH = list( 19, -18, 4.2),
TEXT_NORTH = list( 19, -18, ABOVE_MOB_LAYER + 0.1),
TEXT_SOUTH = list(-13, 25, VEHICLE_LAYER),
TEXT_EAST = list(-22, 3, VEHICLE_LAYER),
TEXT_WEST = list( 22, 28,),
TEXT_WEST = list( 22, 28, LYING_MOB_LAYER),
)

/datum/component/riding/vehicle/speedwagon/get_parent_offsets_and_layers()
Expand Down
10 changes: 4 additions & 6 deletions code/datums/mutations/body.dm
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,10 @@
owner.emote("twitch")
if(2 to 3)
owner.say("[prob(50) ? ";" : ""][pick("SHIT", "PISS", "FUCK", "CUNT", "COCKSUCKER", "MOTHERFUCKER", "TITS")]", forced=name)
var/x_offset_old = owner.pixel_x
var/y_offset_old = owner.pixel_y
var/x_offset = owner.pixel_x + rand(-2,2)
var/y_offset = owner.pixel_y + rand(-1,1)
animate(owner, pixel_x = x_offset, pixel_y = y_offset, time = 1)
animate(owner, pixel_x = x_offset_old, pixel_y = y_offset_old, time = 1)
var/w_offset = rand(-2, 2)
var/z_offset = rand(-1, 1)
animate(owner, pixel_w = w_offset, pixel_z = z_offset, time = 0.1 SECONDS, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
animate(owner, pixel_w = -w_offset, pixel_z = -z_offset, time = 0.1 SECONDS, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)


//Deafness makes you deaf.
Expand Down
8 changes: 4 additions & 4 deletions code/datums/status_effects/debuffs/jitteriness.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
/// jitter_amount will only apply up to 300 (maximum jitter effect).
/mob/living/proc/do_jitter_animation(jitter_amount = 100)
var/amplitude = min(4, (jitter_amount / 100) + 1)
var/pixel_x_diff = rand(-amplitude, amplitude)
var/pixel_y_diff = rand(-amplitude / 3, amplitude / 3)
animate(src, pixel_x = pixel_x_diff, pixel_y = pixel_y_diff , time = 0.2 SECONDS, loop = 6, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
animate(pixel_x = -pixel_x_diff , pixel_y = -pixel_y_diff , time = 0.2 SECONDS, flags = ANIMATION_RELATIVE)
var/pixel_w_diff = rand(-amplitude, amplitude)
var/pixel_z_diff = rand(-amplitude / 3, amplitude / 3)
animate(src, pixel_w = pixel_w_diff, pixel_z = pixel_z_diff , time = 0.2 SECONDS, loop = 6, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
animate(pixel_w = -pixel_w_diff , pixel_z = -pixel_z_diff , time = 0.2 SECONDS, flags = ANIMATION_RELATIVE)
8 changes: 4 additions & 4 deletions code/datums/status_effects/debuffs/staggered.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
UnregisterSignal(owner, list(COMSIG_LIVING_DEATH, SIGNAL_ADDTRAIT(TRAIT_NO_STAGGER)))
owner.remove_movespeed_modifier(/datum/movespeed_modifier/staggered)
// Resetting both X on remove so we're back to normal
animate(owner, pixel_x = owner.base_pixel_x, time = 0.2 SECONDS, flags = ANIMATION_PARALLEL)
animate(owner, pixel_w = owner.base_pixel_w, time = 0.2 SECONDS, flags = ANIMATION_PARALLEL)

/// Signal proc that self deletes our staggered effect
/datum/status_effect/staggered/proc/clear_staggered(datum/source)
Expand All @@ -38,6 +38,6 @@
/datum/status_effect/staggered/proc/animate_stagger()
if(!owner.appears_alive())
return
animate(owner, pixel_x = 2, time = 0.2 SECONDS, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
animate(pixel_x = -4, time = 0.4 SECONDS, flags = ANIMATION_RELATIVE)
animate(pixel_x = 2, time = 0.2 SECONDS, flags = ANIMATION_RELATIVE)
animate(owner, pixel_w = 2, time = 0.2 SECONDS, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
animate(pixel_w = -4, time = 0.4 SECONDS, flags = ANIMATION_RELATIVE)
animate(pixel_w = 2, time = 0.2 SECONDS, flags = ANIMATION_RELATIVE)
1 change: 0 additions & 1 deletion code/game/atom/_atom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,6 @@

pixel_x = pixel_x + base_pixel_x - .


///Setter for the `base_pixel_y` variable to append behavior related to its changing.
/atom/proc/set_base_pixel_y(new_value)
if(base_pixel_y == new_value)
Expand Down
20 changes: 10 additions & 10 deletions code/game/objects/items/signs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@
user.manual_emote("waves around a blank sign.")
var/direction = prob(50) ? -1 : 1
if(NSCOMPONENT(user.dir)) //So signs are waved horizontally relative to what way the player waving it is facing.
animate(user, pixel_x = user.pixel_x + (1 * direction), time = 1, easing = SINE_EASING)
animate(pixel_x = user.pixel_x - (2 * direction), time = 1, easing = SINE_EASING)
animate(pixel_x = user.pixel_x + (2 * direction), time = 1, easing = SINE_EASING)
animate(pixel_x = user.pixel_x - (2 * direction), time = 1, easing = SINE_EASING)
animate(pixel_x = user.pixel_x + (1 * direction), time = 1, easing = SINE_EASING)
animate(user, pixel_w = (1 * direction), time = 0.1 SECONDS, easing = SINE_EASING, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
animate(pixel_w = (-2 * direction), time = 0.1 SECONDS, easing = SINE_EASING, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
animate(pixel_w = (2 * direction), time = 0.1 SECONDS, easing = SINE_EASING, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
animate(pixel_w = (-2 * direction), time = 0.1 SECONDS, easing = SINE_EASING, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
animate(pixel_w = (1 * direction), time = 0.1 SECONDS, easing = SINE_EASING, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
else
animate(user, pixel_y = user.pixel_y + (1 * direction), time = 1, easing = SINE_EASING)
animate(pixel_y = user.pixel_y - (2 * direction), time = 1, easing = SINE_EASING)
animate(pixel_y = user.pixel_y + (2 * direction), time = 1, easing = SINE_EASING)
animate(pixel_y = user.pixel_y - (2 * direction), time = 1, easing = SINE_EASING)
animate(pixel_y = user.pixel_y + (1 * direction), time = 1, easing = SINE_EASING)
animate(user, pixel_z = (1 * direction), time = 0.1 SECONDS, easing = SINE_EASING)
animate(pixel_z = (-2 * direction), time = 0.1 SECONDS, easing = SINE_EASING, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
animate(pixel_z = (2 * direction), time = 0.1 SECONDS, easing = SINE_EASING, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
animate(pixel_z = (-2 * direction), time = 0.1 SECONDS, easing = SINE_EASING, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
animate(pixel_z = (1 * direction), time = 0.1 SECONDS, easing = SINE_EASING, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
user.changeNext_move(CLICK_CD_MELEE)

/datum/action/item_action/nano_picket_sign
Expand Down
22 changes: 11 additions & 11 deletions code/game/objects/items/toys.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1389,18 +1389,18 @@
COOLDOWN_START(src, foamfinger_cooldown, 5 SECONDS)
user.manual_emote("waves around the foam finger.")
var/direction = prob(50) ? -1 : 1
if(NSCOMPONENT(user.dir)) //So signs are waved horizontally relative to what way the player waving it is facing.
animate(user, pixel_x = user.pixel_x + (1 * direction), time = 1, easing = SINE_EASING)
animate(pixel_x = user.pixel_x - (2 * direction), time = 1, easing = SINE_EASING)
animate(pixel_x = user.pixel_x + (2 * direction), time = 1, easing = SINE_EASING)
animate(pixel_x = user.pixel_x - (2 * direction), time = 1, easing = SINE_EASING)
animate(pixel_x = user.pixel_x + (1 * direction), time = 1, easing = SINE_EASING)
if(NSCOMPONENT(user.dir))
animate(user, pixel_w = (1 * direction), time = 0.1 SECONDS, easing = SINE_EASING, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
animate(pixel_w = (-2 * direction), time = 0.1 SECONDS, easing = SINE_EASING, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
animate(pixel_w = (2 * direction), time = 0.1 SECONDS, easing = SINE_EASING, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
animate(pixel_w = (-2 * direction), time = 0.1 SECONDS, easing = SINE_EASING, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
animate(pixel_w = (1 * direction), time = 0.1 SECONDS, easing = SINE_EASING, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
else
animate(user, pixel_y = user.pixel_y + (1 * direction), time = 1, easing = SINE_EASING)
animate(pixel_y = user.pixel_y - (2 * direction), time = 1, easing = SINE_EASING)
animate(pixel_y = user.pixel_y + (2 * direction), time = 1, easing = SINE_EASING)
animate(pixel_y = user.pixel_y - (2 * direction), time = 1, easing = SINE_EASING)
animate(pixel_y = user.pixel_y + (1 * direction), time = 1, easing = SINE_EASING)
animate(user, pixel_z = (1 * direction), time = 0.1 SECONDS, easing = SINE_EASING)
animate(pixel_z = (-2 * direction), time = 0.1 SECONDS, easing = SINE_EASING, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
animate(pixel_z = (2 * direction), time = 0.1 SECONDS, easing = SINE_EASING, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
animate(pixel_z = (-2 * direction), time = 0.1 SECONDS, easing = SINE_EASING, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
animate(pixel_z = (1 * direction), time = 0.1 SECONDS, easing = SINE_EASING, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
user.changeNext_move(CLICK_CD_MELEE)

///All people who have used an Intento this round along with their high scores.
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/structures/beds_chairs/alien_nest.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

/obj/structure/bed/nest/post_buckle_mob(mob/living/M)
ADD_TRAIT(M, TRAIT_HANDS_BLOCKED, type)
M.add_offsets(REF(src), x_add = 2)
M.add_offsets(type, x_add = 2)
M.layer = BELOW_MOB_LAYER
add_overlay(nest_overlay)

Expand All @@ -78,7 +78,7 @@

/obj/structure/bed/nest/post_unbuckle_mob(mob/living/M)
REMOVE_TRAIT(M, TRAIT_HANDS_BLOCKED, type)
M.remove_offsets(REF(src))
M.remove_offsets(type)
M.layer = initial(M.layer)
cut_overlay(nest_overlay)
M.remove_status_effect(/datum/status_effect/nest_sustenance)
Expand Down
8 changes: 4 additions & 4 deletions code/game/objects/structures/beds_chairs/chair.dm
Original file line number Diff line number Diff line change
Expand Up @@ -496,10 +496,10 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0)
alpha = 0

/obj/structure/chair/mime/post_buckle_mob(mob/living/M)
M.add_offsets(REF(src), y_add = 5)
M.add_offsets(type, y_add = 5)

/obj/structure/chair/mime/post_unbuckle_mob(mob/living/M)
M.remove_offsets(REF(src))
M.remove_offsets(type)

/obj/structure/chair/plastic
icon_state = "plastic_chair"
Expand All @@ -513,13 +513,13 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/chair/stool/bar, 0)
item_chair = /obj/item/chair/plastic

/obj/structure/chair/plastic/post_buckle_mob(mob/living/Mob)
Mob.add_offsets(REF(src), y_add = 2)
Mob.add_offsets(type, y_add = 2)
. = ..()
if(iscarbon(Mob))
INVOKE_ASYNC(src, PROC_REF(snap_check), Mob)

/obj/structure/chair/plastic/post_unbuckle_mob(mob/living/Mob)
Mob.remove_offsets(REF(src))
Mob.remove_offsets(type)

/obj/structure/chair/plastic/proc/snap_check(mob/living/carbon/Mob)
if (Mob.nutrition >= NUTRITION_LEVEL_FAT)
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/structures/gym/weight_machine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@
flick_overlay_view(workout, 0.8 SECONDS)
flick("[base_icon_state]-u", src)
var/mob/living/user = buckled_mobs[1]
animate(user, pixel_y = pixel_shift_y, time = WORKOUT_LENGTH * 0.5)
animate(user, pixel_z = pixel_shift_y, time = WORKOUT_LENGTH * 0.5, flags = ANIMATION_PARALLEL|ANIMATION_RELATIVE)
animate(pixel_z = -pixel_shift_y, time = WORKOUT_LENGTH * 0.5, flags = ANIMATION_PARALLEL|ANIMATION_RELATIVE)
playsound(user, 'sound/machines/creak.ogg', 60, TRUE)
animate(pixel_y = user.base_pixel_y, time = WORKOUT_LENGTH * 0.5)

if(!iscarbon(user) || isnull(user.mind))
return TRUE
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/structures/kitchen_spike.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
var/matrix/m180 = matrix(target.transform)
m180.Turn(180)
animate(target, transform = m180, time = 3)
target.add_offsets(REF(src), y_add = -6, animate = FALSE)
target.add_offsets(type, y_add = -6, animate = FALSE)
ADD_TRAIT(target, TRAIT_MOVE_UPSIDE_DOWN, REF(src))

/obj/structure/kitchenspike/user_unbuckle_mob(mob/living/buckled_mob, mob/user)
Expand Down Expand Up @@ -156,7 +156,7 @@
var/matrix/m180 = matrix(buckled_mob.transform)
m180.Turn(180)
animate(buckled_mob, transform = m180, time = 3)
buckled_mob.remove_offsets(REF(src), animate = FALSE)
buckled_mob.remove_offsets(type, animate = FALSE)
REMOVE_TRAIT(buckled_mob, TRAIT_MOVE_UPSIDE_DOWN, REF(src))

/obj/structure/kitchenspike/deconstruct(disassembled = TRUE)
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/structures/tables_racks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -767,11 +767,11 @@

///Align the mob with the table when buckled.
/obj/structure/table/optable/post_buckle_mob(mob/living/buckled)
buckled.add_offsets(REF(src), y_add = 6)
buckled.add_offsets(type, y_add = 6)

///Disalign the mob with the table when unbuckled.
/obj/structure/table/optable/post_unbuckle_mob(mob/living/buckled)
buckled.remove_offsets(REF(src))
buckled.remove_offsets(type)

/// Any mob that enters our tile will be marked as a potential patient. They will be turned into a patient if they lie down.
/obj/structure/table/optable/proc/mark_patient(datum/source, mob/living/carbon/potential_patient)
Expand Down
14 changes: 5 additions & 9 deletions code/modules/basketball/hoop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,23 +97,19 @@

var/dunk_dir = get_dir(baller, src)

var/dunk_pixel_y = dunk_dir & SOUTH ? -16 : 16
var/dunk_pixel_x = dunk_dir & EAST && 16 || dunk_dir & WEST && -16 || 0
var/dunk_pixel_z = (dunk_dir & SOUTH) ? -16 : 16
var/dunk_pixel_w = ((dunk_dir & EAST) && 16) || ((dunk_dir & WEST) && -16) || 0

animate(baller, pixel_w = dunk_pixel_w, pixel_z = dunk_pixel_z, time = 0.5 SECONDS, easing = BOUNCE_EASING|EASE_IN|EASE_OUT, flags = ANIMATION_PARALLEL|ANIMATION_RELATIVE)
animate(pixel_w = -dunk_pixel_w, pixel_z = -dunk_pixel_z, time = 0.5 SECONDS, flags = ANIMATION_PARALLEL|ANIMATION_RELATIVE)

INVOKE_ASYNC(src, PROC_REF(dunk_animation), baller, dunk_pixel_y, dunk_pixel_x)
visible_message(span_warning("[baller] dunks [ball] into \the [src]!"))
baller.add_mood_event("basketball", /datum/mood_event/basketball_dunk)
score(ball, baller, 2)

if(istype(ball, /obj/item/toy/basketball))
baller.adjustStaminaLoss(STAMINA_COST_DUNKING)

/// This bobs the mob in the hoop direction for the dunk animation
/obj/structure/hoop/proc/dunk_animation(mob/living/baller, dunk_pixel_y, dunk_pixel_x)
animate(baller, pixel_x = dunk_pixel_x, pixel_y = dunk_pixel_y, time = 5, easing = BOUNCE_EASING|EASE_IN|EASE_OUT)
sleep(0.5 SECONDS)
animate(baller, pixel_x = 0, pixel_y = 0, time = 3)

/obj/structure/hoop/attack_hand(mob/living/baller, list/modifiers)
. = ..()
if(.)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/basic/lavaland/mook/mook_abilities.dm
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@
mook_owner.change_combatant_state(state = MOOK_ATTACK_ACTIVE)
new /obj/effect/temp_visual/mook_dust(get_turf(owner))
playsound(get_turf(owner), 'sound/weapons/thudswoosh.ogg', 50, TRUE)
animate(owner, pixel_y = owner.base_pixel_y + 146, time = 0.5 SECONDS)
animate(owner, pixel_z = 146, time = 0.5 SECONDS, flags = ANIMATION_RELATIVE)
addtimer(CALLBACK(src, PROC_REF(land_on_turf), target), 0.5 SECONDS)

/datum/action/cooldown/mob_cooldown/mook_ability/mook_jump/proc/land_on_turf(turf/target)
do_teleport(owner, target, precision = 3, no_effects = TRUE)
animate(owner, pixel_y = owner.base_pixel_y, time = 0.5 SECONDS)
animate(owner, pixel_z = -146, time = 0.5 SECONDS, flags = ANIMATION_RELATIVE)
new /obj/effect/temp_visual/mook_dust(get_turf(owner))
if(is_mook)
addtimer(CALLBACK(owner, TYPE_PROC_REF(/mob/living/basic/mining/mook, change_combatant_state), MOOK_ATTACK_NEUTRAL), 0.5 SECONDS)
Expand Down
6 changes: 3 additions & 3 deletions code/modules/mob/living/carbon/carbon_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,9 @@
// Shake animation
if (incapacitated())
var/direction = prob(50) ? -1 : 1
animate(src, pixel_x = pixel_x + SHAKE_ANIMATION_OFFSET * direction, time = 1, easing = QUAD_EASING | EASE_OUT, flags = ANIMATION_PARALLEL)
animate(pixel_x = pixel_x - (SHAKE_ANIMATION_OFFSET * 2 * direction), time = 1)
animate(pixel_x = pixel_x + SHAKE_ANIMATION_OFFSET * direction, time = 1, easing = QUAD_EASING | EASE_IN)
animate(src, pixel_w = SHAKE_ANIMATION_OFFSET * direction, time = 0.1 SECONDS, easing = QUAD_EASING | EASE_OUT, flags = ANIMATION_PARALLEL|ANIMATION_RELATIVE)
animate(pixel_w = SHAKE_ANIMATION_OFFSET * -2 * direction, time = 0.1 SECONDS, flags = ANIMATION_RELATIVE)
animate(pixel_w = SHAKE_ANIMATION_OFFSET * direction, time = 0.1 SECONDS, easing = QUAD_EASING | EASE_IN, flags = ANIMATION_RELATIVE)

/// Check ourselves to see if we've got any shrapnel, return true if we do. This is a much simpler version of what humans do, we only indicate we're checking ourselves if there's actually shrapnel
/mob/living/carbon/proc/check_self_for_injuries()
Expand Down
40 changes: 20 additions & 20 deletions code/modules/mob/living/emote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@
. = ..()
if(!.)
return FALSE
animate(user, pixel_y = user.pixel_y + 4, time = 0.1 SECONDS)
animate(pixel_y = user.pixel_y - 4, time = 0.1 SECONDS)
animate(user, pixel_z = 4, time = 0.1 SECONDS, flags = ANIMATION_RELATIVE)
animate(pixel_z = -4, time = 0.1 SECONDS, flags = ANIMATION_RELATIVE)

/datum/emote/living/jump/get_sound(mob/living/user)
return 'sound/weapons/thudswoosh.ogg'
Expand Down Expand Up @@ -399,11 +399,11 @@
. = ..()
if(!.)
return FALSE
animate(user, pixel_x = user.pixel_x + 1, time = 0.1 SECONDS)
animate(user, pixel_w = 1, time = 0.1 SECONDS, flags = ANIMATION_RELATIVE)
for(var/i in 1 to SHIVER_LOOP_DURATION / (0.2 SECONDS)) //desired total duration divided by the iteration duration to give the necessary iteration count
animate(pixel_x = user.pixel_x - 1, time = 0.1 SECONDS)
animate(pixel_x = user.pixel_x + 1, time = 0.1 SECONDS)
animate(pixel_x = user.pixel_x - 1, time = 0.1 SECONDS)
animate(pixel_w = -2, time = 0.1 SECONDS, flags = ANIMATION_RELATIVE|ANIMATION_CONTINUE)
animate(pixel_w = 2, time = 0.1 SECONDS, flags = ANIMATION_RELATIVE|ANIMATION_CONTINUE)
animate(pixel_w = -1, time = 0.1 SECONDS, flags = ANIMATION_RELATIVE)
#undef SHIVER_LOOP_DURATION

/datum/emote/living/sigh
Expand Down Expand Up @@ -514,11 +514,11 @@
. = ..()
if(!.)
return FALSE
animate(user, pixel_x = user.pixel_x + 2, time = 0.5 SECONDS)
animate(user, pixel_w = 2, time = 0.5 SECONDS, flags = ANIMATION_RELATIVE)
for(var/i in 1 to 2)
animate(pixel_x = user.pixel_x - 4, time = 1.0 SECONDS)
animate(pixel_x = user.pixel_x + 4, time = 1.0 SECONDS)
animate(pixel_x = user.pixel_x - 2, time = 0.5 SECONDS)
animate(pixel_w = -6, time = 1.0 SECONDS, flags = ANIMATION_RELATIVE|ANIMATION_CONTINUE)
animate(pixel_w = 6, time = 1.0 SECONDS, flags = ANIMATION_RELATIVE|ANIMATION_CONTINUE)
animate(pixel_w = -2, time = 0.5 SECONDS, flags = ANIMATION_RELATIVE)

/datum/emote/living/tilt
key = "tilt"
Expand All @@ -535,11 +535,11 @@
. = ..()
if(!.)
return FALSE
animate(user, pixel_x = user.pixel_x + 2, time = 0.2 SECONDS)
animate(user, pixel_w = 2, time = 0.2 SECONDS, flags = ANIMATION_RELATIVE)
for(var/i in 1 to TREMBLE_LOOP_DURATION / (0.4 SECONDS)) //desired total duration divided by the iteration duration to give the necessary iteration count
animate(pixel_x = user.pixel_x - 2, time = 0.2 SECONDS)
animate(pixel_x = user.pixel_x + 2, time = 0.2 SECONDS)
animate(pixel_x = user.pixel_x - 2, time = 0.2 SECONDS)
animate(pixel_w = -4, time = 0.2 SECONDS, flags = ANIMATION_RELATIVE|ANIMATION_CONTINUE)
animate(pixel_w = 4, time = 0.2 SECONDS, flags = ANIMATION_RELATIVE|ANIMATION_CONTINUE)
animate(pixel_w = -2, time = 0.2 SECONDS, flags = ANIMATION_RELATIVE)
#undef TREMBLE_LOOP_DURATION

/datum/emote/living/twitch
Expand All @@ -551,11 +551,11 @@
. = ..()
if(!.)
return FALSE
animate(user, pixel_x = user.pixel_x - 1, time = 0.1 SECONDS)
animate(pixel_x = user.pixel_x + 1, time = 0.1 SECONDS)
animate(user, pixel_w = 1, time = 0.1 SECONDS, flags = ANIMATION_RELATIVE)
animate(pixel_w = -2, time = 0.1 SECONDS, flags = ANIMATION_RELATIVE)
animate(time = 0.1 SECONDS)
animate(pixel_x = user.pixel_x - 1, time = 0.1 SECONDS)
animate(pixel_x = user.pixel_x + 1, time = 0.1 SECONDS)
animate(pixel_w = 2, time = 0.1 SECONDS, flags = ANIMATION_RELATIVE)
animate(pixel_w = -1, time = 0.1 SECONDS, flags = ANIMATION_RELATIVE)

/datum/emote/living/twitch_s
key = "twitch_s"
Expand All @@ -566,8 +566,8 @@
. = ..()
if(!.)
return FALSE
animate(user, pixel_x = user.pixel_x - 1, time = 0.1 SECONDS)
animate(pixel_x = user.pixel_x + 1, time = 0.1 SECONDS)
animate(user, pixel_w = -1, time = 0.1 SECONDS, flags = ANIMATION_RELATIVE)
animate(pixel_w = 1, time = 0.1 SECONDS, flags = ANIMATION_RELATIVE)

/datum/emote/living/wave
key = "wave"
Expand Down
Loading

0 comments on commit facaf4a

Please sign in to comment.