diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index 9286ea2726d..8ac366023e8 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -26,11 +26,13 @@ #define DISPOSAL_PIPE_LAYER 2.3 #define GAS_PIPE_HIDDEN_LAYER 2.35 #define WIRE_LAYER 2.4 +#define TRANSPARENT_TURF_LAYER 2.41 #define WIRE_TERMINAL_LAYER 2.45 #define GAS_SCRUBBER_LAYER 2.46 #define GAS_PIPE_VISIBLE_LAYER 2.47 #define GAS_FILTER_LAYER 2.48 #define GAS_PUMP_LAYER 2.49 +#define HOLOPAD_LAYER 2.491 #define CONVEYOR_LAYER 2.495 #define LOW_OBJ_LAYER 2.5 #define LOW_SIGIL_LAYER 2.52 diff --git a/code/game/machinery/Beacon.dm b/code/game/machinery/Beacon.dm index 41612fb870b..83ff9fcf168 100644 --- a/code/game/machinery/Beacon.dm +++ b/code/game/machinery/Beacon.dm @@ -26,7 +26,8 @@ Beacon.syndicate = syndicate Beacon.area_bypass = area_bypass Beacon.cc_beacon = cc_beacon - hide(T.intact) + if(!istype(T, /turf/simulated/floor/transparent)) + hide(T.intact) /obj/machinery/bluespace_beacon/proc/destroy_beacon() QDEL_NULL(Beacon) diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index c4d5c4984b9..da287020804 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -43,7 +43,7 @@ GLOBAL_LIST_EMPTY(holopads) use_power = IDLE_POWER_USE idle_power_usage = 5 active_power_usage = 100 - layer = TURF_LAYER+0.1 //Preventing mice and drones from sneaking under them. + layer = HOLOPAD_LAYER //Preventing mice and drones from sneaking under them. plane = FLOOR_PLANE max_integrity = 300 armor = list(melee = 50, bullet = 20, laser = 20, energy = 20, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 0) diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index 7bd89ac6dae..a9eb8b4de3c 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -32,7 +32,8 @@ /obj/machinery/magnetic_module/New() ..() var/turf/T = loc - hide(T.intact) + if(!istype(T, /turf/simulated/floor/transparent)) + hide(T.intact) center = T spawn(10) // must wait for map loading to finish diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index 48d87d0f330..ef3d6928aa1 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -26,7 +26,8 @@ set_codes() var/turf/T = loc - hide(T.intact) + if(!istype(T, /turf/simulated/floor/transparent)) + hide(T.intact) if(!codes || !codes.len) log_runtime(EXCEPTION("Empty codes datum at ([x],[y],[z])"), src, list("codes_txt: '[codes_txt]'")) if("patrol" in codes) diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index 5bfe4e8a880..252da89083a 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -368,7 +368,8 @@ GLOBAL_LIST_EMPTY(safes) /obj/structure/safe/floor/Initialize() . = ..() var/turf/T = loc - hide(T.intact) + if(!istype(T, /turf/simulated/floor/transparent)) + hide(T.intact) /obj/structure/safe/floor/hide(intact) invisibility = intact ? INVISIBILITY_MAXIMUM : 0 diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 3ba2e638099..f2eaec50d35 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -30,6 +30,7 @@ GLOBAL_LIST_INIT(icons_to_ignore_at_floor_init, list("damaged1","damaged2","dama var/list/broken_states = list("damaged1", "damaged2", "damaged3", "damaged4", "damaged5") var/list/burnt_states = list("floorscorched1", "floorscorched2") var/list/prying_tool_list = list(TOOL_CROWBAR) //What tool/s can we use to pry up the tile? + var/keep_dir = TRUE var/footstep = FOOTSTEP_FLOOR var/barefootstep = FOOTSTEP_HARD_BAREFOOT @@ -130,6 +131,7 @@ GLOBAL_LIST_INIT(icons_to_ignore_at_floor_init, list("damaged1","damaged2","dama if(keep_icon) W.icon_regular_floor = old_icon W.icon_plating = old_plating + if(W.keep_dir) W.dir = old_dir W.update_icon() diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index 94d95c2af86..27f860e53ad 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -70,6 +70,42 @@ to_chat(user, "This section is too damaged to support a tile! Use a welder to fix the damage.") return TRUE + else if(istype(C, /obj/item/stack/sheet/glass)) + if(broken || burnt) + to_chat(user, "Repair the plating first!") + 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!") + return TRUE + else + to_chat(user, "You begin swapping the plating for glass...") + if(do_after(user, 30 * C.toolspeed, target = src)) + if(R.get_amount() >= 2 && !istype(src, /turf/simulated/floor/transparent/glass)) + ChangeTurf(/turf/simulated/floor/transparent/glass) + playsound(src, C.usesound, 80, 1) + R.use(2) + to_chat(user, "You swap the plating for glass.") + return TRUE + + else if(istype(C, /obj/item/stack/sheet/rglass)) + if(broken || burnt) + to_chat(user, "Repair the plating first!") + 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!") + return TRUE + else + to_chat(user, "You begin swapping the plating for reinforced glass...") + if(do_after(user, 30 * C.toolspeed, target = src)) + if(R.get_amount() >= 2 && !istype(src, /turf/simulated/floor/transparent/glass/reinforced)) + ChangeTurf(/turf/simulated/floor/transparent/glass/reinforced) + playsound(src, C.usesound, 80, 1) + R.use(2) + to_chat(user, "You swap the plating for reinforced glass.") + return TRUE + /turf/simulated/floor/plating/screwdriver_act(mob/user, obj/item/I) . = TRUE if(!I.tool_use_check(user, 0)) diff --git a/code/game/turfs/simulated/floor/transparent.dm b/code/game/turfs/simulated/floor/transparent.dm new file mode 100644 index 00000000000..8e9b6d10e43 --- /dev/null +++ b/code/game/turfs/simulated/floor/transparent.dm @@ -0,0 +1,44 @@ +/turf/simulated/floor/transparent/glass + name = "glass floor" + desc = "Don't jump on it, or do, I'm not your mom." + icon = 'icons/turf/floors/glass.dmi' + icon_state = "unsmooth" + baseturf = /turf/space + broken_states = list("damaged1", "damaged2", "damaged3") + smooth = SMOOTH_MORE + canSmoothWith = list(/turf/simulated/floor/transparent) + footstep = FOOTSTEP_PLATING + light_power = 0.75 + light_range = 2 + layer = TRANSPARENT_TURF_LAYER + keep_dir = FALSE + intact = FALSE + +/turf/simulated/floor/transparent/glass/Initialize(mapload) + . = ..() + var/image/I = image('icons/turf/space.dmi', src, SPACE_ICON_STATE) + I.plane = PLANE_SPACE + underlays += I + dir = 2 + icon_state = "" //Prevents default icon appearing behind the glass + +/turf/simulated/floor/transparent/attackby(obj/item/C as obj, mob/user as mob, params) + if(!C || !user) + return + if(istype(C, /obj/item/crowbar)) + to_chat(user, "You begin removing the glass...") + playsound(src, C.usesound, 80, 1) + if(do_after(user, 30 * C.toolspeed, target = src)) + if(!istype(src, /turf/simulated/floor/transparent)) + return + if(istype(src, /turf/simulated/floor/transparent/glass/reinforced)) + new /obj/item/stack/sheet/rglass(src, 2) + else + new /obj/item/stack/sheet/glass(src, 2) + ChangeTurf(/turf/simulated/floor/plating) + + +/turf/simulated/floor/transparent/glass/reinforced + name = "reinforced glass floor" + desc = "Do jump on it, it can take it. Promise..." + icon = 'icons/turf/floors/reinf_glass.dmi' diff --git a/code/modules/atmospherics/machinery/atmospherics.dm b/code/modules/atmospherics/machinery/atmospherics.dm index 8a77e3908f1..8e965c88685 100644 --- a/code/modules/atmospherics/machinery/atmospherics.dm +++ b/code/modules/atmospherics/machinery/atmospherics.dm @@ -165,6 +165,9 @@ 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)) + to_chat(user, "You must remove the glass first.") + return if(level == 1 && isturf(T) && T.intact) to_chat(user, "You must remove the plating first.") return 1 diff --git a/code/modules/atmospherics/machinery/pipes/cap.dm b/code/modules/atmospherics/machinery/pipes/cap.dm index 516660e72ba..bf3b7f43d2e 100644 --- a/code/modules/atmospherics/machinery/pipes/cap.dm +++ b/code/modules/atmospherics/machinery/pipes/cap.dm @@ -76,7 +76,8 @@ break var/turf/T = get_turf(src) // hide if turf is not intact - if(!istype(T)) return + if(!istype(T) || istype(T, /turf/simulated/floor/transparent)) + 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 ab7196e0864..b28f18f92ba 100644 --- a/code/modules/atmospherics/machinery/pipes/manifold.dm +++ b/code/modules/atmospherics/machinery/pipes/manifold.dm @@ -55,6 +55,8 @@ node3 = target break var/turf/T = src.loc // hide if turf is not intact + if(istype(T, /turf/simulated/floor/transparent)) + 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 0ac16c2c69d..75f2db8aabf 100644 --- a/code/modules/atmospherics/machinery/pipes/manifold4w.dm +++ b/code/modules/atmospherics/machinery/pipes/manifold4w.dm @@ -162,7 +162,8 @@ break var/turf/T = src.loc // hide if turf is not intact - hide(T.intact) + if(!istype(T, /turf/simulated/floor/transparent)) + hide(T.intact) update_icon() /obj/machinery/atmospherics/pipe/manifold4w/visible diff --git a/code/modules/atmospherics/machinery/pipes/simple/pipe_simple.dm b/code/modules/atmospherics/machinery/pipes/simple/pipe_simple.dm index 92c421fbff9..a4ecfc583d9 100644 --- a/code/modules/atmospherics/machinery/pipes/simple/pipe_simple.dm +++ b/code/modules/atmospherics/machinery/pipes/simple/pipe_simple.dm @@ -68,7 +68,8 @@ break var/turf/T = loc // hide if turf is not intact - hide(T.intact) + if(!istype(T, /turf/simulated/floor/transparent)) + hide(T.intact) update_icon() /obj/machinery/atmospherics/pipe/simple/check_pressure(pressure) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 3c8db1f50df..b48c03376cf 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -35,6 +35,7 @@ By design, d1 is the smallest direction and d2 is the highest icon_state = "0-1" var/d1 = 0 var/d2 = 1 + plane = FLOOR_PLANE layer = WIRE_LAYER //Just below unary stuff, which is at 2.45 and above pipes, which are at 2.4 color = COLOR_RED @@ -68,9 +69,11 @@ By design, d1 is the smallest direction and d2 is the highest d2 = text2num(copytext( icon_state, dash+1 )) 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)) + return if(level == 1) hide(T.intact) - LAZYADD(GLOB.cable_list, src) //add it to the global cable list /obj/structure/cable/Destroy() // called when a cable is deleted if(powernet) @@ -162,6 +165,9 @@ 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)) + to_chat(user, "You must remove the glass first.") + return if(T.intact) return @@ -204,6 +210,9 @@ 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)) + to_chat(user, "You must remove the glass first.") + return if(T.intact) return if(!I.use_tool(src, user, 0, volume = I.tool_volume)) diff --git a/code/modules/power/terminal.dm b/code/modules/power/terminal.dm index 584079b3c45..b2284eba265 100644 --- a/code/modules/power/terminal.dm +++ b/code/modules/power/terminal.dm @@ -15,6 +15,8 @@ /obj/machinery/power/terminal/Initialize(mapload) . = ..() var/turf/T = get_turf(src) + if(istype(T, /turf/simulated/floor/transparent)) + return if(level == 1) hide(T.intact) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index adb27fccc82..f259ee40ac1 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -691,6 +691,7 @@ armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 30) damage_deflection = 10 flags_2 = RAD_PROTECT_CONTENTS_2 | RAD_NO_CONTAMINATE_2 + plane = FLOOR_PLANE layer = DISPOSAL_PIPE_LAYER // slightly lower than wires and other pipes var/base_icon_state // initial icon state on map @@ -757,6 +758,9 @@ // 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)) + update_icon() + return hide(T.intact && !istype(T, /turf/space)) // space never hides pipes update_icon() @@ -889,15 +893,20 @@ /obj/structure/disposalpipe/attackby(obj/item/I, mob/user, params) var/turf/T = get_turf(src) - if(T.intact) - return // prevent interaction with T-scanner revealed pipes + if(T.intact || istype(T, /turf/simulated/floor/transparent)) + to_chat(user, "You must remove the plating first.") + return // prevent interaction with T-scanner revealed pipes and pipes under glass add_fingerprint(user) /obj/structure/disposalpipe/welder_act(mob/user, obj/item/I) . = TRUE + var/turf/T = get_turf(src) if(!I.tool_use_check(user, 0)) return + if(istype(T, /turf/simulated/floor/transparent)) + to_chat(user, "You must remove the glass first.") + return WELDER_ATTEMPT_SLICING_MESSAGE if(!I.use_tool(src, user, 30, volume = I.tool_volume)) return diff --git a/icons/turf/floors/glass.dmi b/icons/turf/floors/glass.dmi new file mode 100644 index 00000000000..2f25a8ec7eb Binary files /dev/null and b/icons/turf/floors/glass.dmi differ diff --git a/icons/turf/floors/reinf_glass.dmi b/icons/turf/floors/reinf_glass.dmi new file mode 100644 index 00000000000..f206b4f3dfc Binary files /dev/null and b/icons/turf/floors/reinf_glass.dmi differ diff --git a/paradise.dme b/paradise.dme index 87d2a7b506e..c6bd7461d28 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1130,6 +1130,7 @@ #include "code\game\turfs\simulated\floor\misc_floor.dm" #include "code\game\turfs\simulated\floor\plasteel_floor.dm" #include "code\game\turfs\simulated\floor\plating.dm" +#include "code\game\turfs\simulated\floor\transparent.dm" #include "code\game\turfs\space\space.dm" #include "code\game\turfs\space\transit.dm" #include "code\game\verbs\ooc.dm"