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
@@ -91834,15 +91834,14 @@
/turf/closed/wall,
/area/storage/D)
"ofu" = (
/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer3{
name = "air supply pipe"
},
/obj/machinery/door/airlock/external{
name = "Port Docking Bay 1"
/obj/effect/mapping_helpers/airlock/cyclelink_helper,
/obj/effect/turf_decal/delivery,
/obj/machinery/power/grounding_rod{
anchored = 1
/obj/structure/fans/tiny,
/turf/open/floor/plasteel/dark{
icon_state = "darkfull_whole_alt"
},
/turf/open/floor/plasteel/dark,
/area/engine/tether)
"ofE" = (
/obj/structure/closet/l3closet/scientist,
/obj/effect/turf_decal/stripes/line{
+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
@@ -201,6 +201,9 @@
/obj/machinery/safety_tether/proc/bungee_teleport(mob/living/M, turf/open/Target_Turf, oldalpha, oldcolor, oldtransform)
//Give 'em gravity again, was only there to prevent multiple chasm drops
M.floating = FALSE
//Fun sound bites as the machine gears up to teleport
M.density = FALSE //Prevents a very unlikely issue where players can move around an invisible but not-yet-teleported tether victim
playsound(CENTER_TURF, 'sound/magic/charge.ogg', 100, 1, extrarange = 5)