Removed intact var in favour of is_plating() proc, fixed issues with invisible initialized pipes.

This commit is contained in:
Zuhayr
2015-08-16 17:51:19 -07:00
parent 23e9c7d4c9
commit 3b712adb5f
34 changed files with 111 additions and 132 deletions

View File

@@ -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) /obj/machinery/atmospherics/proc/add_underlay(var/turf/T, var/obj/machinery/atmospherics/node, var/direction, var/icon_connect_type)
if(node) 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_down", direction, color_cache_name(node))
underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "down" + icon_connect_type) underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "down" + icon_connect_type)
else else

View File

@@ -69,7 +69,7 @@
if(!istype(T)) if(!istype(T))
return 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" vent_icon += "h"
if(!powered()) if(!powered())
@@ -85,7 +85,7 @@
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
if(!istype(T)) if(!istype(T))
return 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 return
else else
if (node1) if (node1)

View File

@@ -189,7 +189,7 @@
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
if(!istype(T)) if(!istype(T))
return 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_down", P.dir, color_cache_name(P.node))
pipe_state = icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "down") pipe_state = icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "down")
else else

View File

@@ -69,7 +69,7 @@
if (!istype(W, /obj/item/weapon/wrench)) if (!istype(W, /obj/item/weapon/wrench))
return ..() return ..()
var/turf/T = src.loc var/turf/T = src.loc
if (level==1 && isturf(T) && T.intact) if (level==1 && isturf(T) && !T.is_plating())
user << "<span class='warning'>You must remove the plating first.</span>" user << "<span class='warning'>You must remove the plating first.</span>"
return 1 return 1
var/datum/gas_mixture/int_air = return_air() var/datum/gas_mixture/int_air = return_air()

View File

@@ -118,7 +118,7 @@
if(!istype(T)) if(!istype(T))
return 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" vent_icon += "h"
if(welded) if(welded)
@@ -136,7 +136,7 @@
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
if(!istype(T)) if(!istype(T))
return 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 return
else else
if(node) if(node)
@@ -399,7 +399,7 @@
user << "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>" user << "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>"
return 1 return 1
var/turf/T = src.loc 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 << "<span class='warning'>You must remove the plating first.</span>" user << "<span class='warning'>You must remove the plating first.</span>"
return 1 return 1
var/datum/gas_mixture/int_air = return_air() var/datum/gas_mixture/int_air = return_air()

View File

@@ -72,7 +72,7 @@
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
if(!istype(T)) if(!istype(T))
return 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 return
else else
if(node) if(node)
@@ -261,7 +261,7 @@
user << "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>" user << "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>"
return 1 return 1
var/turf/T = src.loc 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 << "<span class='warning'>You must remove the plating first.</span>" user << "<span class='warning'>You must remove the plating first.</span>"
return 1 return 1
var/datum/gas_mixture/int_air = return_air() var/datum/gas_mixture/int_air = return_air()

View File

@@ -181,7 +181,7 @@ obj/machinery/atmospherics/mains_pipe/simple
..() // initialize internal pipes ..() // initialize internal pipes
var/turf/T = src.loc // hide if turf is not intact 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()
hidden hidden
@@ -243,7 +243,7 @@ obj/machinery/atmospherics/mains_pipe/manifold
..() // initialize internal pipes ..() // initialize internal pipes
var/turf/T = src.loc // hide if turf is not intact 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()
update_icon() update_icon()
@@ -293,7 +293,7 @@ obj/machinery/atmospherics/mains_pipe/manifold4w
..() // initialize internal pipes ..() // initialize internal pipes
var/turf/T = src.loc // hide if turf is not intact 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()
update_icon() update_icon()
@@ -354,7 +354,7 @@ obj/machinery/atmospherics/mains_pipe/split
N1.merge(N2) N1.merge(N2)
var/turf/T = src.loc // hide if turf is not intact 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()
update_icon() update_icon()
@@ -475,7 +475,7 @@ obj/machinery/atmospherics/mains_pipe/split3
N1.merge(N2) N1.merge(N2)
var/turf/T = src.loc // hide if turf is not intact 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()
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 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()
hidden hidden

View File

