[MIRROR] Turns transparency for turfs into an element, and gives it to datum materials. (#1567)

* Turns transparency for turfs into an element, and gives it to datum materials. (#54250)

* Turns transparency for turfs into an element, and gives it to datum materials.

Co-authored-by: Qustinnus <Floydje123@hotmail.com>
This commit is contained in:
SkyratBot
2020-11-04 00:33:49 +00:00
committed by GitHub
co-authored by Qustinnus
parent a7ac46d2a8
commit 30fc6c78ac
27 changed files with 248 additions and 208 deletions
+1 -1
View File
@@ -141,7 +141,7 @@
/turf/open/space,
/turf/open/chasm,
/turf/open/lava,
/turf/open/transparent/openspace))
/turf/open/openspace))
set_base_icon()
@@ -118,7 +118,7 @@
var/turf/T = get_step_multiz(lift_platform, check_dir)
if(!T)//the edges of multi-z maps
return FALSE
if(check_dir == DOWN && !istype(get_turf(lift_platform), /turf/open/transparent/openspace))
if(check_dir == DOWN && !istype(get_turf(lift_platform), /turf/open/openspace))
return FALSE
return TRUE
+7 -7
View File
@@ -3,7 +3,7 @@
#define STAIR_TERMINATOR_YES 2
// dir determines the direction of travel to go upwards
// stairs require /turf/open/transparent/openspace as the tile above them to work, unless your stairs have 'force_open_above' set to TRUE
// stairs require /turf/open/openspace as the tile above them to work, unless your stairs have 'force_open_above' set to TRUE
// multiple stair objects can be chained together; the Z level transition will happen on the final stair object in the chain
/obj/structure/stairs
@@ -12,7 +12,7 @@
icon_state = "stairs"
anchored = TRUE
var/force_open_above = FALSE // replaces the turf above this stair obj with /turf/open/transparent/openspace
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
@@ -107,22 +107,22 @@
/obj/structure/stairs/proc/build_signal_listener()
if(listeningTo)
UnregisterSignal(listeningTo, COMSIG_TURF_MULTIZ_NEW)
var/turf/open/transparent/openspace/T = get_step_multiz(get_turf(src), UP)
var/turf/open/openspace/T = get_step_multiz(get_turf(src), UP)
RegisterSignal(T, COMSIG_TURF_MULTIZ_NEW, .proc/on_multiz_new)
listeningTo = T
/obj/structure/stairs/proc/force_open_above()
var/turf/open/transparent/openspace/T = get_step_multiz(get_turf(src), UP)
var/turf/open/openspace/T = get_step_multiz(get_turf(src), UP)
if(T && !istype(T))
T.ChangeTurf(/turf/open/transparent/openspace, flags = CHANGETURF_INHERIT_AIR)
T.ChangeTurf(/turf/open/openspace, flags = CHANGETURF_INHERIT_AIR)
/obj/structure/stairs/proc/on_multiz_new(turf/source, dir)
SIGNAL_HANDLER
if(dir == UP)
var/turf/open/transparent/openspace/T = get_step_multiz(get_turf(src), UP)
var/turf/open/openspace/T = get_step_multiz(get_turf(src), UP)
if(T && !istype(T))
T.ChangeTurf(/turf/open/transparent/openspace, flags = CHANGETURF_INHERIT_AIR)
T.ChangeTurf(/turf/open/openspace, flags = CHANGETURF_INHERIT_AIR)
/obj/structure/stairs/intercept_zImpact(atom/movable/AM, levels = 1)
. = ..()