mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Removed intact var in favour of is_plating() proc, fixed issues with invisible initialized pipes.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 << "<span class='warning'>You must remove the plating first.</span>"
|
||||
return 1
|
||||
var/datum/gas_mixture/int_air = return_air()
|
||||
|
||||
@@ -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 << "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>"
|
||||
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 << "<span class='warning'>You must remove the plating first.</span>"
|
||||
return 1
|
||||
var/datum/gas_mixture/int_air = return_air()
|
||||
|
||||
@@ -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 << "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>"
|
||||
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 << "<span class='warning'>You must remove the plating first.</span>"
|
||||
return 1
|
||||
var/datum/gas_mixture/int_air = return_air()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 << "<span class='warning'>You must remove the plating first.</span>"
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user