@@ -19,10 +19,9 @@
return -1 return -1
/obj/machinery/atmospherics/pipe/New() /obj/machinery/atmospherics/pipe/New()
..() if(istype(get_turf(src), /turf/simulated/wall) || istype(get_turf(src), /turf/simulated/shuttle/wall) || istype(get_turf(src), /turf/unsimulated/wall))
//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)))
level = 1 level = 1
..()
/obj/machinery/atmospherics/pipe/hides_under_flooring() /obj/machinery/atmospherics/pipe/hides_under_flooring()
return level != 2 return level != 2
@@ -83,7 +82,7 @@
if (!istype(W, /obj/item/weapon/wrench)) if (!istype(W, /obj/item/weapon/wrench))
return ..() return ..()
var/turf/T = src.loc var/turf/T = src.loc
if (level==1 && isturf(T) && T.intact) if (level==1 && isturf(T) && !T.is_plating())
user << "<span class='warning'>You must remove the plating first.</span>" user << "<span class='warning'>You must remove the plating first.</span>"
return 1 return 1
var/datum/gas_mixture/int_air = return_air() var/datum/gas_mixture/int_air = return_air()
@@ -299,9 +298,8 @@
qdel(src) qdel(src)
return return
var/turf/T = get_turf(src) var/turf/T = loc
if(istype(T)) if(level == 1 && !T.is_plating()) hide(1)
hide(T.intact)
update_icon() update_icon()
/obj/machinery/atmospherics/pipe/simple/disconnect(obj/machinery/atmospherics/reference) /obj/machinery/atmospherics/pipe/simple/disconnect(obj/machinery/atmospherics/reference)
@@ -584,8 +582,7 @@
return return
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
if(istype(T)) if(level == 1 && !T.is_plating()) hide(1)
hide(T.intact)
update_icon() update_icon()
/obj/machinery/atmospherics/pipe/manifold/visible /obj/machinery/atmospherics/pipe/manifold/visible
@@ -843,8 +840,7 @@
return return
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
if(istype(T)) if(level == 1 && !T.is_plating()) hide(1)
hide(T.intact)
update_icon() update_icon()
/obj/machinery/atmospherics/pipe/manifold4w/visible /obj/machinery/atmospherics/pipe/manifold4w/visible
@@ -999,7 +995,7 @@
break break
var/turf/T = src.loc // hide if turf is not intact 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()
/obj/machinery/atmospherics/pipe/cap/visible /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 /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(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) underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "down" + icon_connect_type)
else else
underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "intact" + icon_connect_type) underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "intact" + icon_connect_type)

View File

@@ -149,7 +149,7 @@ obj/machinery/atmospherics/pipe/zpipe/up/initialize()
var/turf/T = src.loc // hide if turf is not intact var/turf/T = src.loc // hide if turf is not intact
hide(T.intact) hide(!T.is_plating())
/////////////////////// ///////////////////////
// and the down pipe // // 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 var/turf/T = src.loc // hide if turf is not intact
hide(T.intact) hide(!T.is_plating())
/////////////////////// ///////////////////////
// supply/scrubbers // // supply/scrubbers //

View File

@@ -1,6 +1,5 @@
/turf/simulated/floor/open /turf/simulated/floor/open
name = "open space" name = "open space"
intact = 0
density = 0 density = 0
icon_state = "black" icon_state = "black"
pathweight = 100000 //Seriously, don't try and path over this one numbnuts pathweight = 100000 //Seriously, don't try and path over this one numbnuts

View File

@@ -18,7 +18,7 @@
Beacon.invisibility = INVISIBILITY_MAXIMUM Beacon.invisibility = INVISIBILITY_MAXIMUM
Beacon.loc = T Beacon.loc = T
hide(T.intact) hide(!T.is_plating())
Destroy() Destroy()
if(Beacon) if(Beacon)

View File

@@ -86,7 +86,7 @@
var/turf/simulated/floor/T = new_turf var/turf/simulated/floor/T = new_turf
if(!T.is_plating()) if(!T.is_plating())
T.make_plating(!(T.broken || T.burnt)) 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) /obj/machinery/cablelayer/proc/layCable(var/turf/new_turf,var/M_Dir)
if(!on) if(!on)

View File

@@ -81,7 +81,7 @@
var/turf/simulated/floor/T = new_turf var/turf/simulated/floor/T = new_turf
if(!T.is_plating()) if(!T.is_plating())
T.make_plating(!(T.broken || T.burnt)) T.make_plating(!(T.broken || T.burnt))
return !new_turf.intact return new_turf.is_plating()
/obj/machinery/floorlayer/proc/TakeNewStack() /obj/machinery/floorlayer/proc/TakeNewStack()
for(var/obj/item/stack/tile/tile in contents) for(var/obj/item/stack/tile/tile in contents)

View File

@@ -32,7 +32,7 @@
New() New()
..() ..()
var/turf/T = loc var/turf/T = loc
hide(T.intact) hide(!T.is_plating())
center = T center = T
spawn(10) // must wait for map loading to finish spawn(10) // must wait for map loading to finish

View File

