Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions code/__HELPERS/matrices.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,33 @@
//doesn't have an object argument because this is "Stacking" with the animate call above
//3 billion% intentional

/atom/proc/DabAnimation(speed = 1, loops = 1, direction = 1 , hold_seconds = 0 , angle = 1 , stay = FALSE) // Hopek 2019
// By making this in atom/proc everything in the game can potentially dab. You have been warned.
if(hold_seconds > 9999) // if you need to hold a dab for more than 2 hours intentionally let me know.
return
if(hold_seconds > 0)
hold_seconds = hold_seconds * 10 // Converts seconds to deciseconds
if(angle == 1) //if angle is 1: random angle. Else take angle
angle = rand(25,50)
if(direction == 1) // direciton:: 1 for random pick, 2 for clockwise , 3 for anti-clockwise
direction = pick(2,3)
if(direction == 3) // if 3 then counter clockwise
angle = angle * -1
if(speed == 1) // if speed is 1 choose random speed from list
speed = rand(3,5)

// dab matrix here
var/matrix/DAB_COMMENCE = matrix(transform)
var/matrix/DAB_RETURN = matrix(transform)
DAB_COMMENCE.Turn(angle) // dab angle to matrix

// Dab animation
animate(src, transform = DAB_COMMENCE, time = speed, loops ) // dab to hold angle
if(hold_seconds > 0)
sleep(hold_seconds) // time to hold the dab before going back
if(!stay) // if stay param is true dab doesn't return
animate(src, transform = DAB_RETURN, time = speed * 1.5, loops ) // reverse dab to starting position , slower

//Dumps the matrix data in format a-f
/matrix/proc/tolist()
. = list()
Expand Down
3 changes: 3 additions & 0 deletions yogstation/code/modules/mob/living/emote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,7 @@
. = ..()
if(. && ishuman(user))
var/mob/living/carbon/human/H = user
var/light_dab_angle = rand(35,55)
var/light_dab_speed = rand(3,7)
H.DabAnimation(angle = light_dab_angle , speed = light_dab_speed)
H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5)