mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge branch 'master' of https://github.com/PolarisSS13/Polaris into aro-sync
# Conflicts: # code/ATMOSPHERICS/pipes.dm # code/game/turfs/flooring/flooring.dm # code/modules/clothing/clothing_accessories.dm # code/modules/mob/living/carbon/human/inventory.dm # html/changelogs/.all_changelog.yml
This commit is contained in:
114
code/ATMOSPHERICS/pipes/cap.dm
Normal file
114
code/ATMOSPHERICS/pipes/cap.dm
Normal file
@@ -0,0 +1,114 @@
|
||||
//
|
||||
// Pipe Cap - They go on the end
|
||||
//
|
||||
/obj/machinery/atmospherics/pipe/cap
|
||||
name = "pipe endcap"
|
||||
desc = "An endcap for pipes"
|
||||
icon = 'icons/atmos/pipes.dmi'
|
||||
icon_state = ""
|
||||
level = 2
|
||||
layer = 2.4 //under wires with their 2.44
|
||||
|
||||
volume = 35
|
||||
|
||||
dir = SOUTH
|
||||
initialize_directions = SOUTH
|
||||
|
||||
var/obj/machinery/atmospherics/node
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/init_dir()
|
||||
initialize_directions = dir
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/pipeline_expansion()
|
||||
return list(node)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/Destroy()
|
||||
if(node)
|
||||
node.disconnect(src)
|
||||
node = null
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference == node)
|
||||
if(istype(node, /obj/machinery/atmospherics/pipe))
|
||||
qdel(parent)
|
||||
node = null
|
||||
|
||||
update_icon()
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/change_color(var/new_color)
|
||||
..()
|
||||
//for updating connected atmos device pipes (i.e. vents, manifolds, etc)
|
||||
if(node)
|
||||
node.update_underlays()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/update_icon(var/safety = 0)
|
||||
if(!check_icon_cache())
|
||||
return
|
||||
|
||||
alpha = 255
|
||||
|
||||
overlays.Cut()
|
||||
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "cap")
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/atmos_init()
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src, dir))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
if (check_connect_types(target,src))
|
||||
node = target
|
||||
break
|
||||
|
||||
var/turf/T = src.loc // hide if turf is not intact
|
||||
if(level == 1 && !T.is_plating()) hide(1)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/can_unwrench()
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/visible
|
||||
level = 2
|
||||
icon_state = "cap"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/visible/scrubbers
|
||||
name = "scrubbers pipe endcap"
|
||||
desc = "An endcap for scrubbers pipes"
|
||||
icon_state = "cap-scrubbers"
|
||||
connect_types = CONNECT_TYPE_SCRUBBER
|
||||
layer = 2.38
|
||||
icon_connect_type = "-scrubbers"
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/visible/supply
|
||||
name = "supply pipe endcap"
|
||||
desc = "An endcap for supply pipes"
|
||||
icon_state = "cap-supply"
|
||||
connect_types = CONNECT_TYPE_SUPPLY
|
||||
layer = 2.39
|
||||
icon_connect_type = "-supply"
|
||||
color = PIPE_COLOR_BLUE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/hidden
|
||||
level = 1
|
||||
icon_state = "cap"
|
||||
alpha = 128
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/hidden/scrubbers
|
||||
name = "scrubbers pipe endcap"
|
||||
desc = "An endcap for scrubbers pipes"
|
||||
icon_state = "cap-f-scrubbers"
|
||||
connect_types = CONNECT_TYPE_SCRUBBER
|
||||
layer = 2.38
|
||||
icon_connect_type = "-scrubbers"
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/hidden/supply
|
||||
name = "supply pipe endcap"
|
||||
desc = "An endcap for supply pipes"
|
||||
icon_state = "cap-f-supply"
|
||||
connect_types = CONNECT_TYPE_SUPPLY
|
||||
layer = 2.39
|
||||
icon_connect_type = "-supply"
|
||||
color = PIPE_COLOR_BLUE
|
||||
@@ -1,153 +1,155 @@
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging
|
||||
icon = 'icons/atmos/heat.dmi'
|
||||
icon_state = "intact"
|
||||
pipe_icon = "hepipe"
|
||||
color = "#404040"
|
||||
level = 2
|
||||
connect_types = CONNECT_TYPE_HE
|
||||
layer = 2.41
|
||||
var/initialize_directions_he
|
||||
var/surface = 2 //surface area in m^2
|
||||
var/icon_temperature = T20C //stop small changes in temperature causing an icon refresh
|
||||
|
||||
minimum_temperature_difference = 20
|
||||
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
|
||||
|
||||
buckle_lying = 1
|
||||
|
||||
// BubbleWrap
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/New()
|
||||
..()
|
||||
// BubbleWrap END
|
||||
color = "#404040" //we don't make use of the fancy overlay system for colours, use this to set the default.
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/init_dir()
|
||||
..()
|
||||
initialize_directions_he = initialize_directions // The auto-detection from /pipe is good enough for a simple HE pipe
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/atmos_init()
|
||||
normalize_dir()
|
||||
var/node1_dir
|
||||
var/node2_dir
|
||||
|
||||
for(var/direction in cardinal)
|
||||
if(direction&initialize_directions_he)
|
||||
if (!node1_dir)
|
||||
node1_dir = direction
|
||||
else if (!node2_dir)
|
||||
node2_dir = direction
|
||||
|
||||
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,node1_dir))
|
||||
if(target.initialize_directions_he & get_dir(target,src))
|
||||
node1 = target
|
||||
break
|
||||
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,node2_dir))
|
||||
if(target.initialize_directions_he & get_dir(target,src))
|
||||
node2 = target
|
||||
break
|
||||
if(!node1 && !node2)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/process()
|
||||
if(!parent)
|
||||
..()
|
||||
else
|
||||
var/datum/gas_mixture/pipe_air = return_air()
|
||||
if(istype(loc, /turf/simulated/))
|
||||
var/environment_temperature = 0
|
||||
if(loc:blocks_air)
|
||||
environment_temperature = loc:temperature
|
||||
else
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
environment_temperature = environment.temperature
|
||||
if(abs(environment_temperature-pipe_air.temperature) > minimum_temperature_difference)
|
||||
parent.temperature_interact(loc, volume, thermal_conductivity)
|
||||
else if(istype(loc, /turf/space/))
|
||||
parent.radiate_heat_to_space(surface, 1)
|
||||
|
||||
if(has_buckled_mobs())
|
||||
for(var/M in buckled_mobs)
|
||||
var/mob/living/L = M
|
||||
|
||||
var/hc = pipe_air.heat_capacity()
|
||||
var/avg_temp = (pipe_air.temperature * hc + L.bodytemperature * 3500) / (hc + 3500)
|
||||
pipe_air.temperature = avg_temp
|
||||
L.bodytemperature = avg_temp
|
||||
|
||||
var/heat_limit = 1000
|
||||
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(istype(H) && H.species)
|
||||
heat_limit = H.species.heat_level_3
|
||||
|
||||
if(pipe_air.temperature > heat_limit + 1)
|
||||
L.apply_damage(4 * log(pipe_air.temperature - heat_limit), BURN, BP_TORSO, used_weapon = "Excessive Heat")
|
||||
|
||||
//fancy radiation glowing
|
||||
if(pipe_air.temperature && (icon_temperature > 500 || pipe_air.temperature > 500)) //start glowing at 500K
|
||||
if(abs(pipe_air.temperature - icon_temperature) > 10)
|
||||
icon_temperature = pipe_air.temperature
|
||||
|
||||
var/h_r = heat2color_r(icon_temperature)
|
||||
var/h_g = heat2color_g(icon_temperature)
|
||||
var/h_b = heat2color_b(icon_temperature)
|
||||
|
||||
if(icon_temperature < 2000) //scale up overlay until 2000K
|
||||
var/scale = (icon_temperature - 500) / 1500
|
||||
h_r = 64 + (h_r - 64)*scale
|
||||
h_g = 64 + (h_g - 64)*scale
|
||||
h_b = 64 + (h_b - 64)*scale
|
||||
|
||||
animate(src, color = rgb(h_r, h_g, h_b), time = 20, easing = SINE_EASING)
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction
|
||||
icon = 'icons/atmos/junction.dmi'
|
||||
icon_state = "intact"
|
||||
pipe_icon = "hejunction"
|
||||
level = 2
|
||||
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_HE
|
||||
minimum_temperature_difference = 300
|
||||
thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/init_dir()
|
||||
..()
|
||||
switch ( dir )
|
||||
if ( SOUTH )
|
||||
initialize_directions = NORTH
|
||||
initialize_directions_he = SOUTH
|
||||
if ( NORTH )
|
||||
initialize_directions = SOUTH
|
||||
initialize_directions_he = NORTH
|
||||
if ( EAST )
|
||||
initialize_directions = WEST
|
||||
initialize_directions_he = EAST
|
||||
if ( WEST )
|
||||
initialize_directions = EAST
|
||||
initialize_directions_he = WEST
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/atmos_init()
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,initialize_directions))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node1 = target
|
||||
break
|
||||
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,initialize_directions_he))
|
||||
if(target.initialize_directions_he & get_dir(target,src))
|
||||
node2 = target
|
||||
break
|
||||
|
||||
if(!node1&&!node2)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
update_icon()
|
||||
return
|
||||
//
|
||||
// Heat Exchanging Pipes - Behave like simple pipes
|
||||
//
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging
|
||||
icon = 'icons/atmos/heat.dmi'
|
||||
icon_state = "intact"
|
||||
pipe_icon = "hepipe"
|
||||
color = "#404040"
|
||||
level = 2
|
||||
connect_types = CONNECT_TYPE_HE
|
||||
layer = 2.41
|
||||
var/initialize_directions_he
|
||||
var/surface = 2 //surface area in m^2
|
||||
var/icon_temperature = T20C //stop small changes in temperature causing an icon refresh
|
||||
|
||||
minimum_temperature_difference = 20
|
||||
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
|
||||
|
||||
buckle_lying = 1
|
||||
|
||||
// BubbleWrap
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/New()
|
||||
..()
|
||||
// BubbleWrap END
|
||||
color = "#404040" //we don't make use of the fancy overlay system for colours, use this to set the default.
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/init_dir()
|
||||
..()
|
||||
initialize_directions_he = initialize_directions // The auto-detection from /pipe is good enough for a simple HE pipe
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/atmos_init()
|
||||
normalize_dir()
|
||||
var/node1_dir
|
||||
var/node2_dir
|
||||
|
||||
for(var/direction in cardinal)
|
||||
if(direction&initialize_directions_he)
|
||||
if (!node1_dir)
|
||||
node1_dir = direction
|
||||
else if (!node2_dir)
|
||||
node2_dir = direction
|
||||
|
||||
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,node1_dir))
|
||||
if(target.initialize_directions_he & get_dir(target,src))
|
||||
node1 = target
|
||||
break
|
||||
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,node2_dir))
|
||||
if(target.initialize_directions_he & get_dir(target,src))
|
||||
node2 = target
|
||||
break
|
||||
if(!node1 && !node2)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/process()
|
||||
if(!parent)
|
||||
..()
|
||||
else
|
||||
var/datum/gas_mixture/pipe_air = return_air()
|
||||
if(istype(loc, /turf/simulated/))
|
||||
var/environment_temperature = 0
|
||||
if(loc:blocks_air)
|
||||
environment_temperature = loc:temperature
|
||||
else
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
environment_temperature = environment.temperature
|
||||
if(abs(environment_temperature-pipe_air.temperature) > minimum_temperature_difference)
|
||||
parent.temperature_interact(loc, volume, thermal_conductivity)
|
||||
else if(istype(loc, /turf/space/))
|
||||
parent.radiate_heat_to_space(surface, 1)
|
||||
|
||||
if(has_buckled_mobs())
|
||||
for(var/M in buckled_mobs)
|
||||
var/mob/living/L = M
|
||||
|
||||
var/hc = pipe_air.heat_capacity()
|
||||
var/avg_temp = (pipe_air.temperature * hc + L.bodytemperature * 3500) / (hc + 3500)
|
||||
pipe_air.temperature = avg_temp
|
||||
L.bodytemperature = avg_temp
|
||||
|
||||
var/heat_limit = 1000
|
||||
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(istype(H) && H.species)
|
||||
heat_limit = H.species.heat_level_3
|
||||
|
||||
if(pipe_air.temperature > heat_limit + 1)
|
||||
L.apply_damage(4 * log(pipe_air.temperature - heat_limit), BURN, BP_TORSO, used_weapon = "Excessive Heat")
|
||||
|
||||
//fancy radiation glowing
|
||||
if(pipe_air.temperature && (icon_temperature > 500 || pipe_air.temperature > 500)) //start glowing at 500K
|
||||
if(abs(pipe_air.temperature - icon_temperature) > 10)
|
||||
icon_temperature = pipe_air.temperature
|
||||
|
||||
var/h_r = heat2color_r(icon_temperature)
|
||||
var/h_g = heat2color_g(icon_temperature)
|
||||
var/h_b = heat2color_b(icon_temperature)
|
||||
|
||||
if(icon_temperature < 2000) //scale up overlay until 2000K
|
||||
var/scale = (icon_temperature - 500) / 1500
|
||||
h_r = 64 + (h_r - 64)*scale
|
||||
h_g = 64 + (h_g - 64)*scale
|
||||
h_b = 64 + (h_b - 64)*scale
|
||||
|
||||
animate(src, color = rgb(h_r, h_g, h_b), time = 20, easing = SINE_EASING)
|
||||
|
||||
//
|
||||
// Heat Exchange Junction - Interfaces HE pipes to normal pipes
|
||||
//
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction
|
||||
icon = 'icons/atmos/junction.dmi'
|
||||
icon_state = "intact"
|
||||
pipe_icon = "hejunction"
|
||||
level = 2
|
||||
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_HE
|
||||
minimum_temperature_difference = 300
|
||||
thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/init_dir()
|
||||
..()
|
||||
switch ( dir )
|
||||
if ( SOUTH )
|
||||
initialize_directions = NORTH
|
||||
initialize_directions_he = SOUTH
|
||||
if ( NORTH )
|
||||
initialize_directions = SOUTH
|
||||
initialize_directions_he = NORTH
|
||||
if ( EAST )
|
||||
initialize_directions = WEST
|
||||
initialize_directions_he = EAST
|
||||
if ( WEST )
|
||||
initialize_directions = EAST
|
||||
initialize_directions_he = WEST
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/atmos_init()
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,initialize_directions))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node1 = target
|
||||
break
|
||||
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,initialize_directions_he))
|
||||
if(target.initialize_directions_he & get_dir(target,src))
|
||||
node2 = target
|
||||
break
|
||||
|
||||
if(!node1&&!node2)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
update_icon()
|
||||
return
|
||||
244
code/ATMOSPHERICS/pipes/manifold.dm
Normal file
244
code/ATMOSPHERICS/pipes/manifold.dm
Normal file
@@ -0,0 +1,244 @@
|
||||
//
|
||||
// Manifold Pipes - Three way "T" joints
|
||||
//
|
||||
/obj/machinery/atmospherics/pipe/manifold
|
||||
icon = 'icons/atmos/manifold.dmi'
|
||||
icon_state = ""
|
||||
name = "pipe manifold"
|
||||
desc = "A manifold composed of regular pipes"
|
||||
|
||||
volume = ATMOS_DEFAULT_VOLUME_PIPE * 1.5
|
||||
|
||||
dir = SOUTH
|
||||
initialize_directions = EAST|NORTH|WEST
|
||||
|
||||
var/obj/machinery/atmospherics/node3
|
||||
|
||||
level = 1
|
||||
layer = 2.4 //under wires with their 2.44
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/New()
|
||||
..()
|
||||
alpha = 255
|
||||
icon = null
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/init_dir()
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
initialize_directions = EAST|SOUTH|WEST
|
||||
if(SOUTH)
|
||||
initialize_directions = WEST|NORTH|EAST
|
||||
if(EAST)
|
||||
initialize_directions = SOUTH|WEST|NORTH
|
||||
if(WEST)
|
||||
initialize_directions = NORTH|EAST|SOUTH
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/pipeline_expansion()
|
||||
return list(node1, node2, node3)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/Destroy()
|
||||
if(node1)
|
||||
node1.disconnect(src)
|
||||
node1 = null
|
||||
if(node2)
|
||||
node2.disconnect(src)
|
||||
node2 = null
|
||||
if(node3)
|
||||
node3.disconnect(src)
|
||||
node3 = null
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference == node1)
|
||||
if(istype(node1, /obj/machinery/atmospherics/pipe))
|
||||
qdel(parent)
|
||||
node1 = null
|
||||
|
||||
if(reference == node2)
|
||||
if(istype(node2, /obj/machinery/atmospherics/pipe))
|
||||
qdel(parent)
|
||||
node2 = null
|
||||
|
||||
if(reference == node3)
|
||||
if(istype(node3, /obj/machinery/atmospherics/pipe))
|
||||
qdel(parent)
|
||||
node3 = null
|
||||
|
||||
update_icon()
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/change_color(var/new_color)
|
||||
..()
|
||||
//for updating connected atmos device pipes (i.e. vents, manifolds, etc)
|
||||
if(node1)
|
||||
node1.update_underlays()
|
||||
if(node2)
|
||||
node2.update_underlays()
|
||||
if(node3)
|
||||
node3.update_underlays()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/update_icon(var/safety = 0)
|
||||
if(!check_icon_cache())
|
||||
return
|
||||
|
||||
alpha = 255
|
||||
|
||||
overlays.Cut()
|
||||
overlays += icon_manager.get_atmos_icon("manifold", , pipe_color, "core" + icon_connect_type)
|
||||
overlays += icon_manager.get_atmos_icon("manifold", , , "clamps" + icon_connect_type)
|
||||
underlays.Cut()
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
var/list/directions = list(NORTH, SOUTH, EAST, WEST)
|
||||
var/node1_direction = get_dir(src, node1)
|
||||
var/node2_direction = get_dir(src, node2)
|
||||
var/node3_direction = get_dir(src, node3)
|
||||
|
||||
directions -= dir
|
||||
|
||||
directions -= add_underlay(T,node1,node1_direction,icon_connect_type)
|
||||
directions -= add_underlay(T,node2,node2_direction,icon_connect_type)
|
||||
directions -= add_underlay(T,node3,node3_direction,icon_connect_type)
|
||||
|
||||
for(var/D in directions)
|
||||
add_underlay(T,,D,icon_connect_type)
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/update_underlays()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/atmos_init()
|
||||
var/connect_directions = (NORTH|SOUTH|EAST|WEST)&(~dir)
|
||||
|
||||
for(var/direction in cardinal)
|
||||
if(direction&connect_directions)
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,direction))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
if (check_connect_types(target,src))
|
||||
node1 = target
|
||||
connect_directions &= ~direction
|
||||
break
|
||||
if (node1)
|
||||
break
|
||||
|
||||
|
||||
for(var/direction in cardinal)
|
||||
if(direction&connect_directions)
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,direction))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
if (check_connect_types(target,src))
|
||||
node2 = target
|
||||
connect_directions &= ~direction
|
||||
break
|
||||
if (node2)
|
||||
break
|
||||
|
||||
|
||||
for(var/direction in cardinal)
|
||||
if(direction&connect_directions)
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,direction))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
if (check_connect_types(target,src))
|
||||
node3 = target
|
||||
connect_directions &= ~direction
|
||||
break
|
||||
if (node3)
|
||||
break
|
||||
|
||||
if(!node1 && !node2 && !node3)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if(level == 1 && !T.is_plating()) hide(1)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/visible
|
||||
icon_state = "map"
|
||||
level = 2
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/visible/scrubbers
|
||||
name="Scrubbers pipe manifold"
|
||||
desc = "A manifold composed of scrubbers pipes"
|
||||
icon_state = "map-scrubbers"
|
||||
connect_types = CONNECT_TYPE_SCRUBBER
|
||||
layer = 2.38
|
||||
icon_connect_type = "-scrubbers"
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/visible/supply
|
||||
name="Air supply pipe manifold"
|
||||
desc = "A manifold composed of supply pipes"
|
||||
icon_state = "map-supply"
|
||||
connect_types = CONNECT_TYPE_SUPPLY
|
||||
layer = 2.39
|
||||
icon_connect_type = "-supply"
|
||||
color = PIPE_COLOR_BLUE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/visible/yellow
|
||||
color = PIPE_COLOR_YELLOW
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/visible/cyan
|
||||
color = PIPE_COLOR_CYAN
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/visible/green
|
||||
color = PIPE_COLOR_GREEN
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/visible/black
|
||||
color = PIPE_COLOR_BLACK
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/visible/red
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/visible/blue
|
||||
color = PIPE_COLOR_BLUE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/visible/purple
|
||||
color = PIPE_COLOR_PURPLE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/hidden
|
||||
icon_state = "map"
|
||||
level = 1
|
||||
alpha = 128 //set for the benefit of mapping - this is reset to opaque when the pipe is spawned in game
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers
|
||||
name="Scrubbers pipe manifold"
|
||||
desc = "A manifold composed of scrubbers pipes"
|
||||
icon_state = "map-scrubbers"
|
||||
connect_types = CONNECT_TYPE_SCRUBBER
|
||||
layer = 2.38
|
||||
icon_connect_type = "-scrubbers"
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/hidden/supply
|
||||
name="Air supply pipe manifold"
|
||||
desc = "A manifold composed of supply pipes"
|
||||
icon_state = "map-supply"
|
||||
connect_types = CONNECT_TYPE_SUPPLY
|
||||
layer = 2.39
|
||||
icon_connect_type = "-supply"
|
||||
color = PIPE_COLOR_BLUE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/hidden/yellow
|
||||
color = PIPE_COLOR_YELLOW
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/hidden/cyan
|
||||
color = PIPE_COLOR_CYAN
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/hidden/green
|
||||
color = PIPE_COLOR_GREEN
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/hidden/black
|
||||
color = PIPE_COLOR_BLACK
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/hidden/red
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/hidden/blue
|
||||
color = PIPE_COLOR_BLUE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/hidden/purple
|
||||
color = PIPE_COLOR_PURPLE
|
||||
247
code/ATMOSPHERICS/pipes/manifold4w.dm
Normal file
247
code/ATMOSPHERICS/pipes/manifold4w.dm
Normal file
@@ -0,0 +1,247 @@
|
||||
//
|
||||
// 4-Way Manifold Pipes - 4 way "cross" junction
|
||||
//
|
||||
/obj/machinery/atmospherics/pipe/manifold4w
|
||||
icon = 'icons/atmos/manifold.dmi'
|
||||
icon_state = ""
|
||||
name = "4-way pipe manifold"
|
||||
desc = "A manifold composed of regular pipes"
|
||||
|
||||
volume = ATMOS_DEFAULT_VOLUME_PIPE * 2
|
||||
|
||||
dir = SOUTH
|
||||
initialize_directions = NORTH|SOUTH|EAST|WEST
|
||||
|
||||
var/obj/machinery/atmospherics/node3
|
||||
var/obj/machinery/atmospherics/node4
|
||||
|
||||
level = 1
|
||||
layer = 2.4 //under wires with their 2.44
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/New()
|
||||
..()
|
||||
alpha = 255
|
||||
icon = null
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/pipeline_expansion()
|
||||
return list(node1, node2, node3, node4)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/Destroy()
|
||||
if(node1)
|
||||
node1.disconnect(src)
|
||||
node1 = null
|
||||
if(node2)
|
||||
node2.disconnect(src)
|
||||
node2 = null
|
||||
if(node3)
|
||||
node3.disconnect(src)
|
||||
node3 = null
|
||||
if(node4)
|
||||
node4.disconnect(src)
|
||||
node4 = null
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference == node1)
|
||||
if(istype(node1, /obj/machinery/atmospherics/pipe))
|
||||
qdel(parent)
|
||||
node1 = null
|
||||
|
||||
if(reference == node2)
|
||||
if(istype(node2, /obj/machinery/atmospherics/pipe))
|
||||
qdel(parent)
|
||||
node2 = null
|
||||
|
||||
if(reference == node3)
|
||||
if(istype(node3, /obj/machinery/atmospherics/pipe))
|
||||
qdel(parent)
|
||||
node3 = null
|
||||
|
||||
if(reference == node4)
|
||||
if(istype(node4, /obj/machinery/atmospherics/pipe))
|
||||
qdel(parent)
|
||||
node4 = null
|
||||
|
||||
update_icon()
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/change_color(var/new_color)
|
||||
..()
|
||||
//for updating connected atmos device pipes (i.e. vents, manifolds, etc)
|
||||
if(node1)
|
||||
node1.update_underlays()
|
||||
if(node2)
|
||||
node2.update_underlays()
|
||||
if(node3)
|
||||
node3.update_underlays()
|
||||
if(node4)
|
||||
node4.update_underlays()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/update_icon(var/safety = 0)
|
||||
if(!check_icon_cache())
|
||||
return
|
||||
|
||||
alpha = 255
|
||||
|
||||
overlays.Cut()
|
||||
overlays += icon_manager.get_atmos_icon("manifold", , pipe_color, "4way" + icon_connect_type)
|
||||
overlays += icon_manager.get_atmos_icon("manifold", , , "clamps_4way" + icon_connect_type)
|
||||
underlays.Cut()
|
||||
|
||||
/*
|
||||
var/list/directions = list(NORTH, SOUTH, EAST, WEST)
|
||||
|
||||
|
||||
directions -= add_underlay(node1)
|
||||
directions -= add_underlay(node2)
|
||||
directions -= add_underlay(node3)
|
||||
directions -= add_underlay(node4)
|
||||
|
||||
for(var/D in directions)
|
||||
add_underlay(,D)
|
||||
*/
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
var/list/directions = list(NORTH, SOUTH, EAST, WEST)
|
||||
var/node1_direction = get_dir(src, node1)
|
||||
var/node2_direction = get_dir(src, node2)
|
||||
var/node3_direction = get_dir(src, node3)
|
||||
var/node4_direction = get_dir(src, node4)
|
||||
|
||||
directions -= dir
|
||||
|
||||
directions -= add_underlay(T,node1,node1_direction,icon_connect_type)
|
||||
directions -= add_underlay(T,node2,node2_direction,icon_connect_type)
|
||||
directions -= add_underlay(T,node3,node3_direction,icon_connect_type)
|
||||
directions -= add_underlay(T,node4,node4_direction,icon_connect_type)
|
||||
|
||||
for(var/D in directions)
|
||||
add_underlay(T,,D,icon_connect_type)
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/update_underlays()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/atmos_init()
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,1))
|
||||
if(target.initialize_directions & 2)
|
||||
if (check_connect_types(target,src))
|
||||
node1 = target
|
||||
break
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,2))
|
||||
if(target.initialize_directions & 1)
|
||||
if (check_connect_types(target,src))
|
||||
node2 = target
|
||||
break
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,4))
|
||||
if(target.initialize_directions & 8)
|
||||
if (check_connect_types(target,src))
|
||||
node3 = target
|
||||
break
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,8))
|
||||
if(target.initialize_directions & 4)
|
||||
if (check_connect_types(target,src))
|
||||
node4 = target
|
||||
break
|
||||
|
||||
if(!node1 && !node2 && !node3 && !node4)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if(level == 1 && !T.is_plating()) hide(1)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/visible
|
||||
icon_state = "map_4way"
|
||||
level = 2
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/visible/scrubbers
|
||||
name="4-way scrubbers pipe manifold"
|
||||
desc = "A manifold composed of scrubbers pipes"
|
||||
icon_state = "map_4way-scrubbers"
|
||||
connect_types = CONNECT_TYPE_SCRUBBER
|
||||
layer = 2.38
|
||||
icon_connect_type = "-scrubbers"
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/visible/supply
|
||||
name="4-way air supply pipe manifold"
|
||||
desc = "A manifold composed of supply pipes"
|
||||
icon_state = "map_4way-supply"
|
||||
connect_types = CONNECT_TYPE_SUPPLY
|
||||
layer = 2.39
|
||||
icon_connect_type = "-supply"
|
||||
color = PIPE_COLOR_BLUE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/visible/yellow
|
||||
color = PIPE_COLOR_YELLOW
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/visible/cyan
|
||||
color = PIPE_COLOR_CYAN
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/visible/green
|
||||
color = PIPE_COLOR_GREEN
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/visible/black
|
||||
color = PIPE_COLOR_BLACK
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/visible/red
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/visible/blue
|
||||
color = PIPE_COLOR_BLUE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/visible/purple
|
||||
color = PIPE_COLOR_PURPLE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/hidden
|
||||
icon_state = "map_4way"
|
||||
level = 1
|
||||
alpha = 128 //set for the benefit of mapping - this is reset to opaque when the pipe is spawned in game
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/hidden/scrubbers
|
||||
name="4-way scrubbers pipe manifold"
|
||||
desc = "A manifold composed of scrubbers pipes"
|
||||
icon_state = "map_4way-scrubbers"
|
||||
connect_types = CONNECT_TYPE_SCRUBBER
|
||||
layer = 2.38
|
||||
icon_connect_type = "-scrubbers"
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/hidden/supply
|
||||
name="4-way air supply pipe manifold"
|
||||
desc = "A manifold composed of supply pipes"
|
||||
icon_state = "map_4way-supply"
|
||||
connect_types = CONNECT_TYPE_SUPPLY
|
||||
layer = 2.39
|
||||
icon_connect_type = "-supply"
|
||||
color = PIPE_COLOR_BLUE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/hidden/yellow
|
||||
color = PIPE_COLOR_YELLOW
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/hidden/cyan
|
||||
color = PIPE_COLOR_CYAN
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/hidden/green
|
||||
color = PIPE_COLOR_GREEN
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/hidden/black
|
||||
color = PIPE_COLOR_BLACK
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/hidden/red
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/hidden/blue
|
||||
color = PIPE_COLOR_BLUE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/hidden/purple
|
||||
color = PIPE_COLOR_PURPLE
|
||||
137
code/ATMOSPHERICS/pipes/pipe_base.dm
Normal file
137
code/ATMOSPHERICS/pipes/pipe_base.dm
Normal file
@@ -0,0 +1,137 @@
|
||||
//
|
||||
// Base type of pipes
|
||||
//
|
||||
/obj/machinery/atmospherics/pipe
|
||||
|
||||
var/datum/gas_mixture/air_temporary // used when reconstructing a pipeline that broke
|
||||
var/datum/pipeline/parent
|
||||
var/volume = 0
|
||||
|
||||
layer = 2.4 //under wires with their 2.44
|
||||
use_power = 0
|
||||
|
||||
var/alert_pressure = 80*ONE_ATMOSPHERE
|
||||
//minimum pressure before check_pressure(...) should be called
|
||||
|
||||
can_buckle = 1
|
||||
buckle_require_restraints = 1
|
||||
buckle_lying = -1
|
||||
|
||||
/obj/machinery/atmospherics/pipe/drain_power()
|
||||
return -1
|
||||
|
||||
/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))
|
||||
level = 1
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/hides_under_flooring()
|
||||
return level != 2
|
||||
|
||||
/obj/machinery/atmospherics/pipe/proc/pipeline_expansion()
|
||||
return null
|
||||
|
||||
/obj/machinery/atmospherics/pipe/proc/check_pressure(pressure)
|
||||
//Return 1 if parent should continue checking other pipes
|
||||
//Return null if parent should stop checking other pipes. Recall: qdel(src) will by default return null
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/pipe/return_air()
|
||||
if(!parent)
|
||||
parent = new /datum/pipeline()
|
||||
parent.build_pipeline(src)
|
||||
|
||||
return parent.air
|
||||
|
||||
/obj/machinery/atmospherics/pipe/build_network()
|
||||
if(!parent)
|
||||
parent = new /datum/pipeline()
|
||||
parent.build_pipeline(src)
|
||||
|
||||
return parent.return_network()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
|
||||
if(!parent)
|
||||
parent = new /datum/pipeline()
|
||||
parent.build_pipeline(src)
|
||||
|
||||
return parent.network_expand(new_network, reference)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/return_network(obj/machinery/atmospherics/reference)
|
||||
if(!parent)
|
||||
parent = new /datum/pipeline()
|
||||
parent.build_pipeline(src)
|
||||
|
||||
return parent.return_network(reference)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/Destroy()
|
||||
qdel_null(parent)
|
||||
if(air_temporary)
|
||||
loc.assume_air(air_temporary)
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (istype(src, /obj/machinery/atmospherics/pipe/tank))
|
||||
return ..()
|
||||
|
||||
if(istype(W,/obj/item/device/pipe_painter))
|
||||
return 0
|
||||
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
return ..()
|
||||
var/turf/T = src.loc
|
||||
if (level==1 && isturf(T) && !T.is_plating())
|
||||
to_chat(user, "<span class='warning'>You must remove the plating first.</span>")
|
||||
return 1
|
||||
if(!can_unwrench())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it is too exerted due to internal pressure.</span>")
|
||||
add_fingerprint(user)
|
||||
return 1
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (do_after(user, 40 * W.toolspeed))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
"You hear a ratchet.")
|
||||
new /obj/item/pipe(loc, make_from=src)
|
||||
for (var/obj/machinery/meter/meter in T)
|
||||
if (meter.target == src)
|
||||
new /obj/item/pipe_meter(T)
|
||||
qdel(meter)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/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/color_cache_name(var/obj/machinery/atmospherics/node)
|
||||
if(istype(src, /obj/machinery/atmospherics/pipe/tank))
|
||||
return ..()
|
||||
|
||||
if(istype(node, /obj/machinery/atmospherics/pipe/manifold) || istype(node, /obj/machinery/atmospherics/pipe/manifold4w))
|
||||
if(pipe_color == node.pipe_color)
|
||||
return node.pipe_color
|
||||
else
|
||||
return null
|
||||
else if(istype(node, /obj/machinery/atmospherics/pipe/simple))
|
||||
return node.pipe_color
|
||||
else
|
||||
return pipe_color
|
||||
|
||||
/obj/machinery/atmospherics/pipe/hide(var/i)
|
||||
if(istype(loc, /turf/simulated))
|
||||
invisibility = i ? 101 : 0
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/process()
|
||||
if(!parent) //This should cut back on the overhead calling build_network thousands of times per cycle
|
||||
..()
|
||||
else
|
||||
. = PROCESS_KILL
|
||||
257
code/ATMOSPHERICS/pipes/simple.dm
Normal file
257
code/ATMOSPHERICS/pipes/simple.dm
Normal file
@@ -0,0 +1,257 @@
|
||||
//
|
||||
// Simple Pipes - Just a tube, maybe bent
|
||||
//
|
||||
/obj/machinery/atmospherics/pipe/simple
|
||||
icon = 'icons/atmos/pipes.dmi'
|
||||
icon_state = ""
|
||||
var/pipe_icon = "" //what kind of pipe it is and from which dmi is the icon manager getting its icons, "" for simple pipes, "hepipe" for HE pipes, "hejunction" for HE junctions
|
||||
name = "pipe"
|
||||
desc = "A one meter section of regular pipe"
|
||||
|
||||
volume = ATMOS_DEFAULT_VOLUME_PIPE
|
||||
|
||||
dir = SOUTH
|
||||
initialize_directions = SOUTH|NORTH
|
||||
|
||||
var/minimum_temperature_difference = 300
|
||||
var/thermal_conductivity = 0 //WALL_HEAT_TRANSFER_COEFFICIENT No
|
||||
|
||||
var/maximum_pressure = 70*ONE_ATMOSPHERE
|
||||
var/fatigue_pressure = 55*ONE_ATMOSPHERE
|
||||
alert_pressure = 55*ONE_ATMOSPHERE
|
||||
|
||||
level = 1
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/New()
|
||||
..()
|
||||
|
||||
// Pipe colors and icon states are handled by an image cache - so color and icon should
|
||||
// be null. For mapping purposes color is defined in the object definitions.
|
||||
icon = null
|
||||
alpha = 255
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/check_pressure(pressure)
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
var/pressure_difference = pressure - environment.return_pressure()
|
||||
|
||||
if(pressure_difference > maximum_pressure)
|
||||
burst()
|
||||
|
||||
else if(pressure_difference > fatigue_pressure)
|
||||
//TODO: leak to turf, doing pfshhhhh
|
||||
if(prob(5))
|
||||
burst()
|
||||
|
||||
else return 1
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/init_dir()
|
||||
switch(dir)
|
||||
if(SOUTH || NORTH)
|
||||
initialize_directions = SOUTH|NORTH
|
||||
if(EAST || WEST)
|
||||
initialize_directions = EAST|WEST
|
||||
if(NORTHEAST)
|
||||
initialize_directions = NORTH|EAST
|
||||
if(NORTHWEST)
|
||||
initialize_directions = NORTH|WEST
|
||||
if(SOUTHEAST)
|
||||
initialize_directions = SOUTH|EAST
|
||||
if(SOUTHWEST)
|
||||
initialize_directions = SOUTH|WEST
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/proc/burst()
|
||||
src.visible_message("<span class='danger'>\The [src] bursts!</span>");
|
||||
playsound(src.loc, 'sound/effects/bang.ogg', 25, 1)
|
||||
var/datum/effect/effect/system/smoke_spread/smoke = new
|
||||
smoke.set_up(1,0, src.loc, 0)
|
||||
smoke.start()
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/proc/normalize_dir()
|
||||
if(dir==3)
|
||||
set_dir(1)
|
||||
else if(dir==12)
|
||||
set_dir(4)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/Destroy()
|
||||
if(node1)
|
||||
node1.disconnect(src)
|
||||
node1 = null
|
||||
if(node2)
|
||||
node2.disconnect(src)
|
||||
node1 = null
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/pipeline_expansion()
|
||||
return list(node1, node2)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/change_color(var/new_color)
|
||||
..()
|
||||
//for updating connected atmos device pipes (i.e. vents, manifolds, etc)
|
||||
if(node1)
|
||||
node1.update_underlays()
|
||||
if(node2)
|
||||
node2.update_underlays()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/update_icon(var/safety = 0)
|
||||
if(!check_icon_cache())
|
||||
return
|
||||
|
||||
alpha = 255
|
||||
|
||||
overlays.Cut()
|
||||
|
||||
if(node1 && node2)
|
||||
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]intact[icon_connect_type]")
|
||||
else
|
||||
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "[pipe_icon]exposed[node1?1:0][node2?1:0][icon_connect_type]")
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/update_underlays()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/atmos_init()
|
||||
normalize_dir()
|
||||
var/node1_dir
|
||||
var/node2_dir
|
||||
|
||||
for(var/direction in cardinal)
|
||||
if(direction&initialize_directions)
|
||||
if (!node1_dir)
|
||||
node1_dir = direction
|
||||
else if (!node2_dir)
|
||||
node2_dir = direction
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node1_dir))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
if (check_connect_types(target,src))
|
||||
node1 = target
|
||||
break
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node2_dir))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
if (check_connect_types(target,src))
|
||||
node2 = target
|
||||
break
|
||||
|
||||
if(!node1 && !node2)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
var/turf/T = loc
|
||||
if(level == 1 && !T.is_plating()) hide(1)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference == node1)
|
||||
if(istype(node1, /obj/machinery/atmospherics/pipe))
|
||||
qdel(parent)
|
||||
node1 = null
|
||||
|
||||
if(reference == node2)
|
||||
if(istype(node2, /obj/machinery/atmospherics/pipe))
|
||||
qdel(parent)
|
||||
node2 = null
|
||||
|
||||
update_icon()
|
||||
|
||||
return null
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible
|
||||
icon_state = "intact"
|
||||
level = 2
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/scrubbers
|
||||
name = "Scrubbers pipe"
|
||||
desc = "A one meter section of scrubbers pipe"
|
||||
icon_state = "intact-scrubbers"
|
||||
connect_types = CONNECT_TYPE_SCRUBBER
|
||||
layer = 2.38
|
||||
icon_connect_type = "-scrubbers"
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/supply
|
||||
name = "Air supply pipe"
|
||||
desc = "A one meter section of supply pipe"
|
||||
icon_state = "intact-supply"
|
||||
connect_types = CONNECT_TYPE_SUPPLY
|
||||
layer = 2.39
|
||||
icon_connect_type = "-supply"
|
||||
color = PIPE_COLOR_BLUE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/yellow
|
||||
color = PIPE_COLOR_YELLOW
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/cyan
|
||||
color = PIPE_COLOR_CYAN
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/green
|
||||
color = PIPE_COLOR_GREEN
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/black
|
||||
color = PIPE_COLOR_BLACK
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/red
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/blue
|
||||
color = PIPE_COLOR_BLUE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/purple
|
||||
color = PIPE_COLOR_PURPLE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden
|
||||
icon_state = "intact"
|
||||
level = 1
|
||||
alpha = 128 //set for the benefit of mapping - this is reset to opaque when the pipe is spawned in game
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers
|
||||
name = "Scrubbers pipe"
|
||||
desc = "A one meter section of scrubbers pipe"
|
||||
icon_state = "intact-scrubbers"
|
||||
connect_types = CONNECT_TYPE_SCRUBBER
|
||||
layer = 2.38
|
||||
icon_connect_type = "-scrubbers"
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/supply
|
||||
name = "Air supply pipe"
|
||||
desc = "A one meter section of supply pipe"
|
||||
icon_state = "intact-supply"
|
||||
connect_types = CONNECT_TYPE_SUPPLY
|
||||
layer = 2.39
|
||||
icon_connect_type = "-supply"
|
||||
color = PIPE_COLOR_BLUE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/yellow
|
||||
color = PIPE_COLOR_YELLOW
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/cyan
|
||||
color = PIPE_COLOR_CYAN
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/green
|
||||
color = PIPE_COLOR_GREEN
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/black
|
||||
color = PIPE_COLOR_BLACK
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/red
|
||||
color = PIPE_COLOR_RED
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/blue
|
||||
color = PIPE_COLOR_BLUE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/purple
|
||||
color = PIPE_COLOR_PURPLE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/insulated
|
||||
icon = 'icons/obj/atmospherics/red_pipe.dmi'
|
||||
icon_state = "intact"
|
||||
|
||||
minimum_temperature_difference = 10000
|
||||
thermal_conductivity = 0
|
||||
maximum_pressure = 1000*ONE_ATMOSPHERE
|
||||
fatigue_pressure = 900*ONE_ATMOSPHERE
|
||||
alert_pressure = 900*ONE_ATMOSPHERE
|
||||
|
||||
level = 2
|
||||
160
code/ATMOSPHERICS/pipes/tank.dm
Normal file
160
code/ATMOSPHERICS/pipes/tank.dm
Normal file
@@ -0,0 +1,160 @@
|
||||
//
|
||||
// Tanks - These are implemented as pipes with large volume
|
||||
//
|
||||
/obj/machinery/atmospherics/pipe/tank
|
||||
icon = 'icons/atmos/tank.dmi'
|
||||
icon_state = "air_map"
|
||||
|
||||
name = "Pressure Tank"
|
||||
desc = "A large vessel containing pressurized gas."
|
||||
|
||||
volume = 10000 //in liters, 1 meters by 1 meters by 2 meters ~tweaked it a little to simulate a pressure tank without needing to recode them yet
|
||||
var/start_pressure = 25*ONE_ATMOSPHERE
|
||||
|
||||
level = 1
|
||||
dir = SOUTH
|
||||
initialize_directions = SOUTH
|
||||
density = 1
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/New()
|
||||
icon_state = "air"
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/init_dir()
|
||||
initialize_directions = dir
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/Destroy()
|
||||
if(node1)
|
||||
node1.disconnect(src)
|
||||
node1 = null
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/pipeline_expansion()
|
||||
return list(node1)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/update_underlays()
|
||||
if(..())
|
||||
underlays.Cut()
|
||||
var/turf/T = get_turf(src)
|
||||
if(!istype(T))
|
||||
return
|
||||
add_underlay(T, node1, dir)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/hide()
|
||||
update_underlays()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/atmos_init()
|
||||
var/connect_direction = dir
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,connect_direction))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
if (check_connect_types(target,src))
|
||||
node1 = target
|
||||
break
|
||||
|
||||
update_underlays()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference == node1)
|
||||
if(istype(node1, /obj/machinery/atmospherics/pipe))
|
||||
qdel(parent)
|
||||
node1 = null
|
||||
|
||||
update_underlays()
|
||||
|
||||
return null
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/attackby(var/obj/item/W as obj, var/mob/user as mob)
|
||||
if(istype(W, /obj/item/device/pipe_painter))
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/device/analyzer) && in_range(user, src))
|
||||
var/obj/item/device/analyzer/A = W
|
||||
A.analyze_gases(src, user)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/air
|
||||
name = "Pressure Tank (Air)"
|
||||
icon_state = "air_map"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/air/New()
|
||||
air_temporary = new
|
||||
air_temporary.volume = volume
|
||||
air_temporary.temperature = T20C
|
||||
|
||||
air_temporary.adjust_multi("oxygen", (start_pressure*O2STANDARD)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature), \
|
||||
"nitrogen",(start_pressure*N2STANDARD)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature))
|
||||
|
||||
|
||||
..()
|
||||
icon_state = "air"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/oxygen
|
||||
name = "Pressure Tank (Oxygen)"
|
||||
icon_state = "o2_map"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/oxygen/New()
|
||||
air_temporary = new
|
||||
air_temporary.volume = volume
|
||||
air_temporary.temperature = T20C
|
||||
|
||||
air_temporary.adjust_gas("oxygen", (start_pressure)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature))
|
||||
|
||||
..()
|
||||
icon_state = "o2"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/nitrogen
|
||||
name = "Pressure Tank (Nitrogen)"
|
||||
icon_state = "n2_map"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/nitrogen/New()
|
||||
air_temporary = new
|
||||
air_temporary.volume = volume
|
||||
air_temporary.temperature = T20C
|
||||
|
||||
air_temporary.adjust_gas("nitrogen", (start_pressure)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature))
|
||||
|
||||
..()
|
||||
icon_state = "n2"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/carbon_dioxide
|
||||
name = "Pressure Tank (Carbon Dioxide)"
|
||||
icon_state = "co2_map"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/carbon_dioxide/New()
|
||||
air_temporary = new
|
||||
air_temporary.volume = volume
|
||||
air_temporary.temperature = T20C
|
||||
|
||||
air_temporary.adjust_gas("carbon_dioxide", (start_pressure)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature))
|
||||
|
||||
..()
|
||||
icon_state = "co2"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/phoron
|
||||
name = "Pressure Tank (Phoron)"
|
||||
icon_state = "phoron_map"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/phoron/New()
|
||||
air_temporary = new
|
||||
air_temporary.volume = volume
|
||||
air_temporary.temperature = T20C
|
||||
|
||||
air_temporary.adjust_gas("phoron", (start_pressure)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature))
|
||||
|
||||
..()
|
||||
icon_state = "phoron"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/nitrous_oxide
|
||||
name = "Pressure Tank (Nitrous Oxide)"
|
||||
icon_state = "n2o_map"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/tank/nitrous_oxide/New()
|
||||
air_temporary = new
|
||||
air_temporary.volume = volume
|
||||
air_temporary.temperature = T0C
|
||||
|
||||
air_temporary.adjust_gas("sleeping_agent", (start_pressure)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature))
|
||||
|
||||
..()
|
||||
icon_state = "n2o"
|
||||
102
code/ATMOSPHERICS/pipes/universal.dm
Normal file
102
code/ATMOSPHERICS/pipes/universal.dm
Normal file
@@ -0,0 +1,102 @@
|
||||
//
|
||||
// Universal Pipe Adapter - Designed for connecting scrubbers, normal, and supply pipes together.
|
||||
//
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/universal
|
||||
name="Universal pipe adapter"
|
||||
desc = "An adapter for regular, supply and scrubbers pipes"
|
||||
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SUPPLY|CONNECT_TYPE_SCRUBBER
|
||||
icon_state = "map_universal"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/universal/update_icon(var/safety = 0)
|
||||
if(!check_icon_cache())
|
||||
return
|
||||
|
||||
alpha = 255
|
||||
|
||||
overlays.Cut()
|
||||
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "universal")
|
||||
underlays.Cut()
|
||||
|
||||
if (node1)
|
||||
universal_underlays(node1)
|
||||
if(node2)
|
||||
universal_underlays(node2)
|
||||
else
|
||||
var/node1_dir = get_dir(node1,src)
|
||||
universal_underlays(,node1_dir)
|
||||
else if (node2)
|
||||
universal_underlays(node2)
|
||||
else
|
||||
universal_underlays(,dir)
|
||||
universal_underlays(dir, -180)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/universal/update_underlays()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/universal
|
||||
name="Universal pipe adapter"
|
||||
desc = "An adapter for regular, supply and scrubbers pipes"
|
||||
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SUPPLY|CONNECT_TYPE_SCRUBBER
|
||||
icon_state = "map_universal"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/universal/update_icon(var/safety = 0)
|
||||
if(!check_icon_cache())
|
||||
return
|
||||
|
||||
alpha = 255
|
||||
|
||||
overlays.Cut()
|
||||
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "universal")
|
||||
underlays.Cut()
|
||||
|
||||
if (node1)
|
||||
universal_underlays(node1)
|
||||
if(node2)
|
||||
universal_underlays(node2)
|
||||
else
|
||||
var/node2_dir = turn(get_dir(src,node1),-180)
|
||||
universal_underlays(,node2_dir)
|
||||
else if (node2)
|
||||
universal_underlays(node2)
|
||||
var/node1_dir = turn(get_dir(src,node2),-180)
|
||||
universal_underlays(,node1_dir)
|
||||
else
|
||||
universal_underlays(,dir)
|
||||
universal_underlays(,turn(dir, -180))
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/universal/update_underlays()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/proc/universal_underlays(var/obj/machinery/atmospherics/node, var/direction)
|
||||
var/turf/T = loc
|
||||
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.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)
|
||||
else
|
||||
underlays += icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "retracted" + icon_connect_type)
|
||||
83
code/ATMOSPHERICS/pipes/vent.dm
Normal file
83
code/ATMOSPHERICS/pipes/vent.dm
Normal file
@@ -0,0 +1,83 @@
|
||||
//
|
||||
// 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
|
||||
|
||||
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_step(src,connect_direction))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
if (check_connect_types(target,src))
|
||||
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(var/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"
|
||||
Reference in New Issue
Block a user