diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index 89cc53b0d42..7acf465b3ed 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -49,7 +49,7 @@ Pipelines + Other Objects -> Pipe network /obj/machinery/atmospherics/proc/add_underlay(var/turf/T, var/obj/machinery/atmospherics/node, var/direction, var/icon_connect_type) if(node) - if(T.intact && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe)) + if(!T.is_plating() && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe)) //underlays += icon_manager.get_atmos_icon("underlay_down", direction, color_cache_name(node)) underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "down" + icon_connect_type) else diff --git a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm index 1899ee9dfdd..4267baf4cd9 100644 --- a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm @@ -69,7 +69,7 @@ if(!istype(T)) return - if(T.intact && node1 && node2 && node1.level == 1 && node2.level == 1 && istype(node1, /obj/machinery/atmospherics/pipe) && istype(node2, /obj/machinery/atmospherics/pipe)) + if(!T.is_plating() && node1 && node2 && node1.level == 1 && node2.level == 1 && istype(node1, /obj/machinery/atmospherics/pipe) && istype(node2, /obj/machinery/atmospherics/pipe)) vent_icon += "h" if(!powered()) @@ -85,7 +85,7 @@ var/turf/T = get_turf(src) if(!istype(T)) return - if(T.intact && node1 && node2 && node1.level == 1 && node2.level == 1 && istype(node1, /obj/machinery/atmospherics/pipe) && istype(node2, /obj/machinery/atmospherics/pipe)) + if(!T.is_plating() && node1 && node2 && node1.level == 1 && node2.level == 1 && istype(node1, /obj/machinery/atmospherics/pipe) && istype(node2, /obj/machinery/atmospherics/pipe)) return else if (node1) diff --git a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm index 17d47ea8cfa..ac7d88301af 100644 --- a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm +++ b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm @@ -189,7 +189,7 @@ var/turf/T = get_turf(src) if(!istype(T)) return - if(T.intact && istype(P.node, /obj/machinery/atmospherics/pipe) && P.node.level == 1 ) + if(!T.is_plating() && istype(P.node, /obj/machinery/atmospherics/pipe) && P.node.level == 1 ) //pipe_state = icon_manager.get_atmos_icon("underlay_down", P.dir, color_cache_name(P.node)) pipe_state = icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "down") else diff --git a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm index ded9948cb2d..79e43a8e1c3 100644 --- a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm +++ b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm @@ -69,7 +69,7 @@ if (!istype(W, /obj/item/weapon/wrench)) return ..() var/turf/T = src.loc - if (level==1 && isturf(T) && T.intact) + if (level==1 && isturf(T) && !T.is_plating()) user << "You must remove the plating first." return 1 var/datum/gas_mixture/int_air = return_air() diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm index a16ba08ffa1..dd0292d3adc 100644 --- a/code/ATMOSPHERICS/components/unary/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm @@ -118,7 +118,7 @@ if(!istype(T)) return - if(T.intact && node && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe)) + if(!T.is_plating() && node && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe)) vent_icon += "h" if(welded) @@ -136,7 +136,7 @@ var/turf/T = get_turf(src) if(!istype(T)) return - if(T.intact && node && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe)) + if(!T.is_plating() && node && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe)) return else if(node) @@ -399,7 +399,7 @@ user << "You cannot unwrench \the [src], turn it off first." return 1 var/turf/T = src.loc - if (node && node.level==1 && isturf(T) && T.intact) + if (node && node.level==1 && isturf(T) && !T.is_plating()) user << "You must remove the plating first." return 1 var/datum/gas_mixture/int_air = return_air() diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm index cfe07ff6723..7d37863a3de 100644 --- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm @@ -72,7 +72,7 @@ var/turf/T = get_turf(src) if(!istype(T)) return - if(T.intact && node && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe)) + if(!T.is_plating() && node && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe)) return else if(node) @@ -261,7 +261,7 @@ user << "You cannot unwrench \the [src], turn it off first." return 1 var/turf/T = src.loc - if (node && node.level==1 && isturf(T) && T.intact) + if (node && node.level==1 && isturf(T) && !T.is_plating()) user << "You must remove the plating first." return 1 var/datum/gas_mixture/int_air = return_air() diff --git a/code/ATMOSPHERICS/mainspipe.dm b/code/ATMOSPHERICS/mainspipe.dm index 54e23ea1a81..520d7a55b2e 100644 --- a/code/ATMOSPHERICS/mainspipe.dm +++ b/code/ATMOSPHERICS/mainspipe.dm @@ -181,7 +181,7 @@ obj/machinery/atmospherics/mains_pipe/simple ..() // initialize internal pipes var/turf/T = src.loc // hide if turf is not intact - hide(T.intact) + if(level == 1 && !T.is_plating()) hide(1) update_icon() hidden @@ -243,7 +243,7 @@ obj/machinery/atmospherics/mains_pipe/manifold ..() // initialize internal pipes var/turf/T = src.loc // hide if turf is not intact - hide(T.intact) + if(level == 1 && !T.is_plating()) hide(1) update_icon() update_icon() @@ -293,7 +293,7 @@ obj/machinery/atmospherics/mains_pipe/manifold4w ..() // initialize internal pipes var/turf/T = src.loc // hide if turf is not intact - hide(T.intact) + if(level == 1 && !T.is_plating()) hide(1) update_icon() update_icon() @@ -354,7 +354,7 @@ obj/machinery/atmospherics/mains_pipe/split N1.merge(N2) var/turf/T = src.loc // hide if turf is not intact - hide(T.intact) + if(level == 1 && !T.is_plating()) hide(1) update_icon() update_icon() @@ -475,7 +475,7 @@ obj/machinery/atmospherics/mains_pipe/split3 N1.merge(N2) var/turf/T = src.loc // hide if turf is not intact - hide(T.intact) + if(level == 1 && !T.is_plating()) hide(1) update_icon() update_icon() @@ -525,7 +525,7 @@ obj/machinery/atmospherics/mains_pipe/cap ..() var/turf/T = src.loc // hide if turf is not intact - hide(T.intact) + if(level == 1 && !T.is_plating()) hide(1) update_icon() hidden diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm index 1477a743529..1a477d8bb42 100644 --- a/code/ATMOSPHERICS/pipes.dm +++ b/code/ATMOSPHERICS/pipes.dm @@ -19,10 +19,9 @@ return -1 /obj/machinery/atmospherics/pipe/New() - ..() - //so pipes under walls are hidden - if(hides_under_flooring() && (istype(get_turf(src), /turf/simulated/wall) || istype(get_turf(src), /turf/simulated/shuttle/wall) || istype(get_turf(src), /turf/unsimulated/wall))) + if(istype(get_turf(src), /turf/simulated/wall) || istype(get_turf(src), /turf/simulated/shuttle/wall) || istype(get_turf(src), /turf/unsimulated/wall)) level = 1 + ..() /obj/machinery/atmospherics/pipe/hides_under_flooring() return level != 2 @@ -83,7 +82,7 @@ if (!istype(W, /obj/item/weapon/wrench)) return ..() var/turf/T = src.loc - if (level==1 && isturf(T) && T.intact) + if (level==1 && isturf(T) && !T.is_plating()) user << "You must remove the plating first." return 1 var/datum/gas_mixture/int_air = return_air() @@ -299,9 +298,8 @@ qdel(src) return - var/turf/T = get_turf(src) - if(istype(T)) - hide(T.intact) + var/turf/T = loc + if(level == 1 && !T.is_plating()) hide(1) update_icon() /obj/machinery/atmospherics/pipe/simple/disconnect(obj/machinery/atmospherics/reference) @@ -584,8 +582,7 @@ return var/turf/T = get_turf(src) - if(istype(T)) - hide(T.intact) + if(level == 1 && !T.is_plating()) hide(1) update_icon() /obj/machinery/atmospherics/pipe/manifold/visible @@ -843,8 +840,7 @@ return var/turf/T = get_turf(src) - if(istype(T)) - hide(T.intact) + if(level == 1 && !T.is_plating()) hide(1) update_icon() /obj/machinery/atmospherics/pipe/manifold4w/visible @@ -999,7 +995,7 @@ break var/turf/T = src.loc // hide if turf is not intact - hide(T.intact) + if(level == 1 && !T.is_plating()) hide(1) update_icon() /obj/machinery/atmospherics/pipe/cap/visible @@ -1388,7 +1384,7 @@ /obj/machinery/atmospherics/proc/add_underlay_adapter(var/turf/T, var/obj/machinery/atmospherics/node, var/direction, var/icon_connect_type) //modified from add_underlay, does not make exposed underlays if(node) - if(T.intact && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe)) + if(!T.is_plating() && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe)) underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "down" + icon_connect_type) else underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "intact" + icon_connect_type) diff --git a/code/TriDimension/Pipes.dm b/code/TriDimension/Pipes.dm index 49957e67e47..2a4771744e4 100644 --- a/code/TriDimension/Pipes.dm +++ b/code/TriDimension/Pipes.dm @@ -149,7 +149,7 @@ obj/machinery/atmospherics/pipe/zpipe/up/initialize() var/turf/T = src.loc // hide if turf is not intact - hide(T.intact) + hide(!T.is_plating()) /////////////////////// // and the down pipe // @@ -190,7 +190,7 @@ obj/machinery/atmospherics/pipe/zpipe/down/initialize() var/turf/T = src.loc // hide if turf is not intact - hide(T.intact) + hide(!T.is_plating()) /////////////////////// // supply/scrubbers // diff --git a/code/TriDimension/Turfs.dm b/code/TriDimension/Turfs.dm index dd6318ebceb..c601e36b992 100644 --- a/code/TriDimension/Turfs.dm +++ b/code/TriDimension/Turfs.dm @@ -1,6 +1,5 @@ /turf/simulated/floor/open name = "open space" - intact = 0 density = 0 icon_state = "black" pathweight = 100000 //Seriously, don't try and path over this one numbnuts diff --git a/code/game/machinery/Beacon.dm b/code/game/machinery/Beacon.dm index 19399ce7392..ac736ddfe29 100644 --- a/code/game/machinery/Beacon.dm +++ b/code/game/machinery/Beacon.dm @@ -18,7 +18,7 @@ Beacon.invisibility = INVISIBILITY_MAXIMUM Beacon.loc = T - hide(T.intact) + hide(!T.is_plating()) Destroy() if(Beacon) diff --git a/code/game/machinery/CableLayer.dm b/code/game/machinery/CableLayer.dm index c3958b10390..b50e605825a 100644 --- a/code/game/machinery/CableLayer.dm +++ b/code/game/machinery/CableLayer.dm @@ -86,7 +86,7 @@ var/turf/simulated/floor/T = new_turf if(!T.is_plating()) T.make_plating(!(T.broken || T.burnt)) - return !new_turf.intact + return new_turf.is_plating() /obj/machinery/cablelayer/proc/layCable(var/turf/new_turf,var/M_Dir) if(!on) diff --git a/code/game/machinery/floorlayer.dm b/code/game/machinery/floorlayer.dm index 9a7c6291ebe..c682a2b228a 100644 --- a/code/game/machinery/floorlayer.dm +++ b/code/game/machinery/floorlayer.dm @@ -81,7 +81,7 @@ var/turf/simulated/floor/T = new_turf if(!T.is_plating()) T.make_plating(!(T.broken || T.burnt)) - return !new_turf.intact + return new_turf.is_plating() /obj/machinery/floorlayer/proc/TakeNewStack() for(var/obj/item/stack/tile/tile in contents) diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index 501d7a0b758..ca044a5a481 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -32,7 +32,7 @@ New() ..() var/turf/T = loc - hide(T.intact) + hide(!T.is_plating()) 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 e8285643ee9..443a7049341 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -29,14 +29,14 @@ var/global/list/navbeacons // no I don't like putting this in, but it will do set_codes() var/turf/T = loc - hide(T.intact) - + hide(!T.is_plating()) + // add beacon to MULE bot beacon list if(freq == 1400) if(!navbeacons) navbeacons = new() navbeacons += src - + spawn(5) // must wait for map loading to finish if(radio_controller) @@ -111,7 +111,7 @@ var/global/list/navbeacons // no I don't like putting this in, but it will do attackby(var/obj/item/I, var/mob/user) var/turf/T = loc - if(T.intact) + if(!T.is_plating()) return // prevent intraction when T-scanner revealed if(istype(I, /obj/item/weapon/screwdriver)) @@ -145,7 +145,7 @@ var/global/list/navbeacons // no I don't like putting this in, but it will do interact(var/mob/user, var/ai = 0) var/turf/T = loc - if(T.intact) + if(!T.is_plating()) return // prevent intraction when T-scanner revealed if(!open && !ai) // can't alter controls if not open, unless you're an AI diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index 2ec9a81f0ab..3a08a681d26 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -461,7 +461,7 @@ Buildable meters P.set_dir(src.dir) P.initialize_directions = pipe_dir var/turf/T = P.loc - P.level = T.intact ? 2 : 1 + P.level = !T.is_plating() ? 2 : 1 P.initialize() if (deleted(P)) usr << pipefailtext @@ -480,7 +480,7 @@ Buildable meters P.set_dir(src.dir) P.initialize_directions = pipe_dir var/turf/T = P.loc - P.level = T.intact ? 2 : 1 + P.level = !T.is_plating() ? 2 : 1 P.initialize() if (deleted(P)) usr << pipefailtext @@ -499,7 +499,7 @@ Buildable meters P.set_dir(src.dir) P.initialize_directions = pipe_dir var/turf/T = P.loc - P.level = T.intact ? 2 : 1 + P.level = !T.is_plating() ? 2 : 1 P.initialize() if (deleted(P)) usr << pipefailtext @@ -518,7 +518,7 @@ Buildable meters P.set_dir(src.dir) P.initialize_directions = pipe_dir var/turf/T = P.loc - P.level = T.intact ? 2 : 1 + P.level = !T.is_plating() ? 2 : 1 P.initialize() if (deleted(P)) usr << pipefailtext @@ -536,8 +536,6 @@ Buildable meters P.set_dir(src.dir) P.initialize_directions = pipe_dir //this var it's used to know if the pipe is bent or not P.initialize_directions_he = pipe_dir - //var/turf/T = P.loc - //P.level = T.intact ? 2 : 1 P.initialize() if (deleted(P)) usr << pipefailtext @@ -557,7 +555,7 @@ Buildable meters if (pipename) C.name = pipename var/turf/T = C.loc - C.level = T.intact ? 2 : 1 + C.level = !T.is_plating() ? 2 : 1 C.initialize() C.build_network() if (C.node) @@ -572,7 +570,7 @@ Buildable meters M.initialize_directions = pipe_dir //M.New() var/turf/T = M.loc - M.level = T.intact ? 2 : 1 + M.level = !T.is_plating() ? 2 : 1 M.initialize() if (deleted(M)) usr << pipefailtext @@ -595,7 +593,7 @@ Buildable meters M.initialize_directions = pipe_dir //M.New() var/turf/T = M.loc - M.level = T.intact ? 2 : 1 + M.level = !T.is_plating() ? 2 : 1 M.initialize() if (!M) usr << "There's nothing to connect this manifold to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)" @@ -618,7 +616,7 @@ Buildable meters M.initialize_directions = pipe_dir //M.New() var/turf/T = M.loc - M.level = T.intact ? 2 : 1 + M.level = !T.is_plating() ? 2 : 1 M.initialize() if (!M) usr << "There's nothing to connect this manifold to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)" @@ -641,7 +639,7 @@ Buildable meters M.initialize_directions = pipe_dir //M.New() var/turf/T = M.loc - M.level = T.intact ? 2 : 1 + M.level = !T.is_plating() ? 2 : 1 M.initialize() if (deleted(M)) usr << pipefailtext @@ -668,7 +666,7 @@ Buildable meters M.connect_types = src.connect_types //M.New() var/turf/T = M.loc - M.level = T.intact ? 2 : 1 + M.level = !T.is_plating() ? 2 : 1 M.initialize() if (!M) usr << "There's nothing to connect this manifold to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)" @@ -695,7 +693,7 @@ Buildable meters M.connect_types = src.connect_types //M.New() var/turf/T = M.loc - M.level = T.intact ? 2 : 1 + M.level = !T.is_plating() ? 2 : 1 M.initialize() if (!M) usr << "There's nothing to connect this manifold to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)" @@ -719,8 +717,6 @@ Buildable meters P.set_dir(src.dir) P.initialize_directions = src.get_pdir() P.initialize_directions_he = src.get_hdir() - //var/turf/T = P.loc - //P.level = T.intact ? 2 : 1 P.initialize() if (deleted(P)) usr << pipefailtext //"There's nothing to connect this pipe to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)" @@ -740,7 +736,7 @@ Buildable meters if (pipename) V.name = pipename var/turf/T = V.loc - V.level = T.intact ? 2 : 1 + V.level = !T.is_plating() ? 2 : 1 V.initialize() V.build_network() if (V.node) @@ -755,7 +751,7 @@ Buildable meters if (pipename) V.name = pipename var/turf/T = V.loc - V.level = T.intact ? 2 : 1 + V.level = !T.is_plating() ? 2 : 1 V.initialize() V.build_network() if (V.node1) @@ -774,7 +770,7 @@ Buildable meters if (pipename) P.name = pipename var/turf/T = P.loc - P.level = T.intact ? 2 : 1 + P.level = !T.is_plating() ? 2 : 1 P.initialize() P.build_network() if (P.node1) @@ -791,7 +787,7 @@ Buildable meters if (pipename) P.name = pipename var/turf/T = P.loc - P.level = T.intact ? 2 : 1 + P.level = !T.is_plating() ? 2 : 1 P.initialize() P.build_network() if (P.node1) @@ -811,7 +807,7 @@ Buildable meters if (pipename) P.name = pipename var/turf/T = P.loc - P.level = T.intact ? 2 : 1 + P.level = !T.is_plating() ? 2 : 1 P.initialize() P.build_network() if (P.node1) @@ -831,7 +827,7 @@ Buildable meters if (pipename) P.name = pipename var/turf/T = P.loc - P.level = T.intact ? 2 : 1 + P.level = !T.is_plating() ? 2 : 1 P.initialize() P.build_network() if (P.node1) @@ -851,7 +847,7 @@ Buildable meters if (pipename) P.name = pipename var/turf/T = P.loc - P.level = T.intact ? 2 : 1 + P.level = !T.is_plating() ? 2 : 1 P.initialize() P.build_network() if (P.node1) @@ -871,7 +867,7 @@ Buildable meters if (pipename) P.name = pipename var/turf/T = P.loc - P.level = T.intact ? 2 : 1 + P.level = !T.is_plating() ? 2 : 1 P.initialize() P.build_network() if (P.node1) @@ -891,7 +887,7 @@ Buildable meters if (pipename) S.name = pipename var/turf/T = S.loc - S.level = T.intact ? 2 : 1 + S.level = !T.is_plating() ? 2 : 1 S.initialize() S.build_network() if (S.node) @@ -903,7 +899,7 @@ Buildable meters P.set_dir(src.dir) P.initialize_directions = pipe_dir var/turf/T = P.loc - P.level = T.intact ? 2 : 1 + P.level = !T.is_plating() ? 2 : 1 P.initialize() if (deleted(P)) usr << pipefailtext @@ -923,7 +919,7 @@ Buildable meters if (pipename) V.name = pipename var/turf/T = V.loc - V.level = T.intact ? 2 : 1 + V.level = !T.is_plating() ? 2 : 1 V.initialize() V.build_network() if (V.node1) @@ -943,7 +939,7 @@ Buildable meters if (pipename) V.name = pipename var/turf/T = V.loc - V.level = T.intact ? 2 : 1 + V.level = !T.is_plating() ? 2 : 1 V.initialize() V.build_network() if (V.node1) @@ -993,7 +989,7 @@ Buildable meters if (pipename) P.name = pipename var/turf/T = P.loc - P.level = T.intact ? 2 : 1 + P.level = !T.is_plating() ? 2 : 1 P.initialize() P.build_network() if (P.node1) @@ -1010,7 +1006,7 @@ Buildable meters if (pipename) P.name = pipename var/turf/T = P.loc - P.level = T.intact ? 2 : 1 + P.level = !T.is_plating() ? 2 : 1 P.initialize() P.build_network() if (P.node1) @@ -1027,7 +1023,7 @@ Buildable meters if (pipename) C.name = pipename var/turf/T = C.loc - C.level = T.intact ? 2 : 1 + C.level = !T.is_plating() ? 2 : 1 C.initialize() C.build_network() if (C.node) @@ -1041,7 +1037,7 @@ Buildable meters if (pipename) P.name = pipename var/turf/T = P.loc - P.level = T.intact ? 2 : 1 + P.level = !T.is_plating() ? 2 : 1 P.initialize() P.build_network() if (P.node1) @@ -1057,7 +1053,7 @@ Buildable meters if (pipename) P.name = pipename var/turf/T = P.loc - P.level = T.intact ? 2 : 1 + P.level = !T.is_plating() ? 2 : 1 P.initialize() P.build_network() if (P.node1) @@ -1073,7 +1069,7 @@ Buildable meters if (pipename) P.name = pipename var/turf/T = P.loc - P.level = T.intact ? 2 : 1 + P.level = !T.is_plating() ? 2 : 1 P.initialize() P.build_network() if (P.node1) @@ -1089,7 +1085,7 @@ Buildable meters if (pipename) P.name = pipename var/turf/T = P.loc - P.level = T.intact ? 2 : 1 + P.level = !T.is_plating() ? 2 : 1 P.initialize() P.build_network() if (P.node1) @@ -1105,7 +1101,7 @@ Buildable meters if (pipename) P.name = pipename var/turf/T = P.loc - P.level = T.intact ? 2 : 1 + P.level = !T.is_plating() ? 2 : 1 P.initialize() P.build_network() if (P.node1) @@ -1121,7 +1117,7 @@ Buildable meters if (pipename) P.name = pipename var/turf/T = P.loc - P.level = T.intact ? 2 : 1 + P.level = !T.is_plating() ? 2 : 1 P.initialize() P.build_network() if (P.node1) @@ -1134,13 +1130,13 @@ Buildable meters if(PIPE_OMNI_MIXER) var/obj/machinery/atmospherics/omni/mixer/P = new(loc) var/turf/T = P.loc - P.level = T.intact ? 2 : 1 + P.level = !T.is_plating() ? 2 : 1 P.initialize() P.build_network() if(PIPE_OMNI_FILTER) var/obj/machinery/atmospherics/omni/filter/P = new(loc) var/turf/T = P.loc - P.level = T.intact ? 2 : 1 + P.level = !T.is_plating() ? 2 : 1 P.initialize() P.build_network() diff --git a/code/game/machinery/pipe/pipelayer.dm b/code/game/machinery/pipe/pipelayer.dm index 62570b2c849..0de61b4685f 100644 --- a/code/game/machinery/pipe/pipelayer.dm +++ b/code/game/machinery/pipe/pipelayer.dm @@ -111,7 +111,7 @@ var/turf/simulated/floor/T = new_turf if(!T.is_plating()) T.make_plating(!(T.broken || T.burnt)) - return !new_turf.intact + return new_turf.is_plating() /obj/machinery/pipelayer/proc/layPipe(var/turf/w_turf,var/M_Dir,var/old_dir) if(!on || !(M_Dir in list(1, 2, 4, 8)) || M_Dir==old_dir) diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index 0987d9b3f5b..498a9dfff6e 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -334,7 +334,7 @@ var/turf/simulated/floor/T = new_turf if(!T.is_plating()) T.make_plating(!(T.broken || T.burnt)) - return !new_turf.intact + return new_turf.is_plating() proc/layCable(var/turf/new_turf) if(equip_ready || !istype(new_turf) || !dismantleFloor(new_turf)) diff --git a/code/game/objects/items/devices/pipe_painter.dm b/code/game/objects/items/devices/pipe_painter.dm index f3e3256fedb..ccba1fc168b 100644 --- a/code/game/objects/items/devices/pipe_painter.dm +++ b/code/game/objects/items/devices/pipe_painter.dm @@ -16,16 +16,11 @@ /obj/item/device/pipe_painter/afterattack(atom/A, mob/user as mob, proximity) if(!proximity) return - + if(!istype(A,/obj/machinery/atmospherics/pipe) || istype(A,/obj/machinery/atmospherics/pipe/tank) || istype(A,/obj/machinery/atmospherics/pipe/vent) || istype(A,/obj/machinery/atmospherics/pipe/simple/heat_exchanging) || istype(A,/obj/machinery/atmospherics/pipe/simple/insulated) || !in_range(user, A)) return var/obj/machinery/atmospherics/pipe/P = A - var/turf/T = P.loc - if (P.level < 2 && T.level==1 && isturf(T) && T.intact) - user << "You must remove the plating first." - return - P.change_color(pipe_colors[mode]) /obj/item/device/pipe_painter/attack_self(mob/user as mob) diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm index ad40ecc724c..a7210721c82 100644 --- a/code/game/objects/items/devices/powersink.dm +++ b/code/game/objects/items/devices/powersink.dm @@ -22,7 +22,7 @@ var/mode = 0 // 0 = off, 1=clamped (off), 2=operating var/drained_this_tick = 0 // This is unfortunately necessary to ensure we process powersinks BEFORE other machinery such as APCs. - var/datum/powernet/PN // Our powernet + var/datum/powernet/PN // Our powernet var/obj/structure/cable/attached // the attached cable /obj/item/device/powersink/Destroy() @@ -34,7 +34,7 @@ if(istype(I, /obj/item/weapon/screwdriver)) if(mode == 0) var/turf/T = loc - if(isturf(T) && !T.intact) + if(isturf(T) && !!T.is_plating()) attached = locate() in T if(!attached) user << "No exposed cable here to attach to." diff --git a/code/game/objects/items/devices/t_scanner.dm b/code/game/objects/items/devices/t_scanner.dm index 02ba952621e..3bd706f11eb 100644 --- a/code/game/objects/items/devices/t_scanner.dm +++ b/code/game/objects/items/devices/t_scanner.dm @@ -61,10 +61,10 @@ user_client.images += overlay //Remove stale overlays - for(var/obj/O in update_remove) + for(var/obj/O in update_remove) user_client.images -= active_scanned[O] active_scanned -= O - + //Flicker effect for(var/obj/O in active_scanned) var/image/overlay = active_scanned[O] @@ -76,19 +76,19 @@ //creates a new overlay for a scanned object /obj/item/device/t_scanner/proc/get_overlay(obj/scanned) - //Use a cache so we don't create a whole bunch of new images just because someone's walking back and forth in a room. + //Use a cache so we don't create a whole bunch of new images just because someone's walking back and forth in a room. //Also means that images are reused if multiple people are using t-rays to look at the same objects. if(scanned in overlay_cache) . = overlay_cache[scanned] else var/image/I = image(loc = scanned, icon = scanned.icon, icon_state = scanned.icon_state, layer = HUD_LAYER) - + //Pipes are special if(istype(scanned, /obj/machinery/atmospherics/pipe)) var/obj/machinery/atmospherics/pipe/P = scanned I.color = P.pipe_color I.overlays += P.overlays - + I.alpha = 128 I.mouse_opacity = 0 . = I @@ -100,12 +100,12 @@ /obj/item/device/t_scanner/proc/get_scanned_objects(var/scan_dist) . = list() - + var/turf/center = get_turf(src.loc) if(!center) return - + for(var/turf/T in range(scan_range, center)) - if(!T.intact) + if(!!T.is_plating()) continue for(var/obj/O in T.contents) diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index fe6006aae4d..e0923119b01 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -175,12 +175,12 @@ obj/structure/safe/ex_act(severity) level = 1 //underfloor layer = 2.5 - /obj/structure/safe/floor/initialize() ..() var/turf/T = loc - hide(T.intact) - + if(istype(T) && !T.is_plating()) + hide(1) + update_icon() /obj/structure/safe/floor/hide(var/intact) invisibility = intact ? 101 : 0 diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index dfa6691b4d6..44c52d392ca 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -40,11 +40,9 @@ /turf/simulated/floor/proc/set_flooring(var/decl/flooring/newflooring) make_plating(defer_icon_update = 1) flooring = newflooring - intact = 1 update_icon(1) levelupdate() - //This proc will set floor_type to null and the update_icon() proc will then change the icon_state of the turf //This proc auto corrects the grass tiles' siding. /turf/simulated/floor/proc/make_plating(var/place_product, var/defer_icon_update) @@ -63,10 +61,8 @@ if(flooring.build_type && place_product) new flooring.build_type(src) flooring = null - intact = 0 set_light(0) - intact = 0 broken = null burnt = null flooring_override = null diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 39caa634f5a..f1e6d177684 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -1,7 +1,6 @@ /turf icon = 'icons/turf/floors.dmi' level = 1 - var/intact var/holy = 0 // Initial air contents (in moles) @@ -44,6 +43,9 @@ /turf/proc/is_space() return 0 +/turf/proc/is_intact() + return 0 + /turf/attack_hand(mob/user) if(!(user.canmove) || user.restrained() || !(user.pulling)) return 0 @@ -160,7 +162,7 @@ var/const/enterloopsanity = 100 /turf/proc/levelupdate() for(var/obj/O in src) - O.hide(O.hides_under_flooring() && src.intact) + O.hide(O.hides_under_flooring() && !is_plating()) /turf/proc/AdjacentTurfs() var/L[] = new() diff --git a/code/game/turfs/unsimulated.dm b/code/game/turfs/unsimulated.dm index 178b69b2868..bd85fe8be81 100644 --- a/code/game/turfs/unsimulated.dm +++ b/code/game/turfs/unsimulated.dm @@ -1,5 +1,4 @@ /turf/unsimulated - intact = 1 name = "command" oxygen = MOLES_O2STANDARD nitrogen = MOLES_N2STANDARD \ No newline at end of file diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index c1a42eeb8af..9f6d1e13838 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -505,7 +505,8 @@ else user << "Access denied." else if (istype(W, /obj/item/stack/cable_coil) && !terminal && opened && has_electronics!=2) - if (src.loc:intact) + var/turf/T = loc + if(istype(T) && !T.is_plating()) user << "You must remove the floor plating in front of the APC first." return var/obj/item/stack/cable_coil/C = W @@ -517,7 +518,6 @@ playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) if(do_after(user, 20)) if (C.amount >= 10 && !terminal && opened && has_electronics != 2) - var/turf/T = get_turf(src) var/obj/structure/cable/N = T.get_cable_node() if (prob(50) && electrocute_mob(usr, N, N)) var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread @@ -532,7 +532,8 @@ make_terminal() terminal.connect_to_network() else if (istype(W, /obj/item/weapon/wirecutters) && terminal && opened && has_electronics!=2) - if (src.loc:intact) + var/turf/T = loc + if(istype(T) && !T.is_plating()) user << "You must remove the floor plating in front of the APC first." return user.visible_message("[user.name] dismantles the power terminal from [src].", \ diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 6e88f86b6b4..9fcfd2e8d2d 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -70,7 +70,6 @@ By design, d1 is the smallest direction and d2 is the highest /obj/structure/cable/New() ..() - // ensure d1 & d2 reflect the icon_state for entering and exiting cable var/dash = findtext(icon_state, "-") @@ -80,7 +79,7 @@ By design, d1 is the smallest direction and d2 is the highest d2 = text2num( copytext( icon_state, dash+1 ) ) var/turf/T = src.loc // hide if turf is not intact - if(level==1) hide(T.intact) + if(level==1) hide(!T.is_plating()) cable_list += src //add it to the global cable list @@ -123,7 +122,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 = src.loc - if(T.intact) + if(!T.is_plating()) return if(istype(W, /obj/item/weapon/wirecutters)) @@ -655,7 +654,7 @@ obj/structure/cable/proc/cableColor(var/colorC) user << "You can't lay cable at a place that far away." return - if(F.intact) // Ff floor is intact, complain + if(!F.is_plating()) // Ff floor is intact, complain user << "You can't lay cable there unless the floor tiles are removed." return @@ -750,7 +749,7 @@ obj/structure/cable/proc/cableColor(var/colorC) var/turf/T = C.loc - if(!isturf(T) || T.intact) // sanity checks, also stop use interacting with T-scanner revealed cable + if(!isturf(T) || !T.is_plating()) // sanity checks, also stop use interacting with T-scanner revealed cable return if(get_dist(C, user) > 1) // make sure it's close enough @@ -766,7 +765,7 @@ obj/structure/cable/proc/cableColor(var/colorC) // one end of the clicked cable is pointing towards us if(C.d1 == dirn || C.d2 == dirn) - if(U.intact) // can't place a cable if the floor is complete + if(!U.is_plating()) // can't place a cable if the floor is complete user << "You can't lay cable there unless the floor tiles are removed." return else diff --git a/code/modules/power/cable_heavyduty.dm b/code/modules/power/cable_heavyduty.dm index 36bd4f93eb7..67eb09bb1a7 100644 --- a/code/modules/power/cable_heavyduty.dm +++ b/code/modules/power/cable_heavyduty.dm @@ -12,7 +12,7 @@ /obj/structure/cable/heavyduty/attackby(obj/item/W, mob/user) var/turf/T = src.loc - if(T.intact) + if(!T.is_plating()) return if(istype(W, /obj/item/weapon/wirecutters)) diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index 7d51af8e352..540e5a33675 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -126,7 +126,7 @@ var/turf/T = user.loc - if(T.intact || !istype(T, /turf/simulated/floor)) + if(!T.is_plating() || !istype(T, /turf/simulated/floor)) return if(get_dist(src, user) > 1) diff --git a/code/modules/power/singularity/act.dm b/code/modules/power/singularity/act.dm index 0114269a761..01e74305412 100644 --- a/code/modules/power/singularity/act.dm +++ b/code/modules/power/singularity/act.dm @@ -101,7 +101,7 @@ return 1000 /turf/singularity_act(S, current_size) - if(intact) + if(!is_plating()) for(var/obj/O in contents) if(O.level != 1) continue diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 5ce02cf18da..e47925c3356 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -204,7 +204,7 @@ user << "You can't build a terminal on space." return 1 else if (istype(tempLoc)) - if(tempLoc.intact) + if(!tempLoc.is_plating()) user << "You must remove the floor plating first." return 1 user << "You start adding cable to the [src]." @@ -272,7 +272,7 @@ building_terminal = 1 var/turf/tempTDir = terminal.loc if (istype(tempTDir)) - if(tempTDir.intact) + if(!tempTDir.is_plating()) user << "You must remove the floor plating first." else user << "You begin to cut the cables..." diff --git a/code/modules/power/terminal.dm b/code/modules/power/terminal.dm index 7c07d4778fe..140c296ae0a 100644 --- a/code/modules/power/terminal.dm +++ b/code/modules/power/terminal.dm @@ -17,7 +17,7 @@ /obj/machinery/power/terminal/New() ..() var/turf/T = src.loc - if(level==1) hide(T.intact) + if(level==1) hide(!T.is_plating()) return /obj/machinery/power/terminal/Destroy() diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm index 3ee774e0123..b2760755836 100644 --- a/code/modules/recycling/disposal-construction.dm +++ b/code/modules/recycling/disposal-construction.dm @@ -219,7 +219,7 @@ ispipe = 1 var/turf/T = src.loc - if(T.intact) + if(!T.is_plating()) user << "You can only attach the [nicetype] if the floor plating is removed." return diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 88148916104..dcf58713e61 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -713,7 +713,7 @@ // update the icon_state to reflect hidden status proc/update() var/turf/T = src.loc - hide(T.intact && !istype(T,/turf/space)) // space never hides pipes + hide(!T.is_plating() && !istype(T,/turf/space)) // space never hides pipes // hide called by levelupdate if turf intact status changes // change visibility status and force update of icon @@ -746,14 +746,10 @@ H.active = 0 H.loc = src return - if(T.intact && istype(T,/turf/simulated/floor)) //intact floor, pop the tile + if(!T.is_plating() && istype(T,/turf/simulated/floor)) //intact floor, pop the tile var/turf/simulated/floor/F = T - //F.health = 100 - F.burnt = 1 - F.intact = 0 - F.levelupdate() + F.break_tile() new /obj/item/stack/tile(H) // add to holder so it will be thrown with other stuff - F.icon_state = "Floor[F.burnt ? "1" : ""]" if(direction) // direction is specified if(istype(T, /turf/space)) // if ended in space, then range is unlimited @@ -856,7 +852,7 @@ attackby(var/obj/item/I, var/mob/user) var/turf/T = src.loc - if(T.intact) + if(!T.is_plating()) return // prevent interaction with T-scanner revealed pipes src.add_fingerprint(user) if(istype(I, /obj/item/weapon/weldingtool)) @@ -1339,7 +1335,7 @@ return var/turf/T = src.loc - if(T.intact) + if(!T.is_plating()) return // prevent interaction with T-scanner revealed pipes src.add_fingerprint(user) if(istype(I, /obj/item/weapon/weldingtool))