@@ -29,14 +29,14 @@ var/global/list/navbeacons // no I don't like putting this in, but it will do
set_codes() set_codes()
var/turf/T = loc var/turf/T = loc
hide(T.intact) hide(!T.is_plating())
// add beacon to MULE bot beacon list // add beacon to MULE bot beacon list
if(freq == 1400) if(freq == 1400)
if(!navbeacons) if(!navbeacons)
navbeacons = new() navbeacons = new()
navbeacons += src navbeacons += src
spawn(5) // must wait for map loading to finish spawn(5) // must wait for map loading to finish
if(radio_controller) 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) attackby(var/obj/item/I, var/mob/user)
var/turf/T = loc var/turf/T = loc
if(T.intact) if(!T.is_plating())
return // prevent intraction when T-scanner revealed return // prevent intraction when T-scanner revealed
if(istype(I, /obj/item/weapon/screwdriver)) 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) interact(var/mob/user, var/ai = 0)
var/turf/T = loc var/turf/T = loc
if(T.intact) if(!T.is_plating())
return // prevent intraction when T-scanner revealed return // prevent intraction when T-scanner revealed
if(!open && !ai) // can't alter controls if not open, unless you're an AI if(!open && !ai) // can't alter controls if not open, unless you're an AI

View File

@@ -461,7 +461,7 @@ Buildable meters
P.set_dir(src.dir) P.set_dir(src.dir)
P.initialize_directions = pipe_dir P.initialize_directions = pipe_dir
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = !T.is_plating() ? 2 : 1
P.initialize() P.initialize()
if (deleted(P)) if (deleted(P))
usr << pipefailtext usr << pipefailtext
@@ -480,7 +480,7 @@ Buildable meters
P.set_dir(src.dir) P.set_dir(src.dir)
P.initialize_directions = pipe_dir P.initialize_directions = pipe_dir
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = !T.is_plating() ? 2 : 1
P.initialize() P.initialize()
if (deleted(P)) if (deleted(P))
usr << pipefailtext usr << pipefailtext
@@ -499,7 +499,7 @@ Buildable meters
P.set_dir(src.dir) P.set_dir(src.dir)
P.initialize_directions = pipe_dir P.initialize_directions = pipe_dir
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = !T.is_plating() ? 2 : 1
P.initialize() P.initialize()
if (deleted(P)) if (deleted(P))
usr << pipefailtext usr << pipefailtext
@@ -518,7 +518,7 @@ Buildable meters
P.set_dir(src.dir) P.set_dir(src.dir)
P.initialize_directions = pipe_dir P.initialize_directions = pipe_dir
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = !T.is_plating() ? 2 : 1
P.initialize() P.initialize()
if (deleted(P)) if (deleted(P))
usr << pipefailtext usr << pipefailtext
@@ -536,8 +536,6 @@ Buildable meters
P.set_dir(src.dir) 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 = pipe_dir //this var it's used to know if the pipe is bent or not
P.initialize_directions_he = pipe_dir P.initialize_directions_he = pipe_dir
//var/turf/T = P.loc
//P.level = T.intact ? 2 : 1
P.initialize() P.initialize()
if (deleted(P)) if (deleted(P))
usr << pipefailtext usr << pipefailtext
@@ -557,7 +555,7 @@ Buildable meters
if (pipename) if (pipename)
C.name = pipename C.name = pipename
var/turf/T = C.loc var/turf/T = C.loc
C.level = T.intact ? 2 : 1 C.level = !T.is_plating() ? 2 : 1
C.initialize() C.initialize()
C.build_network() C.build_network()
if (C.node) if (C.node)
@@ -572,7 +570,7 @@ Buildable meters
M.initialize_directions = pipe_dir M.initialize_directions = pipe_dir
//M.New() //M.New()
var/turf/T = M.loc var/turf/T = M.loc
M.level = T.intact ? 2 : 1 M.level = !T.is_plating() ? 2 : 1
M.initialize() M.initialize()
if (deleted(M)) if (deleted(M))
usr << pipefailtext usr << pipefailtext
@@ -595,7 +593,7 @@ Buildable meters
M.initialize_directions = pipe_dir M.initialize_directions = pipe_dir
//M.New() //M.New()
var/turf/T = M.loc var/turf/T = M.loc
M.level = T.intact ? 2 : 1 M.level = !T.is_plating() ? 2 : 1
M.initialize() M.initialize()
if (!M) 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)" 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.initialize_directions = pipe_dir
//M.New() //M.New()
var/turf/T = M.loc var/turf/T = M.loc
M.level = T.intact ? 2 : 1 M.level = !T.is_plating() ? 2 : 1
M.initialize() M.initialize()
if (!M) 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)" 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.initialize_directions = pipe_dir
//M.New() //M.New()
var/turf/T = M.loc var/turf/T = M.loc
M.level = T.intact ? 2 : 1 M.level = !T.is_plating() ? 2 : 1
M.initialize() M.initialize()
if (deleted(M)) if (deleted(M))
usr << pipefailtext usr << pipefailtext
@@ -668,7 +666,7 @@ Buildable meters
M.connect_types = src.connect_types M.connect_types = src.connect_types
//M.New() //M.New()
var/turf/T = M.loc var/turf/T = M.loc
M.level = T.intact ? 2 : 1 M.level = !T.is_plating() ? 2 : 1
M.initialize() M.initialize()
if (!M) 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)" 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.connect_types = src.connect_types
//M.New() //M.New()
var/turf/T = M.loc var/turf/T = M.loc
M.level = T.intact ? 2 : 1 M.level = !T.is_plating() ? 2 : 1
M.initialize() M.initialize()
if (!M) 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)" 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.set_dir(src.dir)
P.initialize_directions = src.get_pdir() P.initialize_directions = src.get_pdir()
P.initialize_directions_he = src.get_hdir() P.initialize_directions_he = src.get_hdir()
//var/turf/T = P.loc
//P.level = T.intact ? 2 : 1
P.initialize() P.initialize()
if (deleted(P)) 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)" 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) if (pipename)
V.name = pipename V.name = pipename
var/turf/T = V.loc var/turf/T = V.loc
V.level = T.intact ? 2 : 1 V.level = !T.is_plating() ? 2 : 1
V.initialize() V.initialize()
V.build_network() V.build_network()
if (V.node) if (V.node)
@@ -755,7 +751,7 @@ Buildable meters
if (pipename) if (pipename)
V.name = pipename V.name = pipename
var/turf/T = V.loc var/turf/T = V.loc
V.level = T.intact ? 2 : 1 V.level = !T.is_plating() ? 2 : 1
V.initialize() V.initialize()
V.build_network() V.build_network()
if (V.node1) if (V.node1)
@@ -774,7 +770,7 @@ Buildable meters
if (pipename) if (pipename)
P.name = pipename P.name = pipename
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = !T.is_plating() ? 2 : 1
P.initialize() P.initialize()
P.build_network() P.build_network()
if (P.node1) if (P.node1)
@@ -791,7 +787,7 @@ Buildable meters
if (pipename) if (pipename)
P.name = pipename P.name = pipename
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = !T.is_plating() ? 2 : 1
P.initialize() P.initialize()
P.build_network() P.build_network()
if (P.node1) if (P.node1)
@@ -811,7 +807,7 @@ Buildable meters
if (pipename) if (pipename)
P.name = pipename P.name = pipename
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = !T.is_plating() ? 2 : 1
P.initialize() P.initialize()
P.build_network() P.build_network()
if (P.node1) if (P.node1)
@@ -831,7 +827,7 @@ Buildable meters
if (pipename) if (pipename)
P.name = pipename P.name = pipename
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = !T.is_plating() ? 2 : 1
P.initialize() P.initialize()
P.build_network() P.build_network()
if (P.node1) if (P.node1)
@@ -851,7 +847,7 @@ Buildable meters
if (pipename) if (pipename)
P.name = pipename P.name = pipename
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = !T.is_plating() ? 2 : 1
P.initialize() P.initialize()
P.build_network() P.build_network()
if (P.node1) if (P.node1)
@@ -871,7 +867,7 @@ Buildable meters
if (pipename) if (pipename)
P.name = pipename P.name = pipename
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = !T.is_plating() ? 2 : 1
P.initialize() P.initialize()
P.build_network() P.build_network()
if (P.node1) if (P.node1)
@@ -891,7 +887,7 @@ Buildable meters
if (pipename) if (pipename)
S.name = pipename S.name = pipename
var/turf/T = S.loc var/turf/T = S.loc
S.level = T.intact ? 2 : 1 S.level = !T.is_plating() ? 2 : 1
S.initialize() S.initialize()
S.build_network() S.build_network()
if (S.node) if (S.node)
@@ -903,7 +899,7 @@ Buildable meters
P.set_dir(src.dir) P.set_dir(src.dir)
P.initialize_directions = pipe_dir P.initialize_directions = pipe_dir
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = !T.is_plating() ? 2 : 1
P.initialize() P.initialize()
if (deleted(P)) if (deleted(P))
usr << pipefailtext usr << pipefailtext
@@ -923,7 +919,7 @@ Buildable meters
if (pipename) if (pipename)
V.name = pipename V.name = pipename
var/turf/T = V.loc var/turf/T = V.loc
V.level = T.intact ? 2 : 1 V.level = !T.is_plating() ? 2 : 1
V.initialize() V.initialize()
V.build_network() V.build_network()
if (V.node1) if (V.node1)
@@ -943,7 +939,7 @@ Buildable meters
if (pipename) if (pipename)
V.name = pipename V.name = pipename
var/turf/T = V.loc var/turf/T = V.loc
V.level = T.intact ? 2 : 1 V.level = !T.is_plating() ? 2 : 1
V.initialize() V.initialize()
V.build_network() V.build_network()
if (V.node1) if (V.node1)
@@ -993,7 +989,7 @@ Buildable meters
if (pipename) if (pipename)
P.name = pipename P.name = pipename
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = !T.is_plating() ? 2 : 1
P.initialize() P.initialize()
P.build_network() P.build_network()
if (P.node1) if (P.node1)
@@ -1010,7 +1006,7 @@ Buildable meters
if (pipename) if (pipename)
P.name = pipename P.name = pipename
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = !T.is_plating() ? 2 : 1
P.initialize() P.initialize()
P.build_network() P.build_network()
if (P.node1) if (P.node1)
@@ -1027,7 +1023,7 @@ Buildable meters
if (pipename) if (pipename)
C.name = pipename C.name = pipename
var/turf/T = C.loc var/turf/T = C.loc
C.level = T.intact ? 2 : 1 C.level = !T.is_plating() ? 2 : 1
C.initialize() C.initialize()
C.build_network() C.build_network()
if (C.node) if (C.node)
@@ -1041,7 +1037,7 @@ Buildable meters
if (pipename) if (pipename)
P.name = pipename P.name = pipename
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = !T.is_plating() ? 2 : 1
P.initialize() P.initialize()
P.build_network() P.build_network()
if (P.node1) if (P.node1)
@@ -1057,7 +1053,7 @@ Buildable meters
if (pipename) if (pipename)
P.name = pipename P.name = pipename
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = !T.is_plating() ? 2 : 1
P.initialize() P.initialize()
P.build_network() P.build_network()
if (P.node1) if (P.node1)
@@ -1073,7 +1069,7 @@ Buildable meters
if (pipename) if (pipename)
P.name = pipename P.name = pipename
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = !T.is_plating() ? 2 : 1
P.initialize() P.initialize()
P.build_network() P.build_network()
if (P.node1) if (P.node1)
@@ -1089,7 +1085,7 @@ Buildable meters
if (pipename) if (pipename)
P.name = pipename P.name = pipename
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = !T.is_plating() ? 2 : 1
P.initialize() P.initialize()
P.build_network() P.build_network()
if (P.node1) if (P.node1)
@@ -1105,7 +1101,7 @@ Buildable meters
if (pipename) if (pipename)
P.name = pipename P.name = pipename
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = !T.is_plating() ? 2 : 1
P.initialize() P.initialize()
P.build_network() P.build_network()
if (P.node1) if (P.node1)
@@ -1121,7 +1117,7 @@ Buildable meters
if (pipename) if (pipename)
P.name = pipename P.name = pipename
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = !T.is_plating() ? 2 : 1
P.initialize() P.initialize()
P.build_network() P.build_network()
if (P.node1) if (P.node1)
@@ -1134,13 +1130,13 @@ Buildable meters
if(PIPE_OMNI_MIXER) if(PIPE_OMNI_MIXER)
var/obj/machinery/atmospherics/omni/mixer/P = new(loc) var/obj/machinery/atmospherics/omni/mixer/P = new(loc)
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = !T.is_plating() ? 2 : 1
P.initialize() P.initialize()
P.build_network() P.build_network()
if(PIPE_OMNI_FILTER) if(PIPE_OMNI_FILTER)
var/obj/machinery/atmospherics/omni/filter/P = new(loc) var/obj/machinery/atmospherics/omni/filter/P = new(loc)
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = !T.is_plating() ? 2 : 1
P.initialize() P.initialize()
P.build_network() P.build_network()

