Spacefall p1

This commit is contained in:
Cyantime
2018-01-31 23:53:08 -05:00
parent 6aac622a55
commit 23e933fa56
2 changed files with 58 additions and 0 deletions
+35
View File
@@ -12,6 +12,41 @@
desc = "Ship transit map and whatnot."
mappath = 'tether_ships.dmm'
/obj/effect/step_trigger/zlevel_fall/initialize()
. = ..()
if(istype(get_turf(src), /turf/simulated/floor))
src:target_z = z
qdel(src)
/obj/effect/step_trigger/zlevel_fall/Trigger(var/atom/movable/A) //mostly from /obj/effect/step_trigger/teleporter/planetary_fall, step_triggers.dm L160
var/attempts = 100
var/turf/simulated/T
while(attempts && !T)
var/turf/simulated/candidate = locate(rand(5,world.maxx-5),rand(5,world.maxy-5),src:target_z)
if(candidate.density)
attempts--
continue
T = candidate
break
if(!T)
message_admins("ERROR: planetary_fall step trigger could not find a suitable landing turf.")
return
if(isobserver(A))
A.forceMove(T) // Harmlessly move ghosts.
return
if(isliving(A)) // Someday, implement parachutes. For now, just turbomurder whoever falls.
var/mob/living/L = A
L.fall_impact(T, 42, 90, FALSE, TRUE) //You will not be defibbed from this.
message_admins("\The [A] fell out of the sky.")
A.forceMove(T)
/obj/effect/step_trigger/zlevel_fall/beach
var/static/target_z
/// Away Missions
+23
View File
@@ -79,6 +79,29 @@
/obj/effect/step_trigger/teleporter/planetary_fall/virgo3b/initialize()
planet = planet_virgo3b
/obj/effect/step_trigger/lost_in_space
var/deathmessage = "You drift off into space, floating alone in the void until your life support runs out."
/obj/effect/step_trigger/lost_in_space/Trigger(var/atom/movable/A) //replacement for shuttle dump zones because there's no empty space levels to dump to
if(ismob(A))
to_chat(A, "<span class='danger'>[deathmessage]</span>")
qdel(A)
/obj/effect/step_trigger/lost_in_space/bluespace
deathmessage = "Everything goes blue as your component particles are scattered throughout the known and unknown universe."
var/last_sound = 0
/obj/effect/step_trigger/lost_in_space/bluespace/Trigger(A)
if(world.time - last_sound > 5 SECONDS)
last_sound = world.time
playsound(get_turf(src), 'sound/effects/supermatter.ogg', 75, 1)
if(ismob(A) && prob(5))//lucky day
var/destturf = locate(rand(5,world.maxx-5),rand(5,world.maxy-5),pick(using_map.station_levels))
new /datum/teleport/instant(A, destturf, 0, 1, null, null, null, 'sound/effects/phasein.ogg')
else
return ..()
// Invisible object that blocks z transfer to/from its turf and the turf above.
/obj/effect/ceiling
invisibility = 101 // nope cant see this