diff --git a/code/modules/multiz/structures.dm b/code/modules/multiz/structures.dm index 61e3a7e4871..8e1673a4510 100644 --- a/code/modules/multiz/structures.dm +++ b/code/modules/multiz/structures.dm @@ -55,32 +55,53 @@ /obj/structure/stairs name = "Stairs" - desc = "Stairs. You walk up and down them." - icon_state = "rampbottom" - icon = 'icons/obj/structures.dmi' + desc = "Stairs leading to another deck. Not too useful if the gravity goes out." + icon = 'icons/obj/stairs.dmi' density = 0 opacity = 0 anchored = 1 - var/obj/structure/stairs/connected - New() - ..() - var/turf/above = GetAbove(src) - if(istype(above, /turf/space)) - above.ChangeTurf(/turf/simulated/open) + . = ..() + for(var/turf/turf in locs) + var/turf/simulated/open/above = GetAbove(turf) + if(!above) + warning("Stair created without level above: ([loc.x], [loc.y], [loc.z])") + return qdel(src) + if(!istype(above)) + above.ChangeTurf(/turf/simulated/open) - initialize() - var/updown = icon_state == "rampbottom" ? UP : DOWN - - var/turf/T = get_step(src, dir | updown) - connected = locate() in T - ASSERT(connected) - - Uncross(var/atom/movable/M) - if(connected && M.dir == dir) - M.loc = connected.loc + Uncross(atom/movable/A) + if(A.dir == dir) + // This is hackish but whatever. + var/turf/target = get_step(GetAbove(A), dir) + var/turf/source = A.loc + if(target.Enter(A, source)) + A.loc = target + target.Entered(A, source) + return 0 return 1 CanPass(obj/mover, turf/source, height, airflow) - return airflow || !density \ No newline at end of file + return airflow || !density + + // type paths to make mapping easier. + north + dir = NORTH + bound_height = 64 + bound_y = -32 + pixel_y = -32 + + south + dir = SOUTH + bound_height = 64 + + east + dir = EAST + bound_width = 64 + bound_x = -32 + pixel_x = -32 + + west + dir = WEST + bound_width = 64 \ No newline at end of file diff --git a/code/modules/multiz/turf.dm b/code/modules/multiz/turf.dm index c78807a3286..5733e5d0aff 100644 --- a/code/modules/multiz/turf.dm +++ b/code/modules/multiz/turf.dm @@ -29,7 +29,7 @@ return // Prevent pipes from falling into the void... if there is a pipe to support it. - if(istype(mover, /obj/item/pipe) && \ + if(mover.anchored || istype(mover, /obj/item/pipe) && \ (locate(/obj/structure/disposalpipe/up) in below) || \ locate(/obj/machinery/atmospherics/pipe/zpipe/up in below)) return @@ -54,9 +54,9 @@ if(!soft) if(!istype(mover, /mob)) if(istype(below, /turf/simulated/open)) - below.visible_message("\The [mover] falls from the deck above through \the [below]!", "You hear a whoosh of displaced air.") + mover.visible_message("\The [mover] falls from the deck above through \the [below]!", "You hear a whoosh of displaced air.") else - below.visible_message("\The [mover] falls from the deck above and slams into \the [below]!", "You hear something slam into the deck.") + mover.visible_message("\The [mover] falls from the deck above and slams into \the [below]!", "You hear something slam into the deck.") else var/mob/M = mover if(istype(below, /turf/simulated/open)) diff --git a/icons/obj/stairs.dmi b/icons/obj/stairs.dmi new file mode 100644 index 00000000000..d29408d8808 Binary files /dev/null and b/icons/obj/stairs.dmi differ diff --git a/icons/obj/structures.dmi b/icons/obj/structures.dmi index e5071ac8f04..214428603e3 100644 Binary files a/icons/obj/structures.dmi and b/icons/obj/structures.dmi differ