View File

@@ -111,7 +111,7 @@
var/turf/simulated/floor/T = new_turf var/turf/simulated/floor/T = new_turf
if(!T.is_plating()) if(!T.is_plating())
T.make_plating(!(T.broken || T.burnt)) 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) /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) if(!on || !(M_Dir in list(1, 2, 4, 8)) || M_Dir==old_dir)

View File

@@ -334,7 +334,7 @@
var/turf/simulated/floor/T = new_turf var/turf/simulated/floor/T = new_turf
if(!T.is_plating()) if(!T.is_plating())
T.make_plating(!(T.broken || T.burnt)) T.make_plating(!(T.broken || T.burnt))
return !new_turf.intact return new_turf.is_plating()
proc/layCable(var/turf/new_turf) proc/layCable(var/turf/new_turf)
if(equip_ready || !istype(new_turf) || !dismantleFloor(new_turf)) if(equip_ready || !istype(new_turf) || !dismantleFloor(new_turf))

View File

@@ -16,16 +16,11 @@
/obj/item/device/pipe_painter/afterattack(atom/A, mob/user as mob, proximity) /obj/item/device/pipe_painter/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) if(!proximity)
return 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)) 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 return
var/obj/machinery/atmospherics/pipe/P = A var/obj/machinery/atmospherics/pipe/P = A
var/turf/T = P.loc
if (P.level < 2 && T.level==1 && isturf(T) && T.intact)
user << "<span class='warning'>You must remove the plating first.</span>"
return
P.change_color(pipe_colors[mode]) P.change_color(pipe_colors[mode])
/obj/item/device/pipe_painter/attack_self(mob/user as mob) /obj/item/device/pipe_painter/attack_self(mob/user as mob)

