+1
-1
@@ -839,4 +839,4 @@ Proc for attack log creation, because really why not
|
||||
return TRUE
|
||||
|
||||
/atom/proc/intercept_zImpact(atom/movable/AM, levels = 1)
|
||||
return FALSE
|
||||
. |= SEND_SIGNAL(src, COMSIG_ATOM_INTERCEPT_Z_FALL, AM, levels)
|
||||
@@ -2,14 +2,17 @@
|
||||
#define STAIR_TERMINATOR_NO 1
|
||||
#define STAIR_TERMINATOR_YES 2
|
||||
|
||||
// dir determines the direction of travel to go upwards (due to lack of sprites, currently only 1 and 2 make sense)
|
||||
// stairs require /turf/open/openspace as the tile above them to work
|
||||
// multiple stair objects can be chained together; the Z level transition will happen on the final stair object in the chain
|
||||
|
||||
/obj/structure/stairs
|
||||
name = "stairs"
|
||||
icon = 'icons/obj/stairs.dmi'
|
||||
icon_state = "stairs"
|
||||
anchored = TRUE
|
||||
//dir = direction of travel to go upwards
|
||||
|
||||
var/force_open_above = FALSE
|
||||
var/force_open_above = FALSE // replaces the turf above this stair obj with /turf/open/openspace
|
||||
var/terminator_mode = STAIR_TERMINATOR_AUTOMATIC
|
||||
var/turf/listeningTo
|
||||
|
||||
@@ -108,7 +111,9 @@
|
||||
T.ChangeTurf(/turf/open/openspace)
|
||||
|
||||
/obj/structure/stairs/intercept_zImpact(atom/movable/AM, levels = 1)
|
||||
return isTerminator()
|
||||
. = ..()
|
||||
if(isTerminator())
|
||||
. |= FALL_INTERCEPTED | FALL_NO_MESSAGE
|
||||
|
||||
/obj/structure/stairs/proc/isTerminator() //If this is the last stair in a chain and should move mobs up
|
||||
if(terminator_mode != STAIR_TERMINATOR_AUTOMATIC)
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
icon_state = "grey"
|
||||
baseturfs = /turf/open/openspace
|
||||
CanAtmosPassVertical = ATMOS_PASS_YES
|
||||
plane = FLOOR_OPENSPACE_PLANE
|
||||
layer = OPENSPACE_LAYER
|
||||
//mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
var/can_cover_up = TRUE
|
||||
var/can_build_on = TRUE
|
||||
@@ -14,8 +12,10 @@
|
||||
..()
|
||||
return TRUE
|
||||
|
||||
/turf/open/openspace/Initialize()
|
||||
/turf/open/openspace/Initialize() // handle plane and layer here so that they don't cover other obs/turfs in Dream Maker
|
||||
. = ..()
|
||||
plane = FLOOR_OPENSPACE_PLANE
|
||||
layer = OPENSPACE_LAYER
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/turf/open/openspace/LateInitialize()
|
||||
|
||||
+11
-5
@@ -141,11 +141,18 @@
|
||||
/turf/proc/zAirOut(direction, turf/source)
|
||||
return FALSE
|
||||
|
||||
/turf/proc/zImpact(atom/movable/A, levels = 1)
|
||||
/turf/proc/zImpact(atom/movable/A, levels = 1, turf/prev_turf)
|
||||
var/flags = NONE
|
||||
var/mov_name = A.name
|
||||
for(var/i in contents)
|
||||
var/atom/thing = i
|
||||
if(thing.intercept_zImpact(A, levels))
|
||||
return FALSE
|
||||
flags |= thing.intercept_zImpact(A, levels)
|
||||
if(flags & FALL_STOP_INTERCEPTING)
|
||||
break
|
||||
if(prev_turf && !(flags & FALL_NO_MESSAGE))
|
||||
prev_turf.visible_message("<span class='danger'>[mov_name] falls through [prev_turf]!</span>")
|
||||
if(flags & FALL_INTERCEPTED)
|
||||
return
|
||||
if(zFall(A, ++levels))
|
||||
return FALSE
|
||||
A.visible_message("<span class='danger'>[A] crashes into [src]!</span>")
|
||||
@@ -161,11 +168,10 @@
|
||||
return FALSE
|
||||
if(!force && (!can_zFall(A, levels, target) || !A.can_zFall(src, levels, target, DOWN)))
|
||||
return FALSE
|
||||
A.visible_message("<span class='danger'>[A] falls through [src]!</span>")
|
||||
A.zfalling = TRUE
|
||||
A.forceMove(target)
|
||||
A.zfalling = FALSE
|
||||
target.zImpact(A, levels)
|
||||
target.zImpact(A, levels, src)
|
||||
return TRUE
|
||||
|
||||
/turf/proc/handleRCL(obj/item/twohanded/rcl/C, mob/user)
|
||||
|
||||
Reference in New Issue
Block a user