diff --git a/_maps/map_files/debug/multiz.dmm b/_maps/map_files/debug/multiz.dmm index 699f4269eeb..c4367814163 100644 --- a/_maps/map_files/debug/multiz.dmm +++ b/_maps/map_files/debug/multiz.dmm @@ -319,8 +319,8 @@ /area/engine/atmos) "bm" = ( /obj/machinery/atmospherics/components/binary/valve/on{ - icon_state = "mvalve_map-2"; - dir = 4 + dir = 4; + icon_state = "mvalve_map-2" }, /turf/open/floor/plating, /area/engine/atmos) @@ -1098,8 +1098,8 @@ /area/hallway/secondary/service) "eQ" = ( /obj/structure/railing{ - icon_state = "railing"; - dir = 4 + dir = 4; + icon_state = "railing" }, /turf/open/floor/plating, /area/engine/storage) @@ -1109,8 +1109,8 @@ /area/engine/storage) "eX" = ( /obj/effect/turf_decal/stripes/white/line{ - icon_state = "warningline_white"; - dir = 4 + dir = 4; + icon_state = "warningline_white" }, /turf/open/floor/plating, /area/engine/storage) @@ -1143,8 +1143,8 @@ /area/engine/storage) "gK" = ( /obj/machinery/atmospherics/components/unary/portables_connector/visible{ - icon_state = "connector_map-2"; - dir = 8 + dir = 8; + icon_state = "connector_map-2" }, /obj/machinery/portable_atmospherics/canister/toxins, /turf/open/floor/plating, @@ -1162,8 +1162,8 @@ /area/hallway/primary/central) "hi" = ( /obj/machinery/atmospherics/components/unary/outlet_injector/on{ - icon_state = "inje_map-2"; - dir = 4 + dir = 4; + icon_state = "inje_map-2" }, /turf/open/floor/plating, /area/construction) @@ -1203,8 +1203,8 @@ "iH" = ( /obj/effect/turf_decal/stripes/white/line, /obj/structure/railing/corner{ - icon_state = "railing_corner"; - dir = 4 + dir = 4; + icon_state = "railing_corner" }, /turf/open/floor/plating, /area/engine/storage) @@ -1214,13 +1214,13 @@ }, /area/hallway/secondary/service) "jb" = ( -/obj/machinery/atmospherics/pipe/simple/multiz, +/obj/machinery/atmospherics/pipe/multiz, /turf/open/floor/plating, /area/hallway/secondary/service) "jA" = ( /obj/effect/turf_decal/stripes/white/line{ - icon_state = "warningline_white"; - dir = 8 + dir = 8; + icon_state = "warningline_white" }, /obj/effect/spawner/structure/window/reinforced, /turf/open/floor/plating, @@ -1231,14 +1231,20 @@ }, /turf/open/floor/plating, /area/construction) +"jL" = ( +/obj/machinery/atmospherics/pipe/multiz{ + dir = 1 + }, +/turf/open/floor/plating, +/area/hallway/secondary/service) "jT" = ( /obj/machinery/airalarm/directional/north, /turf/open/floor/plating, /area/construction) "jV" = ( /obj/effect/turf_decal/stripes/white/line{ - icon_state = "warningline_white"; - dir = 6 + dir = 6; + icon_state = "warningline_white" }, /turf/open/floor/plating, /area/engine/storage) @@ -1353,12 +1359,12 @@ /area/construction) "qR" = ( /obj/effect/turf_decal/stripes/white/line{ - icon_state = "warningline_white"; - dir = 9 + dir = 9; + icon_state = "warningline_white" }, /obj/structure/railing/corner{ - icon_state = "railing_corner"; - dir = 1 + dir = 1; + icon_state = "railing_corner" }, /turf/open/floor/plating, /area/engine/storage) @@ -1386,26 +1392,26 @@ /area/construction) "su" = ( /obj/structure/railing{ - icon_state = "railing"; - dir = 8 + dir = 8; + icon_state = "railing" }, /turf/open/floor/plating, /area/hallway/secondary/service) "sE" = ( /obj/effect/turf_decal/stripes/white/line{ - icon_state = "warningline_white"; - dir = 4 + dir = 4; + icon_state = "warningline_white" }, /obj/structure/railing{ - icon_state = "railing"; - dir = 8 + dir = 8; + icon_state = "railing" }, /turf/open/floor/plating, /area/engine/storage) "td" = ( /obj/effect/turf_decal/stripes/white/line{ - icon_state = "warningline_white"; - dir = 8 + dir = 8; + icon_state = "warningline_white" }, /turf/open/floor/plating, /area/engine/storage) @@ -1461,8 +1467,8 @@ /area/construction) "xB" = ( /obj/effect/turf_decal/stripes/white/line{ - icon_state = "warningline_white"; - dir = 1 + dir = 1; + icon_state = "warningline_white" }, /turf/open/floor/plating, /area/engine/storage) @@ -1503,12 +1509,12 @@ /area/storage/primary) "zd" = ( /obj/structure/railing{ - icon_state = "railing"; - dir = 4 + dir = 4; + icon_state = "railing" }, /obj/structure/railing{ - icon_state = "railing"; - dir = 8 + dir = 8; + icon_state = "railing" }, /turf/open/floor/plating, /area/hallway/secondary/service) @@ -1519,8 +1525,8 @@ /area/construction) "zZ" = ( /obj/structure/disposalpipe/trunk{ - icon_state = "pipe-t"; - dir = 1 + dir = 1; + icon_state = "pipe-t" }, /obj/machinery/disposal/bin, /turf/open/floor/plating, @@ -1531,8 +1537,8 @@ /area/engine/storage) "Ai" = ( /obj/structure/railing/corner{ - icon_state = "railing_corner"; - dir = 8 + dir = 8; + icon_state = "railing_corner" }, /turf/open/floor/plating, /area/hallway/secondary/service) @@ -1611,8 +1617,8 @@ "Eb" = ( /obj/effect/turf_decal/stripes/white/line, /obj/structure/railing{ - icon_state = "railing"; - dir = 1 + dir = 1; + icon_state = "railing" }, /turf/open/floor/plating, /area/engine/storage) @@ -1622,12 +1628,12 @@ /area/construction) "EH" = ( /obj/effect/turf_decal/stripes/white/line{ - icon_state = "warningline_white"; - dir = 1 + dir = 1; + icon_state = "warningline_white" }, /obj/effect/turf_decal/stripes/white/line{ - icon_state = "warningline_white"; - dir = 4 + dir = 4; + icon_state = "warningline_white" }, /turf/open/floor/plating, /area/engine/storage) @@ -1642,8 +1648,8 @@ "FL" = ( /obj/effect/spawner/structure/window/reinforced, /obj/machinery/atmospherics/pipe/simple/green/hidden{ - icon_state = "pipe11-2"; - dir = 4 + dir = 4; + icon_state = "pipe11-2" }, /turf/open/floor/plating, /area/construction) @@ -1655,7 +1661,9 @@ /turf/open/floor/plating, /area/hallway/secondary/service) "Hk" = ( -/obj/machinery/atmospherics/pipe/simple/multiz, +/obj/machinery/atmospherics/pipe/multiz{ + dir = 1 + }, /turf/open/floor/plating, /area/construction) "Hp" = ( @@ -1675,8 +1683,8 @@ "IL" = ( /obj/structure/railing/corner, /obj/structure/railing/corner{ - icon_state = "railing_corner"; - dir = 8 + dir = 8; + icon_state = "railing_corner" }, /turf/open/floor/plating, /area/hallway/secondary/service) @@ -1723,8 +1731,8 @@ /area/maintenance/department/bridge) "Lu" = ( /obj/structure/railing{ - icon_state = "railing"; - dir = 4 + dir = 4; + icon_state = "railing" }, /turf/open/floor/plating, /area/hallway/secondary/service) @@ -1772,8 +1780,8 @@ /area/engine/storage) "Qo" = ( /obj/structure/disposalpipe/trunk/multiz/down{ - icon_state = "pipe-down"; - dir = 1 + dir = 1; + icon_state = "pipe-down" }, /turf/open/floor/plating, /area/hallway/secondary/service) @@ -1826,7 +1834,7 @@ /turf/open/floor/plating, /area/engine/storage) "UH" = ( -/obj/machinery/atmospherics/pipe/simple/multiz, +/obj/machinery/atmospherics/pipe/multiz, /turf/open/floor/plating, /area/engine/storage) "Vm" = ( @@ -1883,8 +1891,8 @@ /area/construction) "ZQ" = ( /obj/effect/turf_decal/stripes/white/line{ - icon_state = "warningline_white"; - dir = 5 + dir = 5; + icon_state = "warningline_white" }, /obj/effect/spawner/structure/window/reinforced, /turf/open/floor/plating, @@ -5813,7 +5821,7 @@ Gb jb LE IC -jb +jL Gb XN iu diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index 10b3b46de26..e222e8b4b2e 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -20,6 +20,8 @@ Buildable meters w_class = WEIGHT_CLASS_NORMAL var/piping_layer = PIPING_LAYER_DEFAULT var/RPD_type + /// Whether it can be painted + var/paintable = FALSE /obj/item/pipe/directional RPD_type = PIPE_UNARY @@ -56,6 +58,7 @@ Buildable meters pipename = make_from.name add_atom_colour(make_from.color, FIXED_COLOUR_PRIORITY) pipe_type = make_from.type + paintable = make_from.paintable /obj/item/pipe/trinary/flippable/make_from_existing(obj/machinery/atmospherics/components/trinary/make_from) ..() diff --git a/code/game/objects/items/RPD.dm b/code/game/objects/items/RPD.dm index 37e2cdaa85a..ff3f6da006a 100644 --- a/code/game/objects/items/RPD.dm +++ b/code/game/objects/items/RPD.dm @@ -18,7 +18,8 @@ GLOBAL_LIST_INIT(atmos_pipe_recipes, list( new /datum/pipe_info/pipe("Pipe", /obj/machinery/atmospherics/pipe/simple, TRUE), new /datum/pipe_info/pipe("Manifold", /obj/machinery/atmospherics/pipe/manifold, TRUE), new /datum/pipe_info/pipe("4-Way Manifold", /obj/machinery/atmospherics/pipe/manifold4w, TRUE), - new /datum/pipe_info/pipe("Layer Manifold", /obj/machinery/atmospherics/pipe/layer_manifold, TRUE), + new /datum/pipe_info/pipe("Layer Adapter", /obj/machinery/atmospherics/pipe/layer_manifold, TRUE), + new /datum/pipe_info/pipe("Multi-Deck Adapter", /obj/machinery/atmospherics/pipe/multiz, TRUE), ), "Devices" = list( new /datum/pipe_info/pipe("Connector", /obj/machinery/atmospherics/components/unary/portables_connector, TRUE), @@ -359,21 +360,21 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list( return if((mode & PAINT_MODE)) - if(istype(A, /obj/machinery/atmospherics/pipe) && !istype(A, /obj/machinery/atmospherics/pipe/layer_manifold)) - var/obj/machinery/atmospherics/pipe/P = A - to_chat(user, "You start painting \the [P] [paint_color]...") + var/obj/machinery/atmospherics/M = A + if(istype(M) && M.paintable) + to_chat(user, "You start painting \the [M] [paint_color]...") playsound(get_turf(src), 'sound/machines/click.ogg', 50, TRUE) - if(do_after(user, paint_speed, target = A)) - P.paint(GLOB.pipe_paint_colors[paint_color]) //paint the pipe - user.visible_message("[user] paints \the [P] [paint_color].","You paint \the [P] [paint_color].") + if(do_after(user, paint_speed, target = M)) + M.paint(GLOB.pipe_paint_colors[paint_color]) //paint the pipe + user.visible_message("[user] paints \the [M] [paint_color].","You paint \the [M] [paint_color].") return - var/obj/item/pipe/P = A - if(istype(P) && findtext("[P.pipe_type]", "/obj/machinery/atmospherics/pipe") && !findtext("[P.pipe_type]", "layer_manifold")) - to_chat(user, "You start painting \the [A] [paint_color]...") + var/obj/item/pipe/I = A + if(istype(I) && I.paintable) + to_chat(user, "You start painting \the [I] [paint_color]...") playsound(get_turf(src), 'sound/machines/click.ogg', 50, TRUE) - if(do_after(user, paint_speed, target = A)) - A.add_atom_colour(GLOB.pipe_paint_colors[paint_color], FIXED_COLOUR_PRIORITY) //paint the pipe - user.visible_message("[user] paints \the [A] [paint_color].","You paint \the [A] [paint_color].") + if(do_after(user, paint_speed, target = I)) + I.add_atom_colour(GLOB.pipe_paint_colors[paint_color], FIXED_COLOUR_PRIORITY) //paint the pipe + user.visible_message("[user] paints \the [I] [paint_color].","You paint \the [I] [paint_color].") return if(mode & BUILD_MODE) diff --git a/code/modules/atmospherics/machinery/atmosmachinery.dm b/code/modules/atmospherics/machinery/atmosmachinery.dm index c27f9ad75d3..5c5217f0e51 100644 --- a/code/modules/atmospherics/machinery/atmosmachinery.dm +++ b/code/modules/atmospherics/machinery/atmosmachinery.dm @@ -41,6 +41,9 @@ var/pipe_state //icon_state as a pipe item var/on = FALSE + /// Whether it can be painted + var/paintable = FALSE + /obj/machinery/atmospherics/examine(mob/user) . = ..() if(is_type_in_list(src, GLOB.ventcrawl_machinery) && isliving(user)) @@ -339,3 +342,6 @@ /obj/machinery/atmospherics/proc/update_layer() layer = initial(layer) + (piping_layer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_LCHANGE + +/obj/machinery/atmospherics/proc/paint(paint_color) + return FALSE diff --git a/code/modules/atmospherics/machinery/pipes/layermanifold.dm b/code/modules/atmospherics/machinery/pipes/layermanifold.dm index b1592dcaeb9..6103b0513a6 100644 --- a/code/modules/atmospherics/machinery/pipes/layermanifold.dm +++ b/code/modules/atmospherics/machinery/pipes/layermanifold.dm @@ -11,6 +11,7 @@ volume = 260 construction_type = /obj/item/pipe/binary pipe_state = "manifoldlayer" + paintable = FALSE var/list/front_nodes var/list/back_nodes @@ -37,7 +38,7 @@ /obj/machinery/atmospherics/pipe/layer_manifold/proc/get_all_connected_nodes() return front_nodes + back_nodes + nodes -/obj/machinery/atmospherics/pipe/layer_manifold/update_icon() //HEAVILY WIP FOR UPDATE ICONS!! +/obj/machinery/atmospherics/pipe/layer_manifold/update_icon() cut_overlays() layer = initial(layer) + (PIPING_LAYER_MAX * PIPING_LAYER_LCHANGE) //This is above everything else. diff --git a/code/modules/atmospherics/machinery/pipes/mapping.dm b/code/modules/atmospherics/machinery/pipes/mapping.dm index c23f8cacd94..5e919a1e9ca 100644 --- a/code/modules/atmospherics/machinery/pipes/mapping.dm +++ b/code/modules/atmospherics/machinery/pipes/mapping.dm @@ -81,3 +81,16 @@ HELPER_NAMED(supplymain, "main air supply pipe", rgb(130, 43, 255)) #undef HELPER #undef HELPER_PARTIAL_NAMED #undef HELPER_PARTIAL + +/obj/machinery/atmospherics/pipe/multiz/layer1 + piping_layer = 1 + icon_state = "adapter-1" +/obj/machinery/atmospherics/pipe/multiz/layer2 + piping_layer = 2 + icon_state = "adapter-2" +/obj/machinery/atmospherics/pipe/multiz/layer4 + piping_layer = 4 + icon_state = "adapter-4" +/obj/machinery/atmospherics/pipe/multiz/layer5 + piping_layer = 5 + icon_state = "adapter-5" diff --git a/code/modules/atmospherics/machinery/pipes/multiz.dm b/code/modules/atmospherics/machinery/pipes/multiz.dm new file mode 100644 index 00000000000..d52e4a923a8 --- /dev/null +++ b/code/modules/atmospherics/machinery/pipes/multiz.dm @@ -0,0 +1,53 @@ +/// This is an atmospherics pipe which can relay air up/down a deck. +/obj/machinery/atmospherics/pipe/multiz + name = "multi deck pipe adapter" + desc = "An adapter which allows pipes to connect to other pipenets on different decks." + icon_state = "adapter-3" + icon = 'icons/obj/atmospherics/pipes/multiz.dmi' + + dir = SOUTH + initialize_directions = SOUTH + + layer = HIGH_OBJ_LAYER + device_type = UNARY + paintable = FALSE + + construction_type = /obj/item/pipe/directional + pipe_state = "multiz" + + var/mutable_appearance/center = null + var/mutable_appearance/pipe = null + var/obj/machinery/atmospherics/front_node = null + +/* We use New() instead of Initialize() because these values are used in update_icon() + * in the mapping subsystem init before Initialize() is called in the atoms subsystem init. + * This is true for the other manifolds (the 4 ways and the heat exchanges) too. + */ +/obj/machinery/atmospherics/pipe/multiz/New() + icon_state = "" + center = mutable_appearance(icon, "adapter_center", layer = HIGH_OBJ_LAYER) + pipe = mutable_appearance(icon, "pipe-[piping_layer]") + return ..() + +/obj/machinery/atmospherics/pipe/multiz/SetInitDirections() + initialize_directions = dir + +/obj/machinery/atmospherics/pipe/multiz/update_icon() + cut_overlays() + pipe.color = front_node ? front_node.pipe_color : rgb(255, 255, 255) + pipe.icon_state = "pipe-[piping_layer]" + center.pixel_x = PIPING_LAYER_P_X * (piping_layer - PIPING_LAYER_DEFAULT) + add_overlay(pipe) + add_overlay(center) + +///Attempts to locate a multiz pipe that's above us, if it finds one it merges us into its pipenet +/obj/machinery/atmospherics/pipe/multiz/pipeline_expansion() + var/turf/T = get_turf(src) + var/obj/machinery/atmospherics/pipe/multiz/above = locate(/obj/machinery/atmospherics/pipe/multiz) in(SSmapping.get_turf_above(T)) + var/obj/machinery/atmospherics/pipe/multiz/below = locate(/obj/machinery/atmospherics/pipe/multiz) in(SSmapping.get_turf_below(T)) + if(below) + below.pipeline_expansion() //If we've got one below us, force it to add us on facebook + if(above) + nodes += above + above.nodes += src //Two way travel :) + return ..() diff --git a/code/modules/atmospherics/machinery/pipes/pipes.dm b/code/modules/atmospherics/machinery/pipes/pipes.dm index 55f39a55506..558a08b4063 100644 --- a/code/modules/atmospherics/machinery/pipes/pipes.dm +++ b/code/modules/atmospherics/machinery/pipes/pipes.dm @@ -7,6 +7,8 @@ can_unwrench = 1 var/datum/pipeline/parent = null + paintable = TRUE + //Buckling can_buckle = TRUE buckle_requires_restraints = TRUE @@ -90,8 +92,9 @@ /obj/machinery/atmospherics/pipe/returnPipenets() . = list(parent) -/obj/machinery/atmospherics/pipe/proc/paint(paint_color) - add_atom_colour(paint_color, FIXED_COLOUR_PRIORITY) - pipe_color = paint_color - update_node_icon() - return TRUE +/obj/machinery/atmospherics/pipe/paint(paint_color) + if(paintable) + add_atom_colour(paint_color, FIXED_COLOUR_PRIORITY) + pipe_color = paint_color + update_node_icon() + return paintable diff --git a/code/modules/atmospherics/multiz.dm b/code/modules/atmospherics/multiz.dm deleted file mode 100644 index b75b47542ef..00000000000 --- a/code/modules/atmospherics/multiz.dm +++ /dev/null @@ -1,29 +0,0 @@ -/obj/machinery/atmospherics/pipe/simple/multiz ///This is an atmospherics pipe which can relay air up a deck (Z+1). It currently only supports being on pipe layer 1 - name = "multi deck pipe adapter" - desc = "An adapter which allows pipes to connect to other pipenets on different decks." - icon_state = "multiz_pipe" - icon = 'icons/obj/atmos.dmi' - -/obj/machinery/atmospherics/pipe/simple/multiz/update_icon() - . = ..() - cut_overlays() //This adds the overlay showing it's a multiz pipe. This should go above turfs and such - var/image/multiz_overlay_node = new(src) //If we have a firing state, light em up! - multiz_overlay_node.icon = 'icons/obj/atmos.dmi' - multiz_overlay_node.icon_state = "multiz_pipe" - multiz_overlay_node.layer = HIGH_OBJ_LAYER - add_overlay(multiz_overlay_node) - -///Attempts to locate a multiz pipe that's above us, if it finds one it merges us into its pipenet -/obj/machinery/atmospherics/pipe/simple/multiz/pipeline_expansion() - icon = 'icons/obj/atmos.dmi' //Just to refresh. - var/turf/T = get_turf(src) - var/obj/machinery/atmospherics/pipe/simple/multiz/above = locate(/obj/machinery/atmospherics/pipe/simple/multiz) in(SSmapping.get_turf_above(T)) - var/obj/machinery/atmospherics/pipe/simple/multiz/below = locate(/obj/machinery/atmospherics/pipe/simple/multiz) in(SSmapping.get_turf_below(T)) - if(below) - below.pipeline_expansion() //If we've got one below us, force it to add us on facebook - if(above) - nodes += above - above.nodes += src //Two way travel :) - return ..() - else - return ..() diff --git a/icons/obj/atmos.dmi b/icons/obj/atmos.dmi index 5e0d0bf32bc..d17343fb977 100644 Binary files a/icons/obj/atmos.dmi and b/icons/obj/atmos.dmi differ diff --git a/icons/obj/atmospherics/pipes/manifold.dmi b/icons/obj/atmospherics/pipes/manifold.dmi index f96874dc059..4c7d06566af 100644 Binary files a/icons/obj/atmospherics/pipes/manifold.dmi and b/icons/obj/atmospherics/pipes/manifold.dmi differ diff --git a/icons/obj/atmospherics/pipes/multiz.dmi b/icons/obj/atmospherics/pipes/multiz.dmi new file mode 100644 index 00000000000..07172fb41b2 Binary files /dev/null and b/icons/obj/atmospherics/pipes/multiz.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 7283e468e43..9fe61147528 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1589,7 +1589,6 @@ #include "code\modules\asset_cache\asset_list_items.dm" #include "code\modules\asset_cache\transports\asset_transport.dm" #include "code\modules\asset_cache\transports\webroot_transport.dm" -#include "code\modules\atmospherics\multiz.dm" #include "code\modules\atmospherics\environmental\LINDA_fire.dm" #include "code\modules\atmospherics\environmental\LINDA_system.dm" #include "code\modules\atmospherics\environmental\LINDA_turf_tile.dm" @@ -1630,6 +1629,7 @@ #include "code\modules\atmospherics\machinery\pipes\manifold.dm" #include "code\modules\atmospherics\machinery\pipes\manifold4w.dm" #include "code\modules\atmospherics\machinery\pipes\mapping.dm" +#include "code\modules\atmospherics\machinery\pipes\multiz.dm" #include "code\modules\atmospherics\machinery\pipes\pipes.dm" #include "code\modules\atmospherics\machinery\pipes\simple.dm" #include "code\modules\atmospherics\machinery\pipes\heat_exchange\he_pipes.dm"