View File

@@ -22,7 +22,7 @@
var/mode = 0 // 0 = off, 1=clamped (off), 2=operating 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/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 var/obj/structure/cable/attached // the attached cable
/obj/item/device/powersink/Destroy() /obj/item/device/powersink/Destroy()
@@ -34,7 +34,7 @@
if(istype(I, /obj/item/weapon/screwdriver)) if(istype(I, /obj/item/weapon/screwdriver))
if(mode == 0) if(mode == 0)
var/turf/T = loc var/turf/T = loc
if(isturf(T) && !T.intact) if(isturf(T) && !!T.is_plating())
attached = locate() in T attached = locate() in T
if(!attached) if(!attached)
user << "No exposed cable here to attach to." user << "No exposed cable here to attach to."

View File

@@ -61,10 +61,10 @@
user_client.images += overlay user_client.images += overlay
//Remove stale overlays //Remove stale overlays
for(var/obj/O in update_remove) for(var/obj/O in update_remove)
user_client.images -= active_scanned[O] user_client.images -= active_scanned[O]
active_scanned -= O active_scanned -= O
//Flicker effect //Flicker effect
for(var/obj/O in active_scanned) for(var/obj/O in active_scanned)
var/image/overlay = active_scanned[O] var/image/overlay = active_scanned[O]
@@ -76,19 +76,19 @@
//creates a new overlay for a scanned object //creates a new overlay for a scanned object
/obj/item/device/t_scanner/proc/get_overlay(obj/scanned) /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. //Also means that images are reused if multiple people are using t-rays to look at the same objects.
if(scanned in overlay_cache) if(scanned in overlay_cache)
. = overlay_cache[scanned] . = overlay_cache[scanned]
else else
var/image/I = image(loc = scanned, icon = scanned.icon, icon_state = scanned.icon_state, layer = HUD_LAYER) var/image/I = image(loc = scanned, icon = scanned.icon, icon_state = scanned.icon_state, layer = HUD_LAYER)
//Pipes are special //Pipes are special
if(istype(scanned, /obj/machinery/atmospherics/pipe)) if(istype(scanned, /obj/machinery/atmospherics/pipe))
var/obj/machinery/atmospherics/pipe/P = scanned var/obj/machinery/atmospherics/pipe/P = scanned
I.color = P.pipe_color I.color = P.pipe_color
I.overlays += P.overlays I.overlays += P.overlays
I.alpha = 128 I.alpha = 128
I.mouse_opacity = 0 I.mouse_opacity = 0
. = I . = I
@@ -100,12 +100,12 @@
/obj/item/device/t_scanner/proc/get_scanned_objects(var/scan_dist) /obj/item/device/t_scanner/proc/get_scanned_objects(var/scan_dist)
. = list() . = list()
var/turf/center = get_turf(src.loc) var/turf/center = get_turf(src.loc)
if(!center) return if(!center) return
for(var/turf/T in range(scan_range, center)) for(var/turf/T in range(scan_range, center))
if(!T.intact) if(!!T.is_plating())
continue continue
for(var/obj/O in T.contents) for(var/obj/O in T.contents)

