diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index b0586744480..b86a68ce9a0 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -13,9 +13,18 @@ #define AREA_PLANE 1 -#define SPACE_LAYER 1.8 -#define GRASS_UNDER_LAYER 1.9 +#define SPACE_LAYER 1.5 +#define GRASS_UNDER_LAYER 1.6 +#define PLATING_LAYER 1.7 +#define LATTICE_LAYER 1.701 +#define DISPOSAL_PIPE_LAYER 1.71 +#define GAS_PIPE_HIDDEN_LAYER 1.72 +#define WIRE_LAYER 1.73 +#define WIRE_TERMINAL_LAYER 1.75 +#define ABOVE_PLATING_LAYER 1.76 // generic for /obj/hide //#define TURF_LAYER 2 //For easy recordkeeping; this is a byond define +#define TRANSPARENT_TURF_LAYER 2 +#define ABOVE_TRANSPARENT_TURF_LAYER 2.01 // put wire terminals here if T.transparent_floor #define MID_TURF_LAYER 2.02 #define HIGH_TURF_LAYER 2.03 #define TURF_PLATING_DECAL_LAYER 2.031 @@ -25,16 +34,12 @@ #define BULLET_HOLE_LAYER 2.06 #define ABOVE_NORMAL_TURF_LAYER 2.08 #define ABOVE_ICYOVERLAY_LAYER 2.11 -#define LATTICE_LAYER 2.2 -#define DISPOSAL_PIPE_LAYER 2.3 -#define GAS_PIPE_HIDDEN_LAYER 2.35 -#define WIRE_LAYER 2.4 -#define TRANSPARENT_TURF_LAYER 2.41 -#define WIRE_TERMINAL_LAYER 2.45 -#define GAS_SCRUBBER_LAYER 2.46 +#define GAS_SCRUBBER_OFFSET -0.001 #define GAS_PIPE_VISIBLE_LAYER 2.47 -#define GAS_FILTER_LAYER 2.48 -#define GAS_PUMP_LAYER 2.49 +#define GAS_PIPE_SCRUB_OFFSET 0.001 +#define GAS_PIPE_SUPPLY_OFFSET 0.002 +#define GAS_FILTER_OFFSET 0.003 +#define GAS_PUMP_OFFSET 0.004 #define HOLOPAD_LAYER 2.491 #define CONVEYOR_LAYER 2.495 #define LOW_OBJ_LAYER 2.5 diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index f9e4bef38fb..f16683d709d 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -373,7 +373,8 @@ GLOBAL_LIST_EMPTY(safes) icon_state = "floorsafe" density = FALSE level = 1 //Under the floor - layer = LOW_OBJ_LAYER + plane = FLOOR_PLANE + layer = ABOVE_PLATING_LAYER drill_x_offset = -1 drill_y_offset = 20 diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 0306e51c9ac..846d82883b1 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -139,19 +139,23 @@ GLOBAL_LIST_INIT(icons_to_ignore_at_floor_init, list("damaged1","damaged2","dama var/old_icon = icon_regular_floor var/old_plating = icon_plating var/old_dir = dir + var/old_transparent_floor = transparent_floor var/turf/simulated/floor/W = ..() var/obj/machinery/atmospherics/R + var/obj/machinery/power/terminal/term if(keep_icon) W.icon_regular_floor = old_icon W.icon_plating = old_plating if(W.keep_dir) W.dir = old_dir - if(W.transparent_floor) + if(W.transparent_floor != old_transparent_floor) for(R in W) R.update_icon() + for(term in W) + term.update_icon() for(R in W) R.update_underlays() W.update_icon() diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index 446a1d6c1cb..0a2e18656be 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -12,6 +12,7 @@ clawfootstep = FOOTSTEP_HARD_CLAW heavyfootstep = FOOTSTEP_GENERIC_HEAVY smoothing_groups = list(SMOOTH_GROUP_TURF) + layer = PLATING_LAYER /turf/simulated/floor/plating/Initialize(mapload) . = ..() diff --git a/code/modules/atmospherics/machinery/atmospherics.dm b/code/modules/atmospherics/machinery/atmospherics.dm index 0846bb2aef0..d5c5ebf3218 100644 --- a/code/modules/atmospherics/machinery/atmospherics.dm +++ b/code/modules/atmospherics/machinery/atmospherics.dm @@ -10,7 +10,6 @@ Pipelines + Other Objects -> Pipe network */ /obj/machinery/atmospherics anchored = TRUE - layer = GAS_PIPE_HIDDEN_LAYER //under wires resistance_flags = FIRE_PROOF max_integrity = 200 plane = GAME_PLANE @@ -19,6 +18,9 @@ Pipelines + Other Objects -> Pipe network on_blueprints = TRUE armor = list(MELEE = 25, BULLET = 10, LASER = 10, ENERGY = 100, BOMB = 0, BIO = 100, RAD = 100, FIRE = 100, ACID = 70) + layer = GAS_PIPE_HIDDEN_LAYER //under wires + var/layer_offset = 0.0 // generic over VISIBLE and HIDDEN, should be less than 0.01, or you'll reorder non-pipe things + /// Can this be unwrenched? var/can_unwrench = FALSE /// If the machine is currently operating or not. @@ -84,14 +86,13 @@ Pipelines + Other Objects -> Pipe network ..(UPDATE_ICON_STATE) /obj/machinery/atmospherics/update_icon_state() - var/turf/T = get_turf(loc) - if(T && T.transparent_floor) - plane = FLOOR_PLANE - else - if(!T || level == 2 || !T.intact) - plane = GAME_PLANE - else + switch(level) + if(1) plane = FLOOR_PLANE + layer = GAS_PIPE_HIDDEN_LAYER + layer_offset + if(2) + plane = GAME_PLANE + layer = GAS_PIPE_VISIBLE_LAYER + layer_offset /obj/machinery/atmospherics/proc/update_pipe_image() pipe_image = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir) //the 20 puts it above Byond's darkness (not its opacity view) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/binary_atmos_base.dm b/code/modules/atmospherics/machinery/components/binary_devices/binary_atmos_base.dm index 12360e6a1ed..9ea2faff551 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/binary_atmos_base.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/binary_atmos_base.dm @@ -3,7 +3,8 @@ initialize_directions = SOUTH|NORTH power_state = IDLE_POWER_USE - layer = GAS_PUMP_LAYER + layer = GAS_PIPE_VISIBLE_LAYER + GAS_PUMP_OFFSET + layer_offset = GAS_PUMP_OFFSET var/datum/gas_mixture/air1 var/datum/gas_mixture/air2 diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/trinary_base.dm b/code/modules/atmospherics/machinery/components/trinary_devices/trinary_base.dm index 748f9af726e..f39509482c8 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/trinary_base.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/trinary_base.dm @@ -3,7 +3,8 @@ initialize_directions = SOUTH|NORTH|WEST power_state = IDLE_POWER_USE - layer = GAS_FILTER_LAYER + layer = GAS_PIPE_VISIBLE_LAYER + GAS_FILTER_OFFSET + layer_offset = GAS_FILTER_OFFSET var/datum/gas_mixture/air1 var/datum/gas_mixture/air2 diff --git a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm index 72a42cc90dc..d347543b658 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm @@ -4,7 +4,8 @@ GLOBAL_LIST_EMPTY(air_injectors) icon = 'icons/atmos/injector.dmi' icon_state = "map_injector" power_state = IDLE_POWER_USE - layer = GAS_SCRUBBER_LAYER + layer = GAS_PIPE_VISIBLE_LAYER + GAS_SCRUBBER_OFFSET + layer_offset = GAS_SCRUBBER_OFFSET resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF //really helpful in building gas chambers for xenomorphs diff --git a/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm b/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm index fe2eb971191..df5daac3548 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm @@ -2,7 +2,8 @@ icon = 'icons/atmos/vent_pump.dmi' icon_state = "map_vent" plane = FLOOR_PLANE - layer = GAS_SCRUBBER_LAYER + layer = GAS_PIPE_VISIBLE_LAYER + 0.004 + layer_offset = 0.004 name = "passive vent" desc = "A large air vent" diff --git a/code/modules/atmospherics/machinery/components/unary_devices/portables_connector.dm b/code/modules/atmospherics/machinery/components/unary_devices/portables_connector.dm index db0036228d7..fa4a608c1e1 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/portables_connector.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/portables_connector.dm @@ -6,7 +6,8 @@ desc = "For connecting portables devices related to atmospherics control." can_unwrench = TRUE - layer = GAS_FILTER_LAYER + layer = GAS_PIPE_VISIBLE_LAYER + GAS_FILTER_OFFSET + layer_offset = GAS_FILTER_OFFSET var/obj/machinery/atmospherics/portable/connected_device diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm index 26c503ce80e..8ce39bbf722 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm @@ -10,7 +10,8 @@ desc = "Has a valve and pump attached to it" power_state = IDLE_POWER_USE plane = FLOOR_PLANE - layer = GAS_SCRUBBER_LAYER + layer = GAS_PIPE_VISIBLE_LAYER + GAS_SCRUBBER_OFFSET + layer_offset = GAS_SCRUBBER_OFFSET can_unwrench = TRUE var/open = FALSE diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm index 1af728345e2..086150cdf05 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm @@ -4,7 +4,8 @@ name = "air scrubber" desc = "Has a valve and pump attached to it" - layer = GAS_SCRUBBER_LAYER + layer = GAS_PIPE_VISIBLE_LAYER + GAS_SCRUBBER_OFFSET + layer_offset = GAS_SCRUBBER_OFFSET plane = FLOOR_PLANE power_state = ACTIVE_POWER_USE idle_power_consumption = 10 diff --git a/code/modules/atmospherics/machinery/other/meter.dm b/code/modules/atmospherics/machinery/other/meter.dm index d29c3d12ba0..899b998d885 100644 --- a/code/modules/atmospherics/machinery/other/meter.dm +++ b/code/modules/atmospherics/machinery/other/meter.dm @@ -5,7 +5,8 @@ GLOBAL_LIST_EMPTY(gas_meters) desc = "A gas flow meter" icon = 'icons/obj/meter.dmi' icon_state = "meterX" - layer = GAS_PUMP_LAYER + layer = GAS_PIPE_VISIBLE_LAYER + GAS_PUMP_OFFSET + layer_offset = GAS_PUMP_OFFSET anchored = TRUE max_integrity = 150 armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 100, BOMB = 0, BIO = 100, RAD = 100, FIRE = 40, ACID = 0) diff --git a/code/modules/atmospherics/machinery/pipes/cap.dm b/code/modules/atmospherics/machinery/pipes/cap.dm index 41500f0a75c..1632e2280f6 100644 --- a/code/modules/atmospherics/machinery/pipes/cap.dm +++ b/code/modules/atmospherics/machinery/pipes/cap.dm @@ -83,13 +83,16 @@ /obj/machinery/atmospherics/pipe/cap/visible level = 2 icon_state = "cap" + plane = GAME_PLANE + layer = GAS_PIPE_VISIBLE_LAYER /obj/machinery/atmospherics/pipe/cap/visible/scrubbers name = "scrubbers pipe endcap" desc = "An endcap for scrubbers pipes" icon_state = "cap-scrubbers" connect_types = list(CONNECT_TYPE_SCRUBBER) - layer = 2.38 + layer = GAS_PIPE_VISIBLE_LAYER + GAS_PIPE_SCRUB_OFFSET + layer_offset = GAS_PIPE_SCRUB_OFFSET icon_connect_type = "-scrubbers" color = PIPE_COLOR_RED @@ -98,7 +101,8 @@ desc = "An endcap for supply pipes" icon_state = "cap-supply" connect_types = list(CONNECT_TYPE_SUPPLY) - layer = 2.39 + layer = GAS_PIPE_VISIBLE_LAYER + GAS_PIPE_SUPPLY_OFFSET + layer_offset = GAS_PIPE_SUPPLY_OFFSET icon_connect_type = "-supply" color = PIPE_COLOR_BLUE @@ -106,13 +110,16 @@ level = 1 icon_state = "cap" alpha = 128 + plane = FLOOR_PLANE + layer = GAS_PIPE_HIDDEN_LAYER /obj/machinery/atmospherics/pipe/cap/hidden/scrubbers name = "scrubbers pipe endcap" desc = "An endcap for scrubbers pipes" icon_state = "cap-scrubbers" connect_types = list(CONNECT_TYPE_SCRUBBER) - layer = 2.38 + layer = GAS_PIPE_HIDDEN_LAYER + GAS_PIPE_SCRUB_OFFSET + layer_offset = GAS_PIPE_SCRUB_OFFSET icon_connect_type = "-scrubbers" color = PIPE_COLOR_RED @@ -121,6 +128,7 @@ desc = "An endcap for supply pipes" icon_state = "cap-supply" connect_types = list(CONNECT_TYPE_SUPPLY) - layer = 2.39 + layer = GAS_PIPE_HIDDEN_LAYER + GAS_PIPE_SUPPLY_OFFSET + layer_offset = GAS_PIPE_SUPPLY_OFFSET icon_connect_type = "-supply" color = PIPE_COLOR_BLUE diff --git a/code/modules/atmospherics/machinery/pipes/manifold.dm b/code/modules/atmospherics/machinery/pipes/manifold.dm index 85764afaae1..33f01ba485a 100644 --- a/code/modules/atmospherics/machinery/pipes/manifold.dm +++ b/code/modules/atmospherics/machinery/pipes/manifold.dm @@ -156,13 +156,16 @@ /obj/machinery/atmospherics/pipe/manifold/visible icon_state = "map" level = 2 + plane = GAME_PLANE + layer = GAS_PIPE_VISIBLE_LAYER /obj/machinery/atmospherics/pipe/manifold/visible/scrubbers name="Scrubbers pipe manifold" desc = "A manifold composed of scrubbers pipes" icon_state = "map-scrubbers" connect_types = list(CONNECT_TYPE_SCRUBBER) - layer = 2.38 + layer = GAS_PIPE_VISIBLE_LAYER + GAS_PIPE_SCRUB_OFFSET + layer_offset = GAS_PIPE_SCRUB_OFFSET icon_connect_type = "-scrubbers" color = PIPE_COLOR_RED @@ -176,7 +179,8 @@ desc = "A manifold composed of supply pipes" icon_state = "map-supply" connect_types = list(CONNECT_TYPE_SUPPLY) - layer = 2.39 + layer = GAS_PIPE_VISIBLE_LAYER + GAS_PIPE_SUPPLY_OFFSET + layer_offset = GAS_PIPE_SUPPLY_OFFSET icon_connect_type = "-supply" color = PIPE_COLOR_BLUE @@ -207,13 +211,16 @@ 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 + plane = FLOOR_PLANE + layer = GAS_PIPE_HIDDEN_LAYER /obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers name="Scrubbers pipe manifold" desc = "A manifold composed of scrubbers pipes" icon_state = "map-scrubbers" connect_types = list(CONNECT_TYPE_SCRUBBER) - layer = 2.38 + layer = GAS_PIPE_HIDDEN_LAYER + GAS_PIPE_SCRUB_OFFSET + layer_offset = GAS_PIPE_SCRUB_OFFSET icon_connect_type = "-scrubbers" color = PIPE_COLOR_RED @@ -227,7 +234,8 @@ desc = "A manifold composed of supply pipes" icon_state = "map-supply" connect_types = list(CONNECT_TYPE_SUPPLY) - layer = 2.39 + layer = GAS_PIPE_HIDDEN_LAYER + GAS_PIPE_SUPPLY_OFFSET + layer_offset = GAS_PIPE_SUPPLY_OFFSET icon_connect_type = "-supply" color = PIPE_COLOR_BLUE diff --git a/code/modules/atmospherics/machinery/pipes/manifold4w.dm b/code/modules/atmospherics/machinery/pipes/manifold4w.dm index 1a548f8b9e9..560a08a7760 100644 --- a/code/modules/atmospherics/machinery/pipes/manifold4w.dm +++ b/code/modules/atmospherics/machinery/pipes/manifold4w.dm @@ -166,13 +166,16 @@ /obj/machinery/atmospherics/pipe/manifold4w/visible icon_state = "map_4way" level = 2 + plane = GAME_PLANE + layer = GAS_PIPE_VISIBLE_LAYER /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 = list(CONNECT_TYPE_SCRUBBER) - layer = 2.38 + layer = GAS_PIPE_VISIBLE_LAYER + GAS_PIPE_SCRUB_OFFSET + layer_offset = GAS_PIPE_SCRUB_OFFSET icon_connect_type = "-scrubbers" color = PIPE_COLOR_RED @@ -186,7 +189,8 @@ desc = "A manifold composed of supply pipes" icon_state = "map_4way-supply" connect_types = list(CONNECT_TYPE_SUPPLY) - layer = 2.39 + layer = GAS_PIPE_VISIBLE_LAYER + GAS_PIPE_SUPPLY_OFFSET + layer_offset = GAS_PIPE_SUPPLY_OFFSET icon_connect_type = "-supply" color = PIPE_COLOR_BLUE @@ -211,13 +215,16 @@ 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 + plane = FLOOR_PLANE + layer = GAS_PIPE_HIDDEN_LAYER /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 = list(CONNECT_TYPE_SCRUBBER) - layer = 2.38 + layer = GAS_PIPE_HIDDEN_LAYER + GAS_PIPE_SCRUB_OFFSET + layer_offset = GAS_PIPE_SCRUB_OFFSET icon_connect_type = "-scrubbers" color = PIPE_COLOR_RED @@ -231,7 +238,8 @@ desc = "A manifold composed of supply pipes" icon_state = "map_4way-supply" connect_types = list(CONNECT_TYPE_SUPPLY) - layer = 2.39 + layer = GAS_PIPE_HIDDEN_LAYER + GAS_PIPE_SUPPLY_OFFSET + layer_offset = GAS_PIPE_SUPPLY_OFFSET icon_connect_type = "-supply" color = PIPE_COLOR_BLUE diff --git a/code/modules/atmospherics/machinery/pipes/simple/pipe_simple_he.dm b/code/modules/atmospherics/machinery/pipes/simple/pipe_simple_he.dm index 8a8f1da3a5a..4a796a5332d 100644 --- a/code/modules/atmospherics/machinery/pipes/simple/pipe_simple_he.dm +++ b/code/modules/atmospherics/machinery/pipes/simple/pipe_simple_he.dm @@ -3,6 +3,8 @@ icon_state = "intact" pipe_icon = "hepipe" level = 2 + plane = GAME_PLANE + layer = GAS_PIPE_VISIBLE_LAYER var/initialize_directions_he var/surface = 2 @@ -89,6 +91,8 @@ /obj/machinery/atmospherics/pipe/simple/heat_exchanging/hidden level=1 icon_state="intact-f" + plane = FLOOR_PLANE + layer = GAS_PIPE_HIDDEN_LAYER ///////////////////////////////// // JUNCTION @@ -134,3 +138,5 @@ /obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/hidden level=1 icon_state="intact-f" + plane = FLOOR_PLANE + layer = GAS_PIPE_HIDDEN_LAYER diff --git a/code/modules/atmospherics/machinery/pipes/simple/pipe_simple_hidden.dm b/code/modules/atmospherics/machinery/pipes/simple/pipe_simple_hidden.dm index a8a1026f230..98fdb86546b 100644 --- a/code/modules/atmospherics/machinery/pipes/simple/pipe_simple_hidden.dm +++ b/code/modules/atmospherics/machinery/pipes/simple/pipe_simple_hidden.dm @@ -2,13 +2,17 @@ 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 + // these are inherited, but it's nice to have them explicit here + plane = FLOOR_PLANE + layer = GAS_PIPE_HIDDEN_LAYER /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers name = "Scrubbers pipe" desc = "A one meter section of scrubbers pipe" icon_state = "intact-scrubbers" connect_types = list(CONNECT_TYPE_SCRUBBER) - layer = 2.38 + layer = GAS_PIPE_HIDDEN_LAYER + GAS_PIPE_SCRUB_OFFSET + layer_offset = GAS_PIPE_SCRUB_OFFSET icon_connect_type = "-scrubbers" color = PIPE_COLOR_RED @@ -22,7 +26,8 @@ desc = "A one meter section of supply pipe" icon_state = "intact-supply" connect_types = list(CONNECT_TYPE_SUPPLY) - layer = 2.39 + layer = GAS_PIPE_HIDDEN_LAYER + GAS_PIPE_SUPPLY_OFFSET + layer_offset = GAS_PIPE_SUPPLY_OFFSET icon_connect_type = "-supply" color = PIPE_COLOR_BLUE diff --git a/code/modules/atmospherics/machinery/pipes/simple/pipe_simple_visible.dm b/code/modules/atmospherics/machinery/pipes/simple/pipe_simple_visible.dm index 361352d60e2..42259af6e6d 100644 --- a/code/modules/atmospherics/machinery/pipes/simple/pipe_simple_visible.dm +++ b/code/modules/atmospherics/machinery/pipes/simple/pipe_simple_visible.dm @@ -1,13 +1,17 @@ /obj/machinery/atmospherics/pipe/simple/visible icon_state = "intact" level = 2 + // these are inherited, but it's nice to have them explicit here + plane = GAME_PLANE + layer = GAS_PIPE_VISIBLE_LAYER /obj/machinery/atmospherics/pipe/simple/visible/scrubbers name = "Scrubbers pipe" desc = "A one meter section of scrubbers pipe" icon_state = "intact-scrubbers" connect_types = list(CONNECT_TYPE_SCRUBBER) - layer = 2.38 + layer = GAS_PIPE_VISIBLE_LAYER + GAS_PIPE_SCRUB_OFFSET + layer_offset = GAS_PIPE_SCRUB_OFFSET icon_connect_type = "-scrubbers" color = PIPE_COLOR_RED @@ -21,7 +25,8 @@ desc = "A one meter section of supply pipe" icon_state = "intact-supply" connect_types = list(CONNECT_TYPE_SUPPLY) - layer = 2.39 + layer = GAS_PIPE_VISIBLE_LAYER + GAS_PIPE_SUPPLY_OFFSET + layer_offset = GAS_PIPE_SUPPLY_OFFSET icon_connect_type = "-supply" color = PIPE_COLOR_BLUE diff --git a/code/modules/power/terminal.dm b/code/modules/power/terminal.dm index d8fc709a656..b48bd9362c2 100644 --- a/code/modules/power/terminal.dm +++ b/code/modules/power/terminal.dm @@ -8,6 +8,7 @@ icon_state = "term" desc = "It's an underfloor wiring terminal for power equipment." level = 1 + plane = FLOOR_PLANE layer = WIRE_TERMINAL_LAYER //a bit above wires var/obj/machinery/power/master = null @@ -16,6 +17,7 @@ . = ..() var/turf/T = get_turf(src) if(T.transparent_floor) + layer = ABOVE_TRANSPARENT_TURF_LAYER return if(level == 1) hide(T.intact) @@ -26,6 +28,10 @@ master = null return ..() +/obj/machinery/power/terminal/update_icon_state() + . = ..() + var/turf/T = get_turf(src) + layer = T.transparent_floor ? ABOVE_TRANSPARENT_TURF_LAYER : WIRE_TERMINAL_LAYER /obj/machinery/power/terminal/hide(i) if(i)