mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
* WIP: Glass floors. * More work * Missed indentation * Falling implemented, fatties don't affect plasmaglass. * has_gravity checks and more dickery * Fuck it. * Airless variants. * Deconstruction steps. * Fix runtimes. * Admin logging of decon.
23 lines
732 B
Plaintext
23 lines
732 B
Plaintext
// Wily Coyote-style fall into background. Done by using a matrix transformation and color.
|
|
/proc/fall_into_background(var/atom/movable/AM, var/reset_after=TRUE)
|
|
var/matrix/fall_animation = matrix()
|
|
fall_animation.Scale(0.1,0.1)
|
|
fall_animation.Turn(270)
|
|
//var/alpha_before = src.alpha
|
|
var/color_before = list(AM.color)
|
|
var/transform_before = matrix(AM.transform)
|
|
var/oldcanmove=0
|
|
if(ismob(AM))
|
|
var/mob/M = AM
|
|
oldcanmove = M.canmove
|
|
M.canmove = 0
|
|
animate(AM, transform = fall_animation, color = "#000000", time = 30, easing = QUAD_EASING)
|
|
if(reset_after)
|
|
spawn(30)
|
|
//M.alpha=alpha.before
|
|
AM.color = color_before
|
|
AM.transform = transform_before
|
|
if(ismob(AM))
|
|
var/mob/M = AM
|
|
M.canmove=oldcanmove
|