View File

@@ -175,12 +175,12 @@ obj/structure/safe/ex_act(severity)
level = 1 //underfloor level = 1 //underfloor
layer = 2.5 layer = 2.5
/obj/structure/safe/floor/initialize() /obj/structure/safe/floor/initialize()
..() ..()
var/turf/T = loc var/turf/T = loc
hide(T.intact) if(istype(T) && !T.is_plating())
hide(1)
update_icon()
/obj/structure/safe/floor/hide(var/intact) /obj/structure/safe/floor/hide(var/intact)
invisibility = intact ? 101 : 0 invisibility = intact ? 101 : 0

View File

@@ -40,11 +40,9 @@
/turf/simulated/floor/proc/set_flooring(var/decl/flooring/newflooring) /turf/simulated/floor/proc/set_flooring(var/decl/flooring/newflooring)
make_plating(defer_icon_update = 1) make_plating(defer_icon_update = 1)
flooring = newflooring flooring = newflooring
intact = 1
update_icon(1) update_icon(1)
levelupdate() 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 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. //This proc auto corrects the grass tiles' siding.
/turf/simulated/floor/proc/make_plating(var/place_product, var/defer_icon_update) /turf/simulated/floor/proc/make_plating(var/place_product, var/defer_icon_update)
@@ -63,10 +61,8 @@
if(flooring.build_type && place_product) if(flooring.build_type && place_product)
new flooring.build_type(src) new flooring.build_type(src)
flooring = null flooring = null
intact = 0
set_light(0) set_light(0)
intact = 0
broken = null broken = null
burnt = null burnt = null
flooring_override = null flooring_override = null

