Distinguish between plating turf layer and floor turf layer. (#20503)

* move plating layer

* atmos correctness pass

* transparent floor ordering and wire terminal stuff

* fix control flow spacing
This commit is contained in:
unknownuser782
2023-03-26 12:25:08 +01:00
committed by GitHub
parent 405137789d
commit f28f14d90b
20 changed files with 111 additions and 45 deletions
@@ -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)
@@ -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
@@ -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
@@ -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
@@ -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"
@@ -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
@@ -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
@@ -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
@@ -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)
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
+6
View File
@@ -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)