mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-29 19:52:12 +00:00
This commit cleans up any remaining relative pathing in the ATMOSPHERICS/ folder, and splits the absolutely huge pipes.dm file into 6-7 files in the pipes/ folder tree.
53 lines
2.3 KiB
Plaintext
53 lines
2.3 KiB
Plaintext
/obj/machinery/atmospherics/proc/change_color(var/new_color)
|
|
//only pass valid pipe colors please ~otherwise your pipe will turn invisible
|
|
if(!pipe_color_check(new_color))
|
|
return
|
|
|
|
pipe_color = new_color
|
|
update_icon()
|
|
|
|
/*
|
|
/obj/machinery/atmospherics/pipe/add_underlay(var/obj/machinery/atmospherics/node, var/direction)
|
|
if(istype(src, /obj/machinery/atmospherics/pipe/tank)) //todo: move tanks to unary devices
|
|
return ..()
|
|
|
|
if(node)
|
|
var/temp_dir = get_dir(src, node)
|
|
underlays += icon_manager.get_atmos_icon("pipe_underlay_intact", temp_dir, color_cache_name(node))
|
|
return temp_dir
|
|
else if(direction)
|
|
underlays += icon_manager.get_atmos_icon("pipe_underlay_exposed", direction, pipe_color)
|
|
else
|
|
return null
|
|
*/
|
|
|
|
/obj/machinery/atmospherics/proc/universal_underlays(var/obj/machinery/atmospherics/node, var/direction)
|
|
var/turf/T = get_turf(src)
|
|
if(!istype(T)) return
|
|
if(node)
|
|
var/node_dir = get_dir(src,node)
|
|
if(node.icon_connect_type == "-supply")
|
|
add_underlay_adapter(T, , node_dir, "")
|
|
add_underlay_adapter(T, node, node_dir, "-supply")
|
|
add_underlay_adapter(T, , node_dir, "-scrubbers")
|
|
else if (node.icon_connect_type == "-scrubbers")
|
|
add_underlay_adapter(T, , node_dir, "")
|
|
add_underlay_adapter(T, , node_dir, "-supply")
|
|
add_underlay_adapter(T, node, node_dir, "-scrubbers")
|
|
else
|
|
add_underlay_adapter(T, node, node_dir, "")
|
|
add_underlay_adapter(T, , node_dir, "-supply")
|
|
add_underlay_adapter(T, , node_dir, "-scrubbers")
|
|
else
|
|
add_underlay_adapter(T, , direction, "-supply")
|
|
add_underlay_adapter(T, , direction, "-scrubbers")
|
|
add_underlay_adapter(T, , direction, "")
|
|
|
|
/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))
|
|
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)
|
|
else
|
|
underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "retracted" + icon_connect_type) |