View File

@@ -1,7 +1,6 @@
/turf /turf
icon = 'icons/turf/floors.dmi' icon = 'icons/turf/floors.dmi'
level = 1 level = 1
var/intact
var/holy = 0 var/holy = 0
// Initial air contents (in moles) // Initial air contents (in moles)
@@ -44,6 +43,9 @@
/turf/proc/is_space() /turf/proc/is_space()
return 0 return 0
/turf/proc/is_intact()
return 0
/turf/attack_hand(mob/user) /turf/attack_hand(mob/user)
if(!(user.canmove) || user.restrained() || !(user.pulling)) if(!(user.canmove) || user.restrained() || !(user.pulling))
return 0 return 0
@@ -160,7 +162,7 @@ var/const/enterloopsanity = 100
/turf/proc/levelupdate() /turf/proc/levelupdate()
for(var/obj/O in src) 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() /turf/proc/AdjacentTurfs()
var/L[] = new() var/L[] = new()

View File

@@ -1,5 +1,4 @@
/turf/unsimulated /turf/unsimulated
intact = 1
name = "command" name = "command"
oxygen = MOLES_O2STANDARD oxygen = MOLES_O2STANDARD
nitrogen = MOLES_N2STANDARD nitrogen = MOLES_N2STANDARD

View File

@@ -505,7 +505,8 @@
else else
user << "<span class='warning'>Access denied.</span>" user << "<span class='warning'>Access denied.</span>"
else if (istype(W, /obj/item/stack/cable_coil) && !terminal && opened && has_electronics!=2) 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 << "<span class='warning'>You must remove the floor plating in front of the APC first.</span>" user << "<span class='warning'>You must remove the floor plating in front of the APC first.</span>"
return return
var/obj/item/stack/cable_coil/C = W var/obj/item/stack/cable_coil/C = W
@@ -517,7 +518,6 @@
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20)) if(do_after(user, 20))
if (C.amount >= 10 && !terminal && opened && has_electronics != 2) if (C.amount >= 10 && !terminal && opened && has_electronics != 2)
var/turf/T = get_turf(src)
var/obj/structure/cable/N = T.get_cable_node() var/obj/structure/cable/N = T.get_cable_node()
if (prob(50) && electrocute_mob(usr, N, N)) if (prob(50) && electrocute_mob(usr, N, N))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
@@ -532,7 +532,8 @@
make_terminal() make_terminal()
terminal.connect_to_network() terminal.connect_to_network()
else if (istype(W, /obj/item/weapon/wirecutters) && terminal && opened && has_electronics!=2) 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 << "<span class='warning'>You must remove the floor plating in front of the APC first.</span>" user << "<span class='warning'>You must remove the floor plating in front of the APC first.</span>"
return return
user.visible_message("<span class='warning'>[user.name] dismantles the power terminal from [src].</span>", \ user.visible_message("<span class='warning'>[user.name] dismantles the power terminal from [src].</span>", \

View File

@@ -70,7 +70,6 @@ By design, d1 is the smallest direction and d2 is the highest
/obj/structure/cable/New() /obj/structure/cable/New()
..() ..()
// ensure d1 & d2 reflect the icon_state for entering and exiting cable // ensure d1 & d2 reflect the icon_state for entering and exiting cable
var/dash = findtext(icon_state, "-") 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 ) ) d2 = text2num( copytext( icon_state, dash+1 ) )
var/turf/T = src.loc // hide if turf is not intact 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 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) /obj/structure/cable/attackby(obj/item/W, mob/user)
var/turf/T = src.loc var/turf/T = src.loc
if(T.intact) if(!T.is_plating())
return return
if(istype(W, /obj/item/weapon/wirecutters)) 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." user << "You can't lay cable at a place that far away."
return 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." user << "You can't lay cable there unless the floor tiles are removed."
return return
@@ -750,7 +749,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
var/turf/T = C.loc 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 return
if(get_dist(C, user) > 1) // make sure it's close enough 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 // one end of the clicked cable is pointing towards us
if(C.d1 == dirn || C.d2 == dirn) 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." user << "You can't lay cable there unless the floor tiles are removed."
return return
else else

