Files
Will 397d569b37 Atmos Pipe Improvements (#19478)
* pumps use their layer to connect pipes visually

* connectors for supply and scrubbers

* pump dmi stuff

* fixed volume pump dmi

* Vents support multiple connection types

* prevent multiple pipes attaching to the same side

* old code

* prioritize linking already connecting pipes

* constructable pressure tanks

* tank icon fix

* color fix

* fixes

* multiple connection universal pipes

* possible network fix

* buh buh

* tanks no longer go invisible
2026-05-21 20:22:25 -04:00

86 lines
1.8 KiB
Plaintext

//
// Vent Pipe - Unpowered vent
//
/obj/machinery/atmospherics/pipe/vent
icon = 'icons/obj/atmospherics/pipe_vent.dmi'
icon_state = "intact"
name = "Vent"
desc = "A large air vent"
level = 1
volume = 250
dir = SOUTH
initialize_directions = SOUTH
pipe_flags = PIPING_DEFAULT_LAYER_ONLY
construction_type = /obj/item/pipe/directional
pipe_state = "passive_vent"
var/build_killswitch = 1
/obj/machinery/atmospherics/pipe/vent/init_dir()
initialize_directions = dir
/obj/machinery/atmospherics/pipe/vent/high_volume
name = "Larger vent"
volume = 1000
/obj/machinery/atmospherics/pipe/vent/process()
if(!parent)
if(build_killswitch <= 0)
. = PROCESS_KILL
else
build_killswitch--
..()
return
else
parent.mingle_with_turf(loc, volume)
/obj/machinery/atmospherics/pipe/vent/Destroy()
if(node1)
node1.disconnect(src)
node1 = null
. = ..()
/obj/machinery/atmospherics/pipe/vent/pipeline_expansion()
return list(node1)
/obj/machinery/atmospherics/pipe/vent/update_icon()
if(node1)
icon_state = "intact"
set_dir(get_dir(src, node1))
else
icon_state = "exposed"
/obj/machinery/atmospherics/pipe/vent/atmos_init()
var/connect_direction = dir
for(var/obj/machinery/atmospherics/target in get_prioritized_nodes(get_step(src,connect_direction)))
if (can_be_node(target, 1))
node1 = target
break
update_icon()
/obj/machinery/atmospherics/pipe/vent/disconnect(obj/machinery/atmospherics/reference)
if(reference == node1)
if(istype(node1, /obj/machinery/atmospherics/pipe))
qdel(parent)
node1 = null
update_icon()
return null
/obj/machinery/atmospherics/pipe/vent/hide(i) //to make the little pipe section invisible, the icon changes.
if(node1)
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]intact"
set_dir(get_dir(src, node1))
else
icon_state = "exposed"