Merge branch 'master' into upstream-merge-6344

This commit is contained in:
Novacat
2019-07-30 19:52:24 -04:00
committed by GitHub
100 changed files with 2891 additions and 2179 deletions

View File

@@ -67,8 +67,22 @@
return
update_icon()
handle_leaking()
return
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/set_leaking(var/new_leaking) // They already process, no need for manual processing toggles.
if(new_leaking && !leaking)
leaking = TRUE
if(parent)
parent.leaks |= src
if(parent.network)
parent.network.leaks |= src
else if (!new_leaking && leaking)
leaking = FALSE
if(parent)
parent.leaks -= src
if(parent.network)
parent.network.leaks -= src
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/process()
if(!parent)
@@ -180,4 +194,5 @@
return
update_icon()
handle_leaking()
return

View File

@@ -0,0 +1,2 @@
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/set_leaking(var/new_leaking)
return //Nope

View File

@@ -68,11 +68,10 @@
node3 = null
update_icon()
handle_leaking()
..()
<<<<<<< HEAD
=======
/obj/machinery/atmospherics/pipe/manifold/handle_leaking()
if(node1 && node2 && node3)
set_leaking(FALSE)
@@ -87,7 +86,6 @@
else
. = PROCESS_KILL
>>>>>>> 31518fe... Merge pull request #6344 from Mechoid/ManifoldLeaking
/obj/machinery/atmospherics/pipe/manifold/change_color(var/new_color)
..()
//for updating connected atmos device pipes (i.e. vents, manifolds, etc)
@@ -171,6 +169,7 @@
var/turf/T = get_turf(src)
if(level == 1 && !T.is_plating()) hide(1)
update_icon()
handle_leaking()
/obj/machinery/atmospherics/pipe/manifold/visible
icon_state = "map"

View File

@@ -66,11 +66,10 @@
node4 = null
update_icon()
handle_leaking()
..()
<<<<<<< HEAD
=======
/obj/machinery/atmospherics/pipe/manifold4w/handle_leaking()
if(node1 && node2 && node3 && node4)
set_leaking(FALSE)
@@ -85,7 +84,6 @@
else
. = PROCESS_KILL
>>>>>>> 31518fe... Merge pull request #6344 from Mechoid/ManifoldLeaking
/obj/machinery/atmospherics/pipe/manifold4w/change_color(var/new_color)
..()
//for updating connected atmos device pipes (i.e. vents, manifolds, etc)
@@ -173,6 +171,7 @@
var/turf/T = get_turf(src)
if(level == 1 && !T.is_plating()) hide(1)
update_icon()
handle_leaking()
/obj/machinery/atmospherics/pipe/manifold4w/visible
icon_state = "map_4way"

View File

@@ -6,6 +6,7 @@
var/datum/gas_mixture/air_temporary // used when reconstructing a pipeline that broke
var/datum/pipeline/parent
var/volume = 0
var/leaking = FALSE // Do not set directly, use set_leaking(TRUE/FALSE)
layer = PIPES_LAYER
use_power = 0
@@ -13,6 +14,7 @@
pipe_flags = 0 // Does not have PIPING_DEFAULT_LAYER_ONLY flag.
var/alert_pressure = 80*ONE_ATMOSPHERE
var/in_stasis = FALSE
//minimum pressure before check_pressure(...) should be called
can_buckle = 1
@@ -30,6 +32,31 @@
/obj/machinery/atmospherics/pipe/hides_under_flooring()
return level != 2
/obj/machinery/atmospherics/pipe/proc/set_leaking(var/new_leaking)
if(new_leaking && !leaking)
if(!speed_process)
START_MACHINE_PROCESSING(src)
else
START_PROCESSING(SSfastprocess, src)
leaking = TRUE
if(parent)
parent.leaks |= src
if(parent.network)
parent.network.leaks |= src
else if (!new_leaking && leaking)
if(!speed_process)
STOP_MACHINE_PROCESSING(src)
else
STOP_PROCESSING(SSfastprocess, src)
leaking = FALSE
if(parent)
parent.leaks -= src
if(parent.network)
parent.network.leaks -= src
/obj/machinery/atmospherics/pipe/proc/handle_leaking() // Used specifically to update leaking status on different pipes.
return
/obj/machinery/atmospherics/pipe/proc/pipeline_expansion()
return null

View File

@@ -0,0 +1,2 @@
/obj/machinery/atmospherics/pipe/set_leaking(var/new_leaking)
return // N O P E

View File

@@ -1,6 +1,6 @@
//
// Simple Pipes - Just a tube, maybe bent
//
//
/obj/machinery/atmospherics/pipe/simple
icon = 'icons/atmos/pipes.dmi'
icon_state = ""
@@ -34,6 +34,14 @@
icon = null
alpha = 255
/obj/machinery/atmospherics/pipe/simple/process()
if(!parent)
..()
else if(leaking)
parent.mingle_with_turf(loc, volume)
else
. = PROCESS_KILL
/obj/machinery/atmospherics/pipe/simple/check_pressure(pressure)
var/datum/gas_mixture/environment = loc.return_air()
@@ -147,6 +155,7 @@
var/turf/T = loc
if(level == 1 && !T.is_plating()) hide(1)
update_icon()
handle_leaking()
/obj/machinery/atmospherics/pipe/simple/disconnect(obj/machinery/atmospherics/reference)
if(reference == node1)
@@ -160,9 +169,16 @@
node2 = null
update_icon()
handle_leaking()
return null
/obj/machinery/atmospherics/pipe/simple/handle_leaking()
if(node1 && node2)
set_leaking(FALSE)
else
set_leaking(TRUE)
/obj/machinery/atmospherics/pipe/simple/visible
icon_state = "intact"
level = 2

View File

@@ -48,7 +48,7 @@
construction_type = /obj/item/pipe/binary
pipe_state = "universal"
/obj/machinery/atmospherics/pipe/simple/hidden/universal/update_icon(var/safety = 0)
/obj/machinery/atmospherics/pipe/simple/hidden/universal/update_icon(var/safety = 0) // Doesn't leak. It's a special pipe.
if(!check_icon_cache())
return