Skip to content

Commit

Permalink
Chasms fix pixel Y when spitting things out, and spit out indestructa…
Browse files Browse the repository at this point in the history
…ble things again (ParadiseSS13#27515)

* Chasms fix pixel Y when spitting things out, and spit out indestructable things again

* Apply suggestions from code review

Co-authored-by: Contrabang <[email protected]>
Signed-off-by: Qwertytoforty <[email protected]>

---------

Signed-off-by: Qwertytoforty <[email protected]>
Co-authored-by: Contrabang <[email protected]>
  • Loading branch information
Qwertytoforty and Contrabang authored Dec 17, 2024
1 parent edba9e4 commit 8ff638b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions code/game/turfs/simulated/floor/chasm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -238,6 +240,14 @@

qdel(AM)

if(!QDELETED(AM)) //It's indestructible, mobs have already returned above!
visible_message("<span class='boldwarning'>[src] spits out [AM]!</span>")
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
*/
Expand Down

0 comments on commit 8ff638b

Please sign in to comment.