backpack jiggles - various interactions with backpacks will now make the backpack play an animation

This commit is contained in:
deathride58
2019-01-11 12:44:27 -05:00
parent 2b68547f8d
commit 236af6ae2b
2 changed files with 25 additions and 0 deletions
+14
View File
@@ -1239,6 +1239,20 @@ GLOBAL_REAL_VAR(list/stack_trace_storage)
pixel_x = initialpixelx
pixel_y = initialpixely
/atom/proc/do_jiggle(targetangle = 45)
var/matrix/OM = matrix(transform)
var/matrix/M = matrix(transform)
M.Turn(pick(-targetangle, targetangle))
animate(src, transform = M, time = 10, easing = ELASTIC_EASING)
animate(src, transform = OM, time = 10, easing = ELASTIC_EASING)
/atom/proc/do_squish(squishx = -1, squishy = 2)
var/matrix/OM = matrix(transform)
var/matrix/M = matrix(transform)
M.Scale(squishx, squishy)
animate(src, transform = M, time = 10, easing = ELASTIC_EASING)
animate(src, transform = OM, time = 10, easing = ELASTIC_EASING)
/proc/weightclass2text(var/w_class)
switch(w_class)
if(WEIGHT_CLASS_TINY)