diff --git a/code/game/machinery/Beacon.dm b/code/game/machinery/Beacon.dm index 83ff9fcf168..94e3b354d47 100644 --- a/code/game/machinery/Beacon.dm +++ b/code/game/machinery/Beacon.dm @@ -26,7 +26,7 @@ Beacon.syndicate = syndicate Beacon.area_bypass = area_bypass Beacon.cc_beacon = cc_beacon - if(!istype(T, /turf/simulated/floor/transparent)) + if(!T.transparent_floor) hide(T.intact) /obj/machinery/bluespace_beacon/proc/destroy_beacon() diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index a9eb8b4de3c..c6ae20c6831 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -32,7 +32,7 @@ /obj/machinery/magnetic_module/New() ..() var/turf/T = loc - if(!istype(T, /turf/simulated/floor/transparent)) + if(!T.transparent_floor) hide(T.intact) center = T diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index ef3d6928aa1..c3d64752f4e 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -26,7 +26,7 @@ set_codes() var/turf/T = loc - if(!istype(T, /turf/simulated/floor/transparent)) + if(!T.transparent_floor) hide(T.intact) if(!codes || !codes.len) log_runtime(EXCEPTION("Empty codes datum at ([x],[y],[z])"), src, list("codes_txt: '[codes_txt]'")) diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index 252da89083a..b06df5ecc06 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -368,7 +368,7 @@ GLOBAL_LIST_EMPTY(safes) /obj/structure/safe/floor/Initialize() . = ..() var/turf/T = loc - if(!istype(T, /turf/simulated/floor/transparent)) + if(!T.transparent_floor) hide(T.intact) /obj/structure/safe/floor/hide(intact) diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index 27f860e53ad..96d7339b876 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -76,7 +76,7 @@ return TRUE var/obj/item/stack/sheet/glass/R = C if(R.get_amount() < 2) - to_chat(user, "You need two glass to make a glass floor!") + to_chat(user, "You need two sheets of glass to build a glass floor!") return TRUE else to_chat(user, "You begin swapping the plating for glass...") @@ -86,6 +86,7 @@ playsound(src, C.usesound, 80, 1) R.use(2) to_chat(user, "You swap the plating for glass.") + new /obj/item/stack/sheet/metal(src, 2) return TRUE else if(istype(C, /obj/item/stack/sheet/rglass)) @@ -94,7 +95,7 @@ return TRUE var/obj/item/stack/sheet/rglass/R = C if(R.get_amount() < 2) - to_chat(user, "You need two reinforced glass to make a reinforced glass floor!") + to_chat(user, "You need two sheets of reinforced glass to build a reinforced glass floor!") return TRUE else to_chat(user, "You begin swapping the plating for reinforced glass...") @@ -104,6 +105,7 @@ playsound(src, C.usesound, 80, 1) R.use(2) to_chat(user, "You swap the plating for reinforced glass.") + new /obj/item/stack/sheet/metal(src, 2) return TRUE /turf/simulated/floor/plating/screwdriver_act(mob/user, obj/item/I) diff --git a/code/game/turfs/simulated/floor/transparent.dm b/code/game/turfs/simulated/floor/transparent.dm index 8e9b6d10e43..ead098688ed 100644 --- a/code/game/turfs/simulated/floor/transparent.dm +++ b/code/game/turfs/simulated/floor/transparent.dm @@ -13,6 +13,7 @@ layer = TRANSPARENT_TURF_LAYER keep_dir = FALSE intact = FALSE + transparent_floor = TRUE /turf/simulated/floor/transparent/glass/Initialize(mapload) . = ..() diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 4678bd94ce4..36381b72ecc 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -6,6 +6,7 @@ var/intact = TRUE var/turf/baseturf = /turf/space var/slowdown = 0 //negative for faster, positive for slower + var/transparent_floor = FALSE //true for transparent floors ///Properties for open tiles (/floor) /// All the gas vars, on the turf, are meant to be utilized for initializing a gas datum and setting its first gas values; the turf vars are never further modified at runtime; it is never directly used for calculations by the atmospherics system. diff --git a/code/modules/atmospherics/machinery/atmospherics.dm b/code/modules/atmospherics/machinery/atmospherics.dm index 8e965c88685..46c44ae2c0d 100644 --- a/code/modules/atmospherics/machinery/atmospherics.dm +++ b/code/modules/atmospherics/machinery/atmospherics.dm @@ -165,7 +165,7 @@ Pipelines + Other Objects -> Pipe network /obj/machinery/atmospherics/attackby(obj/item/W, mob/user) if(can_unwrench && istype(W, /obj/item/wrench)) var/turf/T = get_turf(src) - if(istype(T, /turf/simulated/floor/transparent)) + if(T.transparent_floor) to_chat(user, "You must remove the glass first.") return if(level == 1 && isturf(T) && T.intact) diff --git a/code/modules/atmospherics/machinery/pipes/cap.dm b/code/modules/atmospherics/machinery/pipes/cap.dm index bf3b7f43d2e..ef04c024708 100644 --- a/code/modules/atmospherics/machinery/pipes/cap.dm +++ b/code/modules/atmospherics/machinery/pipes/cap.dm @@ -76,7 +76,7 @@ break var/turf/T = get_turf(src) // hide if turf is not intact - if(!istype(T) || istype(T, /turf/simulated/floor/transparent)) + if(!istype(T) || T.transparent_floor) return hide(T.intact) update_icon() diff --git a/code/modules/atmospherics/machinery/pipes/manifold.dm b/code/modules/atmospherics/machinery/pipes/manifold.dm index b28f18f92ba..0acbcd9884d 100644 --- a/code/modules/atmospherics/machinery/pipes/manifold.dm +++ b/code/modules/atmospherics/machinery/pipes/manifold.dm @@ -55,7 +55,7 @@ node3 = target break var/turf/T = src.loc // hide if turf is not intact - if(istype(T, /turf/simulated/floor/transparent)) + if(T.transparent_floor) return hide(T.intact) update_icon() diff --git a/code/modules/atmospherics/machinery/pipes/manifold4w.dm b/code/modules/atmospherics/machinery/pipes/manifold4w.dm index 75f2db8aabf..c6daf11da6e 100644 --- a/code/modules/atmospherics/machinery/pipes/manifold4w.dm +++ b/code/modules/atmospherics/machinery/pipes/manifold4w.dm @@ -162,7 +162,7 @@ break var/turf/T = src.loc // hide if turf is not intact - if(!istype(T, /turf/simulated/floor/transparent)) + if(!T.transparent_floor) hide(T.intact) update_icon() diff --git a/code/modules/atmospherics/machinery/pipes/simple/pipe_simple.dm b/code/modules/atmospherics/machinery/pipes/simple/pipe_simple.dm index a4ecfc583d9..7e14946e61e 100644 --- a/code/modules/atmospherics/machinery/pipes/simple/pipe_simple.dm +++ b/code/modules/atmospherics/machinery/pipes/simple/pipe_simple.dm @@ -68,7 +68,7 @@ break var/turf/T = loc // hide if turf is not intact - if(!istype(T, /turf/simulated/floor/transparent)) + if(!T.transparent_floor) hide(T.intact) update_icon() diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index b48c03376cf..50d7ff6db8d 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -70,7 +70,7 @@ By design, d1 is the smallest direction and d2 is the highest var/turf/T = get_turf(src) // hide if turf is not intact LAZYADD(GLOB.cable_list, src) //add it to the global cable list - if(istype(T, /turf/simulated/floor/transparent)) + if(T.transparent_floor) return if(level == 1) hide(T.intact) @@ -165,7 +165,7 @@ By design, d1 is the smallest direction and d2 is the highest // /obj/structure/cable/attackby(obj/item/W, mob/user) var/turf/T = get_turf(src) - if(istype(T, /turf/simulated/floor/transparent)) + if(T.transparent_floor) to_chat(user, "You must remove the glass first.") return if(T.intact) @@ -210,7 +210,7 @@ By design, d1 is the smallest direction and d2 is the highest /obj/structure/cable/wirecutter_act(mob/user, obj/item/I) . = TRUE var/turf/T = get_turf(src) - if(istype(T, /turf/simulated/floor/transparent)) + if(T.transparent_floor) to_chat(user, "You must remove the glass first.") return if(T.intact) diff --git a/code/modules/power/terminal.dm b/code/modules/power/terminal.dm index b2284eba265..d8fc709a656 100644 --- a/code/modules/power/terminal.dm +++ b/code/modules/power/terminal.dm @@ -15,7 +15,7 @@ /obj/machinery/power/terminal/Initialize(mapload) . = ..() var/turf/T = get_turf(src) - if(istype(T, /turf/simulated/floor/transparent)) + if(T.transparent_floor) return if(level == 1) hide(T.intact) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index f259ee40ac1..2b3f4765c91 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -758,7 +758,7 @@ // update the icon_state to reflect hidden status /obj/structure/disposalpipe/proc/update() var/turf/T = get_turf(src) - if(istype(T, /turf/simulated/floor/transparent)) + if(T.transparent_floor) update_icon() return hide(T.intact && !istype(T, /turf/space)) // space never hides pipes @@ -893,8 +893,8 @@ /obj/structure/disposalpipe/attackby(obj/item/I, mob/user, params) var/turf/T = get_turf(src) - if(T.intact || istype(T, /turf/simulated/floor/transparent)) - to_chat(user, "You must remove the plating first.") + if(T.intact || T.transparent_floor) + to_chat(user, "You must remove the [T.transparent_floor ? "glass": "plating"] first.") return // prevent interaction with T-scanner revealed pipes and pipes under glass add_fingerprint(user) @@ -904,7 +904,7 @@ var/turf/T = get_turf(src) if(!I.tool_use_check(user, 0)) return - if(istype(T, /turf/simulated/floor/transparent)) + if(T.transparent_floor) to_chat(user, "You must remove the glass first.") return WELDER_ATTEMPT_SLICING_MESSAGE