[MIRROR] Set different layers to different piping layers (#686)

* Merge pull request #53397 from Dennok/patch-40

Set different layers to different piping layers
different layers to different piping layers
pipes should be displayed in a fixed order
better pipe visuals

* Set different layers to different piping layers

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
This commit is contained in:
SkyratBot
2020-09-07 04:51:21 +01:00
committed by GitHub
co-authored by LemonInTheDark
parent 18c6f0906b
commit d489a8bb47
4 changed files with 10 additions and 4 deletions
+1
View File
@@ -350,6 +350,7 @@
//MULTIPIPES
//IF YOU EVER CHANGE THESE CHANGE SPRITES TO MATCH.
//layer = initial(layer) + piping_layer / 1000 in atmospherics/update_icon() to determine order of pipe overlap
#define PIPING_LAYER_MIN 1
#define PIPING_LAYER_MAX 5
#define PIPING_LAYER_DEFAULT 3
+3 -3
View File
@@ -33,12 +33,12 @@
#define ABOVE_NORMAL_TURF_LAYER 2.08
#define LATTICE_LAYER 2.2
#define DISPOSAL_PIPE_LAYER 2.3
#define GAS_PIPE_HIDDEN_LAYER 2.35
#define GAS_PIPE_HIDDEN_LAYER 2.35 //layer = initial(layer) + piping_layer / 1000 in atmospherics/update_icon() to determine order of pipe overlap
#define WIRE_LAYER 2.4
#define WIRE_BRIDGE_LAYER 2.44
#define WIRE_TERMINAL_LAYER 2.45
#define GAS_SCRUBBER_LAYER 2.46
#define GAS_PIPE_VISIBLE_LAYER 2.47
#define GAS_SCRUBBER_LAYER 2.46
#define GAS_PIPE_VISIBLE_LAYER 2.47 //layer = initial(layer) + piping_layer / 1000 in atmospherics/update_icon() to determine order of pipe overlap
#define GAS_FILTER_LAYER 2.48
#define GAS_PUMP_LAYER 2.49
#define LOW_OBJ_LAYER 2.5
@@ -126,6 +126,10 @@
piping_layer = (pipe_flags & PIPING_DEFAULT_LAYER_ONLY) ? PIPING_LAYER_DEFAULT : new_layer
update_icon()
/obj/machinery/atmospherics/update_icon()
layer = initial(layer) + piping_layer / 1000
return ..()
/obj/machinery/atmospherics/proc/can_be_node(obj/machinery/atmospherics/target, iteration)
return connection_check(target, piping_layer)
@@ -45,7 +45,7 @@
plane = showpipe ? GAME_PLANE : FLOOR_PLANE
if(!showpipe)
return
return ..()
var/connected = 0 //Direction bitset
@@ -62,6 +62,7 @@
if(!shift_underlay_only)
PIPING_LAYER_SHIFT(src, piping_layer)
return ..()
/obj/machinery/atmospherics/components/proc/get_pipe_underlay(state, dir, color = null)
if(color)