From 8ff638b5199fc3ceefe2154c1c7ba2bd295017ca Mon Sep 17 00:00:00 2001 From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:56:38 -0500 Subject: [PATCH] Chasms fix pixel Y when spitting things out, and spit out indestructable things again (#27515) * Chasms fix pixel Y when spitting things out, and spit out indestructable things again * Apply suggestions from code review Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> --------- Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> --- code/game/turfs/simulated/floor/chasm.dm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/game/turfs/simulated/floor/chasm.dm b/code/game/turfs/simulated/floor/chasm.dm index 2ad987572d18..2e5bb0e39c99 100644 --- a/code/game/turfs/simulated/floor/chasm.dm +++ b/code/game/turfs/simulated/floor/chasm.dm @@ -205,6 +205,7 @@ var/oldtransform = AM.transform var/oldcolor = AM.color var/oldalpha = AM.alpha + var/old_pixel_y = AM.pixel_y animate(AM, transform = matrix() - matrix(), alpha = 0, color = rgb(0, 0, 0), time = 10) for(var/i in 1 to 5) //Make sure the item is still there after our sleep @@ -222,6 +223,7 @@ AM.alpha = oldalpha AM.color = oldcolor AM.transform = oldtransform + AM.pixel_y = old_pixel_y var/mob/living/fallen_mob = AM fallen_mob.notransform = FALSE if(fallen_mob.stat != DEAD) @@ -238,6 +240,14 @@ qdel(AM) + if(!QDELETED(AM)) //It's indestructible, mobs have already returned above! + visible_message("[src] spits out [AM]!") + AM.alpha = oldalpha + AM.color = oldcolor + AM.transform = oldtransform + AM.pixel_y = old_pixel_y + AM.throw_at(get_edge_target_turf(src, pick(GLOB.alldirs)), rand(1, 10), rand(1, 10)) + /** * An abstract object which is basically just a bag that the chasm puts people inside */