Fixing small chasm-side bugs.

Makes it so items won't fall into chasms multiple times while chasms are doing animations or processing by briefly making the item float.
This commit is contained in:
Haha26315
2022-09-14 20:56:41 -04:00
parent 8524fa2d62
commit 75b5be043d
3 changed files with 15 additions and 9 deletions
+6 -2
View File
@@ -97,8 +97,8 @@
/datum/component/chasm/proc/drop(atom/movable/AM)
//Make sure the item is still there after our sleep
if(!AM || QDELETED(AM))
//Make sure we have an item
if(!AM)
return
falling_atoms[AM] = (falling_atoms[AM] || 0) + 1
var/turf/T = target_turf
@@ -116,6 +116,9 @@
else
//We don't want to drop the same object more than once, so we make it float for the duration of animations, etc
AM.floating = TRUE
// send to oblivion
AM.visible_message("<span class='boldwarning'>[AM] falls into [parent]!</span>", "<span class='userdanger'>[oblivion_message]</span>")
@@ -185,6 +188,7 @@
if(AM && !QDELETED(AM)) //It's indestructible
var/atom/parent = src.parent
parent.visible_message("<span class='boldwarning'>[parent] spits out [AM]!</span>")
AM.floating = FALSE //Stop the thing floating for now
AM.alpha = oldalpha
AM.color = oldcolor
AM.transform = oldtransform