View File

@@ -12,7 +12,7 @@
/obj/structure/cable/heavyduty/attackby(obj/item/W, mob/user) /obj/structure/cable/heavyduty/attackby(obj/item/W, mob/user)
var/turf/T = src.loc var/turf/T = src.loc
if(T.intact) if(!T.is_plating())
return return
if(istype(W, /obj/item/weapon/wirecutters)) if(istype(W, /obj/item/weapon/wirecutters))

View File

@@ -126,7 +126,7 @@
var/turf/T = user.loc var/turf/T = user.loc
if(T.intact || !istype(T, /turf/simulated/floor)) if(!T.is_plating() || !istype(T, /turf/simulated/floor))
return return
if(get_dist(src, user) > 1) if(get_dist(src, user) > 1)

View File

@@ -101,7 +101,7 @@
return 1000 return 1000
/turf/singularity_act(S, current_size) /turf/singularity_act(S, current_size)
if(intact) if(!is_plating())
for(var/obj/O in contents) for(var/obj/O in contents)
if(O.level != 1) if(O.level != 1)
continue continue

View File

@@ -204,7 +204,7 @@
user << "<span class='warning'>You can't build a terminal on space.</span>" user << "<span class='warning'>You can't build a terminal on space.</span>"
return 1 return 1
else if (istype(tempLoc)) else if (istype(tempLoc))
if(tempLoc.intact) if(!tempLoc.is_plating())
user << "<span class='warning'>You must remove the floor plating first.</span>" user << "<span class='warning'>You must remove the floor plating first.</span>"
return 1 return 1
user << "<span class='notice'>You start adding cable to the [src].</span>" user << "<span class='notice'>You start adding cable to the [src].</span>"
@@ -272,7 +272,7 @@
building_terminal = 1 building_terminal = 1
var/turf/tempTDir = terminal.loc var/turf/tempTDir = terminal.loc
if (istype(tempTDir)) if (istype(tempTDir))
if(tempTDir.intact) if(!tempTDir.is_plating())
user << "<span class='warning'>You must remove the floor plating first.</span>" user << "<span class='warning'>You must remove the floor plating first.</span>"
else else
user << "<span class='notice'>You begin to cut the cables...</span>" user << "<span class='notice'>You begin to cut the cables...</span>"

View File

@@ -17,7 +17,7 @@
/obj/machinery/power/terminal/New() /obj/machinery/power/terminal/New()
..() ..()
var/turf/T = src.loc var/turf/T = src.loc
if(level==1) hide(T.intact) if(level==1) hide(!T.is_plating())
return return
/obj/machinery/power/terminal/Destroy() /obj/machinery/power/terminal/Destroy()

View File

@@ -219,7 +219,7 @@
ispipe = 1 ispipe = 1
var/turf/T = src.loc 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." user << "You can only attach the [nicetype] if the floor plating is removed."
return return

View File

@@ -713,7 +713,7 @@
// update the icon_state to reflect hidden status // update the icon_state to reflect hidden status
proc/update() proc/update()
var/turf/T = src.loc 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 // hide called by levelupdate if turf intact status changes
// change visibility status and force update of icon // change visibility status and force update of icon
@@ -746,14 +746,10 @@
H.active = 0 H.active = 0
H.loc = src H.loc = src
return 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 var/turf/simulated/floor/F = T
//F.health = 100 F.break_tile()
F.burnt = 1
F.intact = 0
F.levelupdate()
new /obj/item/stack/tile(H) // add to holder so it will be thrown with other stuff 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(direction) // direction is specified
if(istype(T, /turf/space)) // if ended in space, then range is unlimited 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) attackby(var/obj/item/I, var/mob/user)
var/turf/T = src.loc var/turf/T = src.loc
if(T.intact) if(!T.is_plating())
return // prevent interaction with T-scanner revealed pipes return // prevent interaction with T-scanner revealed pipes
src.add_fingerprint(user) src.add_fingerprint(user)
if(istype(I, /obj/item/weapon/weldingtool)) if(istype(I, /obj/item/weapon/weldingtool))
@@ -1339,7 +1335,7 @@
return return
var/turf/T = src.loc var/turf/T = src.loc
if(T.intact) if(!T.is_plating())
return // prevent interaction with T-scanner revealed pipes return // prevent interaction with T-scanner revealed pipes
src.add_fingerprint(user) src.add_fingerprint(user)
if(istype(I, /obj/item/weapon/weldingtool)) if(istype(I, /obj/item/weapon/weldingtool))