diff --git a/code/__DEFINES/obj_flags.dm b/code/__DEFINES/obj_flags.dm index b73d5bc5252..633df072511 100644 --- a/code/__DEFINES/obj_flags.dm +++ b/code/__DEFINES/obj_flags.dm @@ -10,7 +10,10 @@ #define UNIQUE_RENAME (1<<6) // can you customize the description/name of the thing? #define USES_TGUI (1<<7) //put on things that use tgui on ui_interact instead of custom/old UI. #define FROZEN (1<<8) -#define BLOCK_Z_FALL (1<<9) // Should this object block z falling? +#define BLOCK_Z_OUT_DOWN (1<<9) // Should this object block z falling from loc? +#define BLOCK_Z_OUT_UP (1<<10) // Should this object block z uprise from loc? +#define BLOCK_Z_IN_DOWN (1<<11) // Should this object block z falling from above? +#define BLOCK_Z_IN_UP (1<<12) // Should this object block z uprise from below? // If you add new ones, be sure to add them to /obj/Initialize as well for complete mapping support diff --git a/code/game/objects/structures/ladders.dm b/code/game/objects/structures/ladders.dm index 63fae9f4548..a1bdf9fa198 100644 --- a/code/game/objects/structures/ladders.dm +++ b/code/game/objects/structures/ladders.dm @@ -7,6 +7,7 @@ anchored = TRUE var/obj/structure/ladder/down //the ladder below this one var/obj/structure/ladder/up //the ladder above this one + obj_flags = CAN_BE_HIT | BLOCK_Z_OUT_DOWN /obj/structure/ladder/Initialize(mapload, obj/structure/ladder/up, obj/structure/ladder/down) ..() diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm index a977b077a4c..75595234a14 100644 --- a/code/game/objects/structures/lattice.dm +++ b/code/game/objects/structures/lattice.dm @@ -17,6 +17,7 @@ /obj/structure/falsewall) smooth = SMOOTH_MORE // flags = CONDUCT_1 + obj_flags = CAN_BE_HIT | BLOCK_Z_OUT_DOWN /obj/structure/lattice/examine(mob/user) . = ..() @@ -77,7 +78,7 @@ number_of_mats = 2 smooth = SMOOTH_TRUE canSmoothWith = null - obj_flags = CAN_BE_HIT | BLOCK_Z_FALL + obj_flags = CAN_BE_HIT | BLOCK_Z_OUT_DOWN | BLOCK_Z_IN_UP /obj/structure/lattice/catwalk/deconstruction_hints(mob/user) return "The supporting rods look like they could be cut." @@ -103,7 +104,7 @@ color = "#5286b9ff" smooth = SMOOTH_TRUE canSmoothWith = null - obj_flags = CAN_BE_HIT | BLOCK_Z_FALL + obj_flags = CAN_BE_HIT | BLOCK_Z_OUT_DOWN | BLOCK_Z_IN_UP resistance_flags = FIRE_PROOF | LAVA_PROOF /obj/structure/lattice/lava/deconstruction_hints(mob/user) diff --git a/code/game/turfs/open/_open.dm b/code/game/turfs/open/_open.dm index 29d560d952f..eada9138ebd 100644 --- a/code/game/turfs/open/_open.dm +++ b/code/game/turfs/open/_open.dm @@ -18,11 +18,21 @@ //direction is direction of travel of A /turf/open/zPassIn(atom/movable/A, direction, turf/source) - return (direction == DOWN) + if(direction == DOWN) + for(var/obj/O in contents) + if(O.obj_flags & BLOCK_Z_IN_DOWN) + return FALSE + return TRUE + return FALSE //direction is direction of travel of A /turf/open/zPassOut(atom/movable/A, direction, turf/destination) - return (direction == UP) + if(direction == UP) + for(var/obj/O in contents) + if(O.obj_flags & BLOCK_Z_OUT_UP) + return FALSE + return TRUE + return FALSE //direction is direction of travel of air /turf/open/zAirIn(direction, turf/source) diff --git a/code/game/turfs/open/openspace.dm b/code/game/turfs/open/openspace.dm index 359450d994a..f3b4a1ddc99 100644 --- a/code/game/turfs/open/openspace.dm +++ b/code/game/turfs/open/openspace.dm @@ -51,15 +51,32 @@ GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdr return TRUE /turf/open/transparent/openspace/zPassIn(atom/movable/A, direction, turf/source) - return TRUE + if(direction == DOWN) + for(var/obj/O in contents) + if(O.obj_flags & BLOCK_Z_IN_DOWN) + return FALSE + return TRUE + if(direction == UP) + for(var/obj/O in contents) + if(O.obj_flags & BLOCK_Z_IN_UP) + return FALSE + return TRUE + return FALSE /turf/open/transparent/openspace/zPassOut(atom/movable/A, direction, turf/destination) if(A.anchored) return FALSE - for(var/obj/O in contents) - if(O.obj_flags & BLOCK_Z_FALL) - return FALSE - return TRUE + if(direction == DOWN) + for(var/obj/O in contents) + if(O.obj_flags & BLOCK_Z_OUT_DOWN) + return FALSE + return TRUE + if(direction == UP) + for(var/obj/O in contents) + if(O.obj_flags & BLOCK_Z_OUT_UP) + return FALSE + return TRUE + return FALSE /turf/open/transparent/openspace/proc/CanCoverUp() return can_cover_up diff --git a/code/modules/awaymissions/away_props.dm b/code/modules/awaymissions/away_props.dm index 9a12d14ff2a..6c58238bb00 100644 --- a/code/modules/awaymissions/away_props.dm +++ b/code/modules/awaymissions/away_props.dm @@ -60,7 +60,7 @@ icon_state = "lattice" plane = FLOOR_PLANE anchored = TRUE - obj_flags = CAN_BE_HIT | BLOCK_Z_FALL + obj_flags = CAN_BE_HIT | BLOCK_Z_OUT_DOWN | BLOCK_Z_IN_UP var/id var/open = FALSE var/hidden = FALSE @@ -87,10 +87,10 @@ var/talpha if(open) talpha = 0 - obj_flags &= ~BLOCK_Z_FALL + obj_flags &= ~(BLOCK_Z_OUT_DOWN | BLOCK_Z_IN_UP) else talpha = 255 - obj_flags |= BLOCK_Z_FALL + obj_flags |= BLOCK_Z_OUT_DOWN | BLOCK_Z_IN_UP plane = BYOND_LIGHTING_LAYER //What matters it's one above openspace, so our animation is not dependant on what's there. Up to revision with 513 animate(src,alpha = talpha,time = 10) addtimer(CALLBACK(src,.proc/reset_plane),10)