diff --git a/code/ATMOSPHERICS/_atmos_setup.dm b/code/ATMOSPHERICS/_atmos_setup.dm index f1f560a00d..6af102cf38 100644 --- a/code/ATMOSPHERICS/_atmos_setup.dm +++ b/code/ATMOSPHERICS/_atmos_setup.dm @@ -15,11 +15,6 @@ #define PIPE_COLOR_BLACK "#444444" #define PIPE_COLOR_PURPLE "#5c1ec0" -#define CONNECT_TYPE_REGULAR 1 -#define CONNECT_TYPE_SUPPLY 2 -#define CONNECT_TYPE_SCRUBBER 4 -#define CONNECT_TYPE_HE 8 - var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_RED, "blue" = PIPE_COLOR_BLUE, "cyan" = PIPE_COLOR_CYAN, "green" = PIPE_COLOR_GREEN, "yellow" = PIPE_COLOR_YELLOW, "black" = PIPE_COLOR_BLACK, "purple" = PIPE_COLOR_PURPLE) /proc/pipe_color_lookup(var/color) diff --git a/code/ATMOSPHERICS/_atmospherics_helpers.dm b/code/ATMOSPHERICS/_atmospherics_helpers.dm index 6fc2b923dd..b5cd6486b9 100644 --- a/code/ATMOSPHERICS/_atmospherics_helpers.dm +++ b/code/ATMOSPHERICS/_atmospherics_helpers.dm @@ -455,3 +455,40 @@ var/sink_pressure = sink.return_pressure() return (source_pressure - sink_pressure)/(R_IDEAL_GAS_EQUATION * (source.temperature/source_volume + sink.temperature/sink_volume)) + +// +// Debugging helper procs +// + +/proc/atmos_piping_layer_str(piping_layer) + switch(piping_layer) + if(PIPING_LAYER_SUPPLY) + return "SUPPLY" + if(PIPING_LAYER_REGULAR) + return "REGULAR" + if(PIPING_LAYER_SCRUBBER) + return "SCRUBBER" + +/proc/atmos_pipe_flags_str(pipe_flags) + var/list/dat = list() + if(pipe_flags & PIPING_ALL_LAYER) + dat += "ALL_LAYER" + if(pipe_flags & PIPING_ONE_PER_TURF) + dat += "ONE_PER_TURF" + if(pipe_flags & PIPING_DEFAULT_LAYER_ONLY) + dat += "DEFAULT_LAYER_ONLY" + if(pipe_flags & PIPING_CARDINAL_AUTONORMALIZE) + dat += "CARDINAL_AUTONORMALIZE" + return dat.Join("|") + +/proc/atmos_connect_types_str(connect_types) + var/list/dat = list() + if(connect_types & CONNECT_TYPE_REGULAR) + dat += "REGULAR" + if(connect_types & CONNECT_TYPE_SUPPLY) + dat += "SUPPLY" + if(connect_types & CONNECT_TYPE_SCRUBBER) + dat += "SCRUBBER" + if(connect_types & CONNECT_TYPE_HE) + dat += "HE" + return dat.Join("|") diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index 59163e1b82..fc074184d8 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -19,8 +19,12 @@ Pipelines + Other Objects -> Pipe network layer = 2.4 //under wires with their 2.44 + var/pipe_flags = PIPING_DEFAULT_LAYER_ONLY // Allow other layers by exception basis. var/connect_types = CONNECT_TYPE_REGULAR + var/piping_layer = PIPING_LAYER_DEFAULT // This will replace icon_connect_type at some point ~Leshana var/icon_connect_type = "" //"-supply" or "-scrubbers" + var/construction_type = null // Type path of the pipe item when this is deconstructed. + var/pipe_state // icon_state as a pipe item var/initialize_directions = 0 var/pipe_color @@ -29,11 +33,12 @@ Pipelines + Other Objects -> Pipe network var/obj/machinery/atmospherics/node1 var/obj/machinery/atmospherics/node2 -/obj/machinery/atmospherics/New() +/obj/machinery/atmospherics/New(loc, newdir) ..() if(!icon_manager) icon_manager = new() - + if(!isnull(newdir)) + set_dir(newdir) if(!pipe_color) pipe_color = color color = null @@ -46,6 +51,10 @@ Pipelines + Other Objects -> Pipe network /obj/machinery/atmospherics/proc/init_dir() return +// Get ALL initialize_directions - Some types (HE pipes etc) combine two vars together for this. +/obj/machinery/atmospherics/proc/get_init_dirs() + return initialize_directions + // Get the direction each node is facing to connect. // It now returns as a list so it can be fetched nicely, each entry corresponds to node of same number. /obj/machinery/atmospherics/proc/get_node_connect_dirs() @@ -59,6 +68,14 @@ Pipelines + Other Objects -> Pipe network /obj/machinery/atmospherics/proc/atmos_init() return +/** Check if target is an acceptable target to connect as a node from this machine. */ +/obj/machinery/atmospherics/proc/can_be_node(obj/machinery/atmospherics/target, node_num) + return (target.initialize_directions & get_dir(target,src)) && check_connectable(target) && target.check_connectable(src) + +/** Check if this machine is willing to connect with the target machine. */ +/obj/machinery/atmospherics/proc/check_connectable(obj/machinery/atmospherics/target) + return (src.connect_types & target.connect_types) + /obj/machinery/atmospherics/attackby(atom/A, mob/user as mob) if(istype(A, /obj/item/device/pipe_painter)) return @@ -82,12 +99,6 @@ Pipelines + Other Objects -> Pipe network else return 0 -obj/machinery/atmospherics/proc/check_connect_types(obj/machinery/atmospherics/atmos1, obj/machinery/atmospherics/atmos2) - return (atmos1.connect_types & atmos2.connect_types) - -/obj/machinery/atmospherics/proc/check_connect_types_construction(obj/machinery/atmospherics/atmos1, obj/item/pipe/pipe2) - return (atmos1.connect_types & pipe2.connect_types) - /obj/machinery/atmospherics/proc/check_icon_cache(var/safety = 0) if(!istype(icon_manager)) if(!safety) //to prevent infinite loops @@ -146,4 +157,60 @@ obj/machinery/atmospherics/proc/check_connect_types(obj/machinery/atmospherics/a var/datum/gas_mixture/env_air = loc.return_air() if((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE) return 0 - return 1 \ No newline at end of file + return 1 + +// Deconstruct into a pipe item. +/obj/machinery/atmospherics/proc/deconstruct() + if(QDELETED(src)) + return + if(construction_type) + var/obj/item/pipe/I = new construction_type(loc, null, null, src) + I.setPipingLayer(piping_layer) + transfer_fingerprints_to(I) + qdel(src) + +// Return a list of nodes which we should call atmos_init() and build_network() during on_construction() +/obj/machinery/atmospherics/proc/get_neighbor_nodes_for_init() + return null + +// Called on construction (i.e from pipe item) but not on initialization +/obj/machinery/atmospherics/proc/on_construction(obj_color, set_layer) + pipe_color = obj_color + setPipingLayer(set_layer) + // TODO - M.connect_types = src.connect_types - Or otherwise copy from item? Or figure it out from piping layer? + var/turf/T = get_turf(src) + level = !T.is_plating() ? 2 : 1 + atmos_init() + if(QDELETED(src)) + return // TODO - Eventually should get rid of the need for this. + build_network() + var/list/nodes = get_neighbor_nodes_for_init() + for(var/obj/machinery/atmospherics/A in nodes) + A.atmos_init() + A.build_network() + // TODO - Should we do src.build_network() before or after the nodes? + // We've historically done before, but /tg does after. TODO research if there is a difference. + +// This sets our piping layer. Hopefully its cool. +/obj/machinery/atmospherics/proc/setPipingLayer(new_layer) + if(pipe_flags & (PIPING_DEFAULT_LAYER_ONLY|PIPING_ALL_LAYER)) + new_layer = PIPING_LAYER_DEFAULT + piping_layer = new_layer + // Do it the Polaris way + switch(piping_layer) + if(PIPING_LAYER_SCRUBBER) + icon_state = "[icon_state]-scrubbers" + connect_types = CONNECT_TYPE_SCRUBBER + layer = 2.38 + icon_connect_type = "-scrubbers" + if(PIPING_LAYER_SUPPLY) + icon_state = "[icon_state]-supply" + connect_types = CONNECT_TYPE_SUPPLY + layer = 2.39 + icon_connect_type = "-supply" + if(pipe_flags & PIPING_ALL_LAYER) + connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SUPPLY|CONNECT_TYPE_SCRUBBER + // Or if we were to do it the TG way... + // pixel_x = PIPE_PIXEL_OFFSET_X(piping_layer) + // pixel_y = PIPE_PIXEL_OFFSET_Y(piping_layer) + // layer = initial(layer) + PIPE_LAYER_OFFSET(piping_layer) diff --git a/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm b/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm index 1429b9b30a..adafb2ed17 100644 --- a/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm +++ b/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm @@ -14,6 +14,7 @@ idle_power_usage = 100 // Minimal lights to keep algae alive active_power_usage = 5000 // Powerful grow lights to stimulate oxygen production //power_rating = 7500 //7500 W ~ 10 HP + pipe_flags = PIPING_DEFAULT_LAYER_ONLY|PIPING_ONE_PER_TURF var/list/stored_material = list(MATERIAL_ALGAE = 0, MATERIAL_CARBON = 0) // Capacity increases with matter bin quality diff --git a/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm b/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm index 6e6662f39c..4698c613a9 100644 --- a/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm +++ b/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm @@ -30,6 +30,9 @@ initialize_directions = EAST|WEST // Housekeeping and pipe network stuff below +/obj/machinery/atmospherics/binary/get_neighbor_nodes_for_init() + return list(node1, node2) + /obj/machinery/atmospherics/binary/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference) if(reference == node1) network1 = new_network @@ -64,17 +67,8 @@ var/node2_connect = dir var/node1_connect = turn(dir, 180) - for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect)) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node1 = target - break - - for(var/obj/machinery/atmospherics/target in get_step(src,node2_connect)) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node2 = target - break + STANDARD_ATMOS_CHOOSE_NODE(1, node1_connect) + STANDARD_ATMOS_CHOOSE_NODE(2, node2_connect) update_icon() update_underlays() diff --git a/code/ATMOSPHERICS/components/binary_devices/circulator.dm b/code/ATMOSPHERICS/components/binary_devices/circulator.dm index 68ce37d088..ff1089e6f8 100644 --- a/code/ATMOSPHERICS/components/binary_devices/circulator.dm +++ b/code/ATMOSPHERICS/components/binary_devices/circulator.dm @@ -9,6 +9,7 @@ icon = 'icons/obj/pipes.dmi' icon_state = "circ-off" anchored = 0 + pipe_flags = PIPING_DEFAULT_LAYER_ONLY|PIPING_ONE_PER_TURF var/kinetic_efficiency = 0.04 //combined kinetic and kinetic-to-electric efficiency var/volume_ratio = 0.2 diff --git a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm index 840d2bdf8b..d696aad039 100644 --- a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm @@ -24,6 +24,7 @@ idle_power_usage = 150 //internal circuitry, friction losses and stuff power_rating = 7500 //7500 W ~ 10 HP + pipe_flags = PIPING_ALL_LAYER connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SUPPLY|CONNECT_TYPE_SCRUBBER //connects to regular, supply and scrubbers pipes var/pump_direction = 1 //0 = siphoning, 1 = releasing diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm index b4f25459c1..c08c82f6b9 100644 --- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm +++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm @@ -5,6 +5,8 @@ /obj/machinery/atmospherics/binary/passive_gate icon = 'icons/atmos/passive_gate.dmi' icon_state = "map" + construction_type = /obj/item/pipe/directional + pipe_state = "passivegate" level = 1 name = "pressure regulator" @@ -257,8 +259,7 @@ "\The [user] unfastens \the [src].", \ "You have unfastened \the [src].", \ "You hear ratchet.") - new /obj/item/pipe(loc, make_from=src) - qdel(src) + deconstruct() #undef REGULATE_NONE #undef REGULATE_INPUT diff --git a/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm b/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm index b8c7883796..a7127a4dc6 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm @@ -139,6 +139,9 @@ src.set_dir(turn(src.dir, 90)) //Goddamn copypaste from binary base class because atmospherics machinery API is not damn flexible + get_neighbor_nodes_for_init() + return list(node1, node2) + network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference) if(reference == node1) network1 = new_network diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm index 6320ddf8a3..a89b1c5659 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm @@ -15,6 +15,8 @@ Thus, the two variables affect pump operation are set in New(): /obj/machinery/atmospherics/binary/pump icon = 'icons/atmos/pump.dmi' icon_state = "map_off" + construction_type = /obj/item/pipe/directional + pipe_state = "pump" level = 1 name = "gas pump" @@ -236,5 +238,4 @@ Thus, the two variables affect pump operation are set in New(): "\The [user] unfastens \the [src].", \ "You have unfastened \the [src].", \ "You hear ratchet.") - new /obj/item/pipe(loc, make_from=src) - qdel(src) + deconstruct() diff --git a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm index 42b02282cc..b4493a1566 100644 --- a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm @@ -1,6 +1,8 @@ /obj/machinery/atmospherics/binary/pump/high_power icon = 'icons/atmos/volume_pump.dmi' icon_state = "map_off" + construction_type = /obj/item/pipe/directional + pipe_state = "volumepump" level = 1 name = "high power gas pump" diff --git a/code/ATMOSPHERICS/components/omni_devices/filter.dm b/code/ATMOSPHERICS/components/omni_devices/filter.dm index 8710623dfd..57889c463e 100644 --- a/code/ATMOSPHERICS/components/omni_devices/filter.dm +++ b/code/ATMOSPHERICS/components/omni_devices/filter.dm @@ -4,6 +4,7 @@ /obj/machinery/atmospherics/omni/atmos_filter name = "omni gas filter" icon_state = "map_filter" + pipe_state = "omni_filter" var/list/atmos_filters = new() var/datum/omni_port/input diff --git a/code/ATMOSPHERICS/components/omni_devices/mixer.dm b/code/ATMOSPHERICS/components/omni_devices/mixer.dm index 6340397870..c833b5bb2a 100644 --- a/code/ATMOSPHERICS/components/omni_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/omni_devices/mixer.dm @@ -4,6 +4,7 @@ /obj/machinery/atmospherics/omni/mixer name = "omni gas mixer" icon_state = "map_mixer" + pipe_state = "omni_mixer" use_power = 1 idle_power_usage = 150 //internal circuitry, friction losses and stuff diff --git a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm index a469b4e9ee..0981ff6b44 100644 --- a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm +++ b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm @@ -7,6 +7,7 @@ icon_state = "base" use_power = 1 initialize_directions = 0 + construction_type = /obj/item/pipe/quaternary level = 1 var/configuring = 0 @@ -93,8 +94,7 @@ "\The [user] unfastens \the [src].", \ "You have unfastened \the [src].", \ "You hear a ratchet.") - new /obj/item/pipe(loc, make_from=src) - qdel(src) + deconstruct() /obj/machinery/atmospherics/omni/can_unwrench() var/int_pressure = 0 @@ -222,6 +222,11 @@ // Housekeeping and pipe network stuff below +/obj/machinery/atmospherics/omni/get_neighbor_nodes_for_init() + var/list/neighbor_nodes = list() + for(var/datum/omni_port/P in ports) + neighbor_nodes += P.node + return neighbor_nodes /obj/machinery/atmospherics/omni/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference) for(var/datum/omni_port/P in ports) @@ -252,10 +257,9 @@ if(P.node || P.mode == 0) continue for(var/obj/machinery/atmospherics/target in get_step(src, P.dir)) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - P.node = target - break + if(can_be_node(target, 1)) + P.node = target + break for(var/datum/omni_port/P in ports) P.update = 1 diff --git a/code/ATMOSPHERICS/components/portables_connector.dm b/code/ATMOSPHERICS/components/portables_connector.dm index 6911288c93..7dca3f52d4 100644 --- a/code/ATMOSPHERICS/components/portables_connector.dm +++ b/code/ATMOSPHERICS/components/portables_connector.dm @@ -7,6 +7,9 @@ dir = SOUTH initialize_directions = SOUTH + construction_type = /obj/item/pipe/directional + pipe_state = "connector" + pipe_flags = PIPING_DEFAULT_LAYER_ONLY|PIPING_ONE_PER_TURF var/obj/machinery/portable_atmospherics/connected_device @@ -47,6 +50,9 @@ return 1 // Housekeeping and pipe network stuff below +/obj/machinery/atmospherics/portables_connector/get_neighbor_nodes_for_init() + return list(node) + /obj/machinery/atmospherics/portables_connector/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference) if(reference == node) network = new_network @@ -77,10 +83,9 @@ var/node_connect = dir for(var/obj/machinery/atmospherics/target in get_step(src,node_connect)) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node = target - break + if(can_be_node(target, 1)) + node = target + break update_icon() update_underlays() @@ -146,5 +151,4 @@ "\The [user] unfastens \the [src].", \ "You have unfastened \the [src].", \ "You hear a ratchet.") - new /obj/item/pipe(loc, make_from=src) - qdel(src) + deconstruct() diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm index 94924baedc..49cb05e9af 100755 --- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm @@ -1,6 +1,8 @@ /obj/machinery/atmospherics/trinary/atmos_filter icon = 'icons/atmos/filter.dmi' icon_state = "map" + construction_type = /obj/item/pipe/trinary/flippable + pipe_state = "filter" density = 0 level = 1 diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm index 2a70fe1591..84c5d49daa 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm @@ -1,6 +1,8 @@ /obj/machinery/atmospherics/trinary/mixer icon = 'icons/atmos/mixer.dmi' icon_state = "map" + construction_type = /obj/item/pipe/trinary/flippable + pipe_state = "mixer" density = 0 level = 1 @@ -133,6 +135,8 @@ // obj/machinery/atmospherics/trinary/mixer/t_mixer icon_state = "tmap" + construction_type = /obj/item/pipe/trinary // Can't flip a "T", its symmetrical + pipe_state = "t_mixer" dir = SOUTH initialize_directions = SOUTH|EAST|WEST tee = TRUE diff --git a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm index 79aa77dc6f..0a68f74c71 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm @@ -2,6 +2,7 @@ dir = SOUTH initialize_directions = SOUTH|NORTH|WEST use_power = 0 + pipe_flags = PIPING_DEFAULT_LAYER_ONLY|PIPING_ONE_PER_TURF var/mirrored = FALSE var/tee = FALSE @@ -64,10 +65,12 @@ "\The [user] unfastens \the [src].", \ "You have unfastened \the [src].", \ "You hear a ratchet.") - new /obj/item/pipe(loc, make_from=src) - qdel(src) + deconstruct() // Housekeeping and pipe network stuff below +/obj/machinery/atmospherics/trinary/get_neighbor_nodes_for_init() + return list(node1, node2, node3) + /obj/machinery/atmospherics/trinary/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference) if(reference == node1) network1 = new_network @@ -113,21 +116,9 @@ var/list/node_connects = get_node_connect_dirs() - for(var/obj/machinery/atmospherics/target in get_step(src,node_connects[1])) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node1 = target - break - for(var/obj/machinery/atmospherics/target in get_step(src,node_connects[2])) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node2 = target - break - for(var/obj/machinery/atmospherics/target in get_step(src,node_connects[3])) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node3 = target - break + STANDARD_ATMOS_CHOOSE_NODE(1, node_connects[1]) + STANDARD_ATMOS_CHOOSE_NODE(2, node_connects[2]) + STANDARD_ATMOS_CHOOSE_NODE(3, node_connects[3]) update_icon() update_underlays() diff --git a/code/ATMOSPHERICS/components/tvalve.dm b/code/ATMOSPHERICS/components/tvalve.dm index 2b64d6f5bb..b65c615174 100644 --- a/code/ATMOSPHERICS/components/tvalve.dm +++ b/code/ATMOSPHERICS/components/tvalve.dm @@ -1,6 +1,8 @@ /obj/machinery/atmospherics/tvalve icon = 'icons/atmos/tvalve.dmi' icon_state = "map_tvalve0" + construction_type = /obj/item/pipe/trinary/flippable + pipe_state = "mtvalve" name = "manual switching valve" desc = "A pipe valve" @@ -12,6 +14,7 @@ var/state = 0 // 0 = go straight, 1 = go to side var/mirrored = FALSE + var/tee = FALSE // Note: Tee not actually supported for T-valves: no sprites // like a trinary component, node1 is input, node2 is side output, node3 is straight output var/obj/machinery/atmospherics/node3 @@ -47,6 +50,9 @@ /obj/machinery/atmospherics/tvalve/init_dir() initialize_directions = get_initialize_directions_trinary(dir, mirrored) +/obj/machinery/atmospherics/tvalve/get_neighbor_nodes_for_init() + return list(node1, node2, node3) + /obj/machinery/atmospherics/tvalve/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference) if(reference == node1) network_node1 = new_network @@ -178,21 +184,9 @@ var/list/node_connects = get_node_connect_dirs() - for(var/obj/machinery/atmospherics/target in get_step(src,node_connects[1])) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node1 = target - break - for(var/obj/machinery/atmospherics/target in get_step(src,node_connects[2])) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node2 = target - break - for(var/obj/machinery/atmospherics/target in get_step(src,node_connects[3])) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node3 = target - break + STANDARD_ATMOS_CHOOSE_NODE(1, node_connects[1]) + STANDARD_ATMOS_CHOOSE_NODE(2, node_connects[2]) + STANDARD_ATMOS_CHOOSE_NODE(3, node_connects[3]) update_icon() update_underlays() @@ -262,6 +256,7 @@ name = "digital switching valve" desc = "A digitally controlled valve." icon = 'icons/atmos/digital_tvalve.dmi' + pipe_state = "dtvalve" var/frequency = 0 var/id = null @@ -348,8 +343,7 @@ "\The [user] unfastens \the [src].", \ "You have unfastened \the [src].", \ "You hear a ratchet.") - new /obj/item/pipe(loc, make_from=src) - qdel(src) + deconstruct() /obj/machinery/atmospherics/tvalve/mirrored icon_state = "map_tvalvem0" diff --git a/code/ATMOSPHERICS/components/unary/cold_sink.dm b/code/ATMOSPHERICS/components/unary/cold_sink.dm index 5759c39dcf..07b0052910 100644 --- a/code/ATMOSPHERICS/components/unary/cold_sink.dm +++ b/code/ATMOSPHERICS/components/unary/cold_sink.dm @@ -38,18 +38,15 @@ var/node_connect = dir for(var/obj/machinery/atmospherics/target in get_step(src, node_connect)) - if(target.initialize_directions & get_dir(target, src)) + if(can_be_node(target, 1)) node = target break - //copied from pipe construction code since heaters/freezers don't use fittings and weren't doing this check - this all really really needs to be refactored someday. - //check that there are no incompatible pipes/machinery in our own location - for(var/obj/machinery/atmospherics/M in src.loc) - if(M != src && (M.initialize_directions & node_connect) && M.check_connect_types(M,src)) // matches at least one direction on either type of pipe & same connection type - node = null - break + if(check_for_obstacles()) + node = null - update_icon() + if(node) + update_icon() /obj/machinery/atmospherics/unary/freezer/update_icon() if(node) diff --git a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm index 8a7fba153a..ed4010f81e 100644 --- a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm +++ b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm @@ -2,6 +2,7 @@ icon = 'icons/obj/atmospherics/heat_exchanger.dmi' icon_state = "intact" + pipe_state = "heunary" density = 1 name = "Heat Exchanger" @@ -83,5 +84,4 @@ "\The [user] unfastens \the [src].", \ "You have unfastened \the [src].", \ "You hear a ratchet.") - new /obj/item/pipe(loc, make_from=src) - qdel(src) + deconstruct() diff --git a/code/ATMOSPHERICS/components/unary/heat_source.dm b/code/ATMOSPHERICS/components/unary/heat_source.dm index a1e933b96a..bc1aaae118 100644 --- a/code/ATMOSPHERICS/components/unary/heat_source.dm +++ b/code/ATMOSPHERICS/components/unary/heat_source.dm @@ -39,18 +39,15 @@ //check that there is something to connect to for(var/obj/machinery/atmospherics/target in get_step(src, node_connect)) - if(target.initialize_directions & get_dir(target, src)) + if(can_be_node(target, 1)) node = target break - //copied from pipe construction code since heaters/freezers don't use fittings and weren't doing this check - this all really really needs to be refactored someday. - //check that there are no incompatible pipes/machinery in our own location - for(var/obj/machinery/atmospherics/M in src.loc) - if(M != src && (M.initialize_directions & node_connect) && M.check_connect_types(M,src)) // matches at least one direction on either type of pipe & same connection type - node = null - break + if(check_for_obstacles()) + node = null - update_icon() + if(node) + update_icon() /obj/machinery/atmospherics/unary/heater/update_icon() diff --git a/code/ATMOSPHERICS/components/unary/outlet_injector.dm b/code/ATMOSPHERICS/components/unary/outlet_injector.dm index 7c52cea895..9d980647a8 100644 --- a/code/ATMOSPHERICS/components/unary/outlet_injector.dm +++ b/code/ATMOSPHERICS/components/unary/outlet_injector.dm @@ -5,6 +5,7 @@ /obj/machinery/atmospherics/unary/outlet_injector icon = 'icons/atmos/injector.dmi' icon_state = "map_injector" + pipe_state = "injector" layer = 3 name = "air injector" diff --git a/code/ATMOSPHERICS/components/unary/unary_base.dm b/code/ATMOSPHERICS/components/unary/unary_base.dm index 77b135cdc5..12d6822ad4 100644 --- a/code/ATMOSPHERICS/components/unary/unary_base.dm +++ b/code/ATMOSPHERICS/components/unary/unary_base.dm @@ -1,6 +1,8 @@ /obj/machinery/atmospherics/unary dir = SOUTH initialize_directions = SOUTH + construction_type = /obj/item/pipe/directional + pipe_flags = PIPING_DEFAULT_LAYER_ONLY|PIPING_ONE_PER_TURF //layer = TURF_LAYER+0.1 var/datum/gas_mixture/air_contents @@ -21,6 +23,9 @@ initialize_directions = dir // Housekeeping and pipe network stuff below +/obj/machinery/atmospherics/unary/get_neighbor_nodes_for_init() + return list(node) + /obj/machinery/atmospherics/unary/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference) if(reference == node) network = new_network @@ -48,10 +53,9 @@ var/node_connect = dir for(var/obj/machinery/atmospherics/target in get_step(src,node_connect)) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node = target - break + if(can_be_node(target, 1)) + node = target + break update_icon() update_underlays() @@ -93,4 +97,20 @@ update_icon() update_underlays() - return null \ No newline at end of file + return null + +// Check if there are any other atmos machines in the same turf that will block this machine from initializing. +// Intended for use when a frame-constructable machine (i.e. not made from pipe fittings) wants to wrench down and connect. +// Returns TRUE if something is blocking, FALSE if its okay to continue. +/obj/machinery/atmospherics/unary/proc/check_for_obstacles() + for(var/obj/machinery/atmospherics/M in loc) + if(M == src) continue + if((M.pipe_flags & pipe_flags & PIPING_ONE_PER_TURF)) //Only one dense/requires density object per tile, eg connectors/cryo/heater/coolers. + visible_message("\The [src]'s cannot be connected, something is hogging the tile!") + return TRUE + if((M.piping_layer != piping_layer) && !((M.pipe_flags | flags) & PIPING_ALL_LAYER)) // Pipes on different layers can't block each other unless they are ALL_LAYER + continue + if(M.get_init_dirs() & get_init_dirs()) // matches at least one direction on either type of pipe + visible_message("\The [src]'s connector can't be connected, there is already a pipe at that location!") + return TRUE + return FALSE diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm index 17da4afcf7..9338516343 100644 --- a/code/ATMOSPHERICS/components/unary/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm @@ -10,6 +10,7 @@ /obj/machinery/atmospherics/unary/vent_pump icon = 'icons/atmos/vent_pump.dmi' icon_state = "map_vent" + pipe_state = "uvent" name = "Air Vent" desc = "Has a valve and pump attached to it" @@ -426,8 +427,7 @@ "\The [user] unfastens \the [src].", \ "You have unfastened \the [src].", \ "You hear a ratchet.") - new /obj/item/pipe(loc, make_from=src) - qdel(src) + deconstruct() #undef DEFAULT_PRESSURE_DELTA diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm index ad78f5a1f4..09b5fde7c1 100644 --- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm @@ -1,6 +1,7 @@ /obj/machinery/atmospherics/unary/vent_scrubber icon = 'icons/atmos/vent_scrubber.dmi' icon_state = "map_scrubber_off" + pipe_state = "scrubber" name = "Air Scrubber" desc = "Has a valve and pump attached to it" @@ -283,8 +284,7 @@ "\The [user] unfastens \the [src].", \ "You have unfastened \the [src].", \ "You hear a ratchet.") - new /obj/item/pipe(loc, make_from=src) - qdel(src) + deconstruct() /obj/machinery/atmospherics/unary/vent_scrubber/examine(mob/user) if(..(user, 1)) diff --git a/code/ATMOSPHERICS/components/valve.dm b/code/ATMOSPHERICS/components/valve.dm index 77aedf94e0..93e5da7c32 100644 --- a/code/ATMOSPHERICS/components/valve.dm +++ b/code/ATMOSPHERICS/components/valve.dm @@ -1,6 +1,8 @@ /obj/machinery/atmospherics/valve icon = 'icons/atmos/valve.dmi' icon_state = "map_valve0" + construction_type = /obj/item/pipe/binary + pipe_state = "mvalve" name = "manual valve" desc = "A pipe valve" @@ -45,6 +47,9 @@ if(EAST || WEST) initialize_directions = EAST|WEST +/obj/machinery/atmospherics/valve/get_neighbor_nodes_for_init() + return list(node1, node2) + /obj/machinery/atmospherics/valve/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference) if(reference == node1) network_node1 = new_network @@ -153,16 +158,8 @@ else if (!node2_dir) node2_dir = direction - for(var/obj/machinery/atmospherics/target in get_step(src,node1_dir)) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node1 = target - break - for(var/obj/machinery/atmospherics/target in get_step(src,node2_dir)) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node2 = target - break + STANDARD_ATMOS_CHOOSE_NODE(1, node1_dir) + STANDARD_ATMOS_CHOOSE_NODE(2, node2_dir) build_network() @@ -224,6 +221,7 @@ name = "digital valve" desc = "A digitally controlled valve." icon = 'icons/atmos/digital_valve.dmi' + pipe_state = "dvalve" var/frequency = 0 var/id = null @@ -306,8 +304,7 @@ "\The [user] unfastens \the [src].", \ "You have unfastened \the [src].", \ "You hear a ratchet.") - new /obj/item/pipe(loc, make_from=src) - qdel(src) + deconstruct() /obj/machinery/atmospherics/valve/examine(mob/user) ..() diff --git a/code/ATMOSPHERICS/mainspipe.dm b/code/ATMOSPHERICS/mainspipe.dm index 1b0c617564..a38587baf5 100644 --- a/code/ATMOSPHERICS/mainspipe.dm +++ b/code/ATMOSPHERICS/mainspipe.dm @@ -92,6 +92,9 @@ obj/machinery/atmospherics/mains_pipe else return 1 + get_neighbor_nodes_for_init() + return nodes + disconnect() ..() for(var/obj/machinery/atmospherics/pipe/mains_component/node in nodes) diff --git a/code/ATMOSPHERICS/pipes/cap.dm b/code/ATMOSPHERICS/pipes/cap.dm index de81c60200..4bcf200140 100644 --- a/code/ATMOSPHERICS/pipes/cap.dm +++ b/code/ATMOSPHERICS/pipes/cap.dm @@ -14,6 +14,9 @@ dir = SOUTH initialize_directions = SOUTH + construction_type = /obj/item/pipe/directional + pipe_state = "cap" + var/obj/machinery/atmospherics/node /obj/machinery/atmospherics/pipe/cap/init_dir() @@ -56,10 +59,9 @@ /obj/machinery/atmospherics/pipe/cap/atmos_init() for(var/obj/machinery/atmospherics/target in get_step(src, dir)) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node = target - break + if (can_be_node(target, 1)) + node = target + break var/turf/T = src.loc // hide if turf is not intact if(level == 1 && !T.is_plating()) hide(1) @@ -77,6 +79,7 @@ desc = "An endcap for scrubbers pipes" icon_state = "cap-scrubbers" connect_types = CONNECT_TYPE_SCRUBBER + piping_layer = PIPING_LAYER_SCRUBBER layer = 2.38 icon_connect_type = "-scrubbers" color = PIPE_COLOR_RED @@ -86,6 +89,7 @@ desc = "An endcap for supply pipes" icon_state = "cap-supply" connect_types = CONNECT_TYPE_SUPPLY + piping_layer = PIPING_LAYER_SUPPLY layer = 2.39 icon_connect_type = "-supply" color = PIPE_COLOR_BLUE @@ -100,6 +104,7 @@ desc = "An endcap for scrubbers pipes" icon_state = "cap-f-scrubbers" connect_types = CONNECT_TYPE_SCRUBBER + piping_layer = PIPING_LAYER_SCRUBBER layer = 2.38 icon_connect_type = "-scrubbers" color = PIPE_COLOR_RED @@ -109,6 +114,7 @@ desc = "An endcap for supply pipes" icon_state = "cap-f-supply" connect_types = CONNECT_TYPE_SUPPLY + piping_layer = PIPING_LAYER_SUPPLY layer = 2.39 icon_connect_type = "-supply" color = PIPE_COLOR_BLUE diff --git a/code/ATMOSPHERICS/pipes/he_pipes.dm b/code/ATMOSPHERICS/pipes/he_pipes.dm index 8953739a9c..fe6580b1ce 100644 --- a/code/ATMOSPHERICS/pipes/he_pipes.dm +++ b/code/ATMOSPHERICS/pipes/he_pipes.dm @@ -8,6 +8,10 @@ color = "#404040" level = 2 connect_types = CONNECT_TYPE_HE + pipe_flags = PIPING_DEFAULT_LAYER_ONLY + construction_type = /obj/item/pipe/binary/bendable + pipe_state = "he" + layer = 2.41 var/initialize_directions_he var/surface = 2 //surface area in m^2 @@ -27,6 +31,16 @@ /obj/machinery/atmospherics/pipe/simple/heat_exchanging/init_dir() ..() initialize_directions_he = initialize_directions // The auto-detection from /pipe is good enough for a simple HE pipe + initialize_directions = 0 + +/obj/machinery/atmospherics/pipe/simple/heat_exchanging/get_init_dirs() + return ..() | initialize_directions_he + +// Use initialize_directions_he to connect to neighbors instead. +/obj/machinery/atmospherics/pipe/simple/heat_exchanging/can_be_node(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target) + if(!istype(target)) + return FALSE + return (target.initialize_directions_he & get_dir(target,src)) && check_connectable(target) && target.check_connectable(src) /obj/machinery/atmospherics/pipe/simple/heat_exchanging/atmos_init() normalize_dir() @@ -41,11 +55,11 @@ node2_dir = direction for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,node1_dir)) - if(target.initialize_directions_he & get_dir(target,src)) + if(can_be_node(target, 1)) node1 = target break for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src,node2_dir)) - if(target.initialize_directions_he & get_dir(target,src)) + if(can_be_node(target, 2)) node2 = target break if(!node1 && !node2) @@ -117,6 +131,8 @@ pipe_icon = "hejunction" level = 2 connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_HE + construction_type = /obj/item/pipe/directional + pipe_state = "junction" minimum_temperature_difference = 300 thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT @@ -136,6 +152,18 @@ initialize_directions = EAST initialize_directions_he = WEST + // Allow ourselves to make connections to either HE or normal pipes depending on which node we are doing. +/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/can_be_node(obj/machinery/atmospherics/target, node_num) + var/target_initialize_directions + switch(node_num) + if(1) + target_initialize_directions = target.initialize_directions // Node1 is towards normal pipes + if(2) + var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/H = target + if(!istype(H)) + return FALSE + target_initialize_directions = H.initialize_directions_he // Node2 is towards HE pies. + return (target_initialize_directions & get_dir(target,src)) && check_connectable(target) && target.check_connectable(src) /obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/atmos_init() for(var/obj/machinery/atmospherics/target in get_step(src,initialize_directions)) diff --git a/code/ATMOSPHERICS/pipes/manifold.dm b/code/ATMOSPHERICS/pipes/manifold.dm index 1b9afd9c63..bca6dd3379 100644 --- a/code/ATMOSPHERICS/pipes/manifold.dm +++ b/code/ATMOSPHERICS/pipes/manifold.dm @@ -12,6 +12,9 @@ dir = SOUTH initialize_directions = EAST|NORTH|WEST + construction_type = /obj/item/pipe/trinary + pipe_state = "manifold" + var/obj/machinery/atmospherics/node3 level = 1 @@ -116,11 +119,10 @@ for(var/direction in cardinal) if(direction&connect_directions) for(var/obj/machinery/atmospherics/target in get_step(src,direction)) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node1 = target - connect_directions &= ~direction - break + if (can_be_node(target, 1)) + node1 = target + connect_directions &= ~direction + break if (node1) break @@ -128,11 +130,10 @@ for(var/direction in cardinal) if(direction&connect_directions) for(var/obj/machinery/atmospherics/target in get_step(src,direction)) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node2 = target - connect_directions &= ~direction - break + if (can_be_node(target, 2)) + node2 = target + connect_directions &= ~direction + break if (node2) break @@ -140,11 +141,10 @@ for(var/direction in cardinal) if(direction&connect_directions) for(var/obj/machinery/atmospherics/target in get_step(src,direction)) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node3 = target - connect_directions &= ~direction - break + if (can_be_node(target, 3)) + node3 = target + connect_directions &= ~direction + break if (node3) break @@ -165,6 +165,7 @@ desc = "A manifold composed of scrubbers pipes" icon_state = "map-scrubbers" connect_types = CONNECT_TYPE_SCRUBBER + piping_layer = PIPING_LAYER_SCRUBBER layer = 2.38 icon_connect_type = "-scrubbers" color = PIPE_COLOR_RED @@ -174,6 +175,7 @@ desc = "A manifold composed of supply pipes" icon_state = "map-supply" connect_types = CONNECT_TYPE_SUPPLY + piping_layer = PIPING_LAYER_SUPPLY layer = 2.39 icon_connect_type = "-supply" color = PIPE_COLOR_BLUE @@ -209,6 +211,7 @@ desc = "A manifold composed of scrubbers pipes" icon_state = "map-scrubbers" connect_types = CONNECT_TYPE_SCRUBBER + piping_layer = PIPING_LAYER_SCRUBBER layer = 2.38 icon_connect_type = "-scrubbers" color = PIPE_COLOR_RED @@ -218,6 +221,7 @@ desc = "A manifold composed of supply pipes" icon_state = "map-supply" connect_types = CONNECT_TYPE_SUPPLY + piping_layer = PIPING_LAYER_SUPPLY layer = 2.39 icon_connect_type = "-supply" color = PIPE_COLOR_BLUE diff --git a/code/ATMOSPHERICS/pipes/manifold4w.dm b/code/ATMOSPHERICS/pipes/manifold4w.dm index ba360eefd8..88adc47d62 100644 --- a/code/ATMOSPHERICS/pipes/manifold4w.dm +++ b/code/ATMOSPHERICS/pipes/manifold4w.dm @@ -12,6 +12,9 @@ dir = SOUTH initialize_directions = NORTH|SOUTH|EAST|WEST + construction_type = /obj/item/pipe/quaternary + pipe_state = "manifold4w" + var/obj/machinery/atmospherics/node3 var/obj/machinery/atmospherics/node4 @@ -127,29 +130,25 @@ /obj/machinery/atmospherics/pipe/manifold4w/atmos_init() - for(var/obj/machinery/atmospherics/target in get_step(src,1)) - if(target.initialize_directions & 2) - if (check_connect_types(target,src)) - node1 = target - break + for(var/obj/machinery/atmospherics/target in get_step(src, NORTH)) + if (can_be_node(target, 1)) + node1 = target + break - for(var/obj/machinery/atmospherics/target in get_step(src,2)) - if(target.initialize_directions & 1) - if (check_connect_types(target,src)) - node2 = target - break + for(var/obj/machinery/atmospherics/target in get_step(src, SOUTH)) + if (can_be_node(target, 2)) + node2 = target + break - for(var/obj/machinery/atmospherics/target in get_step(src,4)) - if(target.initialize_directions & 8) - if (check_connect_types(target,src)) - node3 = target - break + for(var/obj/machinery/atmospherics/target in get_step(src, EAST)) + if (can_be_node(target, 3)) + node3 = target + break - for(var/obj/machinery/atmospherics/target in get_step(src,8)) - if(target.initialize_directions & 4) - if (check_connect_types(target,src)) - node4 = target - break + for(var/obj/machinery/atmospherics/target in get_step(src, WEST)) + if (can_be_node(target, 4)) + node4 = target + break if(!node1 && !node2 && !node3 && !node4) qdel(src) @@ -168,6 +167,7 @@ desc = "A manifold composed of scrubbers pipes" icon_state = "map_4way-scrubbers" connect_types = CONNECT_TYPE_SCRUBBER + piping_layer = PIPING_LAYER_SCRUBBER layer = 2.38 icon_connect_type = "-scrubbers" color = PIPE_COLOR_RED @@ -177,6 +177,7 @@ desc = "A manifold composed of supply pipes" icon_state = "map_4way-supply" connect_types = CONNECT_TYPE_SUPPLY + piping_layer = PIPING_LAYER_SUPPLY layer = 2.39 icon_connect_type = "-supply" color = PIPE_COLOR_BLUE @@ -212,6 +213,7 @@ desc = "A manifold composed of scrubbers pipes" icon_state = "map_4way-scrubbers" connect_types = CONNECT_TYPE_SCRUBBER + piping_layer = PIPING_LAYER_SCRUBBER layer = 2.38 icon_connect_type = "-scrubbers" color = PIPE_COLOR_RED @@ -221,6 +223,7 @@ desc = "A manifold composed of supply pipes" icon_state = "map_4way-supply" connect_types = CONNECT_TYPE_SUPPLY + piping_layer = PIPING_LAYER_SUPPLY layer = 2.39 icon_connect_type = "-supply" color = PIPE_COLOR_BLUE diff --git a/code/ATMOSPHERICS/pipes/pipe_base.dm b/code/ATMOSPHERICS/pipes/pipe_base.dm index 94167e01f6..4e852ed0c8 100644 --- a/code/ATMOSPHERICS/pipes/pipe_base.dm +++ b/code/ATMOSPHERICS/pipes/pipe_base.dm @@ -10,6 +10,8 @@ layer = 2.4 //under wires with their 2.44 use_power = 0 + pipe_flags = 0 // Does not have PIPING_DEFAULT_LAYER_ONLY flag. + var/alert_pressure = 80*ONE_ATMOSPHERE //minimum pressure before check_pressure(...) should be called @@ -31,6 +33,10 @@ /obj/machinery/atmospherics/pipe/proc/pipeline_expansion() return null +// For pipes this is the same as pipeline_expansion() +/obj/machinery/atmospherics/pipe/get_neighbor_nodes_for_init() + return pipeline_expansion() + /obj/machinery/atmospherics/pipe/proc/check_pressure(pressure) //Return 1 if parent should continue checking other pipes //Return null if parent should stop checking other pipes. Recall: qdel(src) will by default return null @@ -69,7 +75,11 @@ qdel_null(parent) if(air_temporary) loc.assume_air(air_temporary) - + for(var/obj/machinery/meter/meter in loc) + if(meter.target == src) + var/obj/item/pipe_meter/PM = new /obj/item/pipe_meter(loc) + meter.transfer_fingerprints_to(PM) + qdel(meter) . = ..() /obj/machinery/atmospherics/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) @@ -96,12 +106,7 @@ "\The [user] unfastens \the [src].", \ "You have unfastened \the [src].", \ "You hear a ratchet.") - new /obj/item/pipe(loc, make_from=src) - for (var/obj/machinery/meter/meter in T) - if (meter.target == src) - new /obj/item/pipe_meter(T) - qdel(meter) - qdel(src) + deconstruct() /obj/machinery/atmospherics/pipe/proc/change_color(var/new_color) //only pass valid pipe colors please ~otherwise your pipe will turn invisible diff --git a/code/ATMOSPHERICS/pipes/simple.dm b/code/ATMOSPHERICS/pipes/simple.dm index f676c1ac38..77290e5d8a 100644 --- a/code/ATMOSPHERICS/pipes/simple.dm +++ b/code/ATMOSPHERICS/pipes/simple.dm @@ -13,6 +13,10 @@ dir = SOUTH initialize_directions = SOUTH|NORTH + pipe_flags = PIPING_CARDINAL_AUTONORMALIZE + construction_type = /obj/item/pipe/binary/bendable + pipe_state = "simple" + var/minimum_temperature_difference = 300 var/thermal_conductivity = 0 //WALL_HEAT_TRANSFER_COEFFICIENT No @@ -47,9 +51,13 @@ /obj/machinery/atmospherics/pipe/simple/init_dir() switch(dir) - if(SOUTH || NORTH) + if(SOUTH) initialize_directions = SOUTH|NORTH - if(EAST || WEST) + if(NORTH) + initialize_directions = SOUTH|NORTH + if(EAST) + initialize_directions = EAST|WEST + if(WEST) initialize_directions = EAST|WEST if(NORTHEAST) initialize_directions = NORTH|EAST @@ -124,15 +132,13 @@ node2_dir = direction for(var/obj/machinery/atmospherics/target in get_step(src,node1_dir)) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node1 = target - break + if(can_be_node(target, 1)) + node1 = target + break for(var/obj/machinery/atmospherics/target in get_step(src,node2_dir)) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node2 = target - break + if(can_be_node(target, 2)) + node2 = target + break if(!node1 && !node2) qdel(src) @@ -166,6 +172,7 @@ desc = "A one meter section of scrubbers pipe" icon_state = "intact-scrubbers" connect_types = CONNECT_TYPE_SCRUBBER + piping_layer = PIPING_LAYER_SCRUBBER layer = 2.38 icon_connect_type = "-scrubbers" color = PIPE_COLOR_RED @@ -175,6 +182,7 @@ desc = "A one meter section of supply pipe" icon_state = "intact-supply" connect_types = CONNECT_TYPE_SUPPLY + piping_layer = PIPING_LAYER_SUPPLY layer = 2.39 icon_connect_type = "-supply" color = PIPE_COLOR_BLUE @@ -210,6 +218,7 @@ desc = "A one meter section of scrubbers pipe" icon_state = "intact-scrubbers" connect_types = CONNECT_TYPE_SCRUBBER + piping_layer = PIPING_LAYER_SCRUBBER layer = 2.38 icon_connect_type = "-scrubbers" color = PIPE_COLOR_RED @@ -219,6 +228,7 @@ desc = "A one meter section of supply pipe" icon_state = "intact-supply" connect_types = CONNECT_TYPE_SUPPLY + piping_layer = PIPING_LAYER_SUPPLY layer = 2.39 icon_connect_type = "-supply" color = PIPE_COLOR_BLUE @@ -248,6 +258,9 @@ icon = 'icons/obj/atmospherics/red_pipe.dmi' icon_state = "intact" + construction_type = /obj/item/pipe/binary/bendable + pipe_state = "insulated" + minimum_temperature_difference = 10000 thermal_conductivity = 0 maximum_pressure = 1000*ONE_ATMOSPHERE diff --git a/code/ATMOSPHERICS/pipes/tank.dm b/code/ATMOSPHERICS/pipes/tank.dm index 07ce8d5b71..c96f4ddf1d 100644 --- a/code/ATMOSPHERICS/pipes/tank.dm +++ b/code/ATMOSPHERICS/pipes/tank.dm @@ -14,6 +14,7 @@ level = 1 dir = SOUTH initialize_directions = SOUTH + pipe_flags = PIPING_DEFAULT_LAYER_ONLY density = 1 /obj/machinery/atmospherics/pipe/tank/New() @@ -48,10 +49,9 @@ var/connect_direction = dir for(var/obj/machinery/atmospherics/target in get_step(src,connect_direction)) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node1 = target - break + if (can_be_node(target, 1)) + node1 = target + break update_underlays() diff --git a/code/ATMOSPHERICS/pipes/universal.dm b/code/ATMOSPHERICS/pipes/universal.dm index 1017751aa1..2d8bd09dff 100644 --- a/code/ATMOSPHERICS/pipes/universal.dm +++ b/code/ATMOSPHERICS/pipes/universal.dm @@ -6,6 +6,9 @@ desc = "An adapter for regular, supply and scrubbers pipes" connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SUPPLY|CONNECT_TYPE_SCRUBBER icon_state = "map_universal" + pipe_flags = PIPING_ALL_LAYER|PIPING_CARDINAL_AUTONORMALIZE + construction_type = /obj/item/pipe/binary + pipe_state = "universal" /obj/machinery/atmospherics/pipe/simple/visible/universal/update_icon(var/safety = 0) if(!check_icon_cache()) @@ -28,7 +31,7 @@ universal_underlays(node2) else universal_underlays(,dir) - universal_underlays(dir, -180) + universal_underlays(,turn(dir, -180)) /obj/machinery/atmospherics/pipe/simple/visible/universal/update_underlays() ..() @@ -41,6 +44,9 @@ desc = "An adapter for regular, supply and scrubbers pipes" connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SUPPLY|CONNECT_TYPE_SCRUBBER icon_state = "map_universal" + pipe_flags = PIPING_ALL_LAYER|PIPING_CARDINAL_AUTONORMALIZE + construction_type = /obj/item/pipe/binary + pipe_state = "universal" /obj/machinery/atmospherics/pipe/simple/hidden/universal/update_icon(var/safety = 0) if(!check_icon_cache()) diff --git a/code/ATMOSPHERICS/pipes/vent.dm b/code/ATMOSPHERICS/pipes/vent.dm index 74eebb29a1..4a1dc5696d 100644 --- a/code/ATMOSPHERICS/pipes/vent.dm +++ b/code/ATMOSPHERICS/pipes/vent.dm @@ -14,6 +14,9 @@ dir = SOUTH initialize_directions = SOUTH + pipe_flags = PIPING_DEFAULT_LAYER_ONLY + construction_type = /obj/item/pipe/directional + pipe_state = "passive vent" var/build_killswitch = 1 @@ -58,10 +61,9 @@ var/connect_direction = dir for(var/obj/machinery/atmospherics/target in get_step(src,connect_direction)) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node1 = target - break + if (can_be_node(target, 1)) + node1 = target + break update_icon() diff --git a/code/__defines/construction.dm b/code/__defines/construction.dm index 7aceb1ffc4..837ad7ed38 100644 --- a/code/__defines/construction.dm +++ b/code/__defines/construction.dm @@ -1,4 +1,6 @@ - +// +// Frame construction +// // Frame construction states #define FRAME_PLACED 0 // Has been placed (can be anchored or not). @@ -16,3 +18,44 @@ // Does the frame get built on the floor or a wall? #define FRAME_STYLE_FLOOR "floor" #define FRAME_STYLE_WALL "wall" + +// +// Pipe Construction +// + +//Construction Orientation Types - Each of these categories has a different selection of how pipes can rotate and flip. Used for RPD. +#define PIPE_STRAIGHT 0 //2 directions: N/S, E/W +#define PIPE_BENDABLE 1 //6 directions: N/S, E/W, N/E, N/W, S/E, S/W +#define PIPE_TRINARY 2 //4 directions: N/E/S, E/S/W, S/W/N, W/N/E +#define PIPE_TRIN_M 3 //8 directions: N->S+E, S->N+E, N->S+W, S->N+W, E->W+S, W->E+S, E->W+N, W->E+N +#define PIPE_DIRECTIONAL 4 //4 directions: N, S, E, W +#define PIPE_ONEDIR 5 //1 direction: N/S/E/W +#define PIPE_UNARY_FLIPPABLE 6 //8 directions: N, S, E, W, N-flipped, S-flipped, E-flipped, W-flipped +#define PIPE_TRIN_T 7 //8 directions: N->S+E, S->N+E, N->S+W, S->N+W, E->W+S, W->E+S, E->W+N, W->E+N + +// Pipe connectivity bit flags +#define CONNECT_TYPE_REGULAR 1 +#define CONNECT_TYPE_SUPPLY 2 +#define CONNECT_TYPE_SCRUBBER 4 +#define CONNECT_TYPE_HE 8 + +// We are based on the three named layers of supply, regular, and scrubber. +#define PIPING_LAYER_SUPPLY 1 +#define PIPING_LAYER_REGULAR 2 +#define PIPING_LAYER_SCRUBBER 3 +#define PIPING_LAYER_DEFAULT PIPING_LAYER_REGULAR + +// Pipe flags +#define PIPING_ALL_LAYER 1 //intended to connect with all layers, check for all instead of just one. +#define PIPING_ONE_PER_TURF 2 //can only be built if nothing else with this flag is on the tile already. +#define PIPING_DEFAULT_LAYER_ONLY 4 //can only exist at PIPING_LAYER_DEFAULT +#define PIPING_CARDINAL_AUTONORMALIZE 8 //north/south east/west doesn't matter, auto normalize on build. + +// Macro for easy use of boilerplate code for searching for a valid node connection. +#define STANDARD_ATMOS_CHOOSE_NODE(node_num, direction) \ + for(var/obj/machinery/atmospherics/target in get_step(src, direction)) { \ + if(can_be_node(target, node_num)) { \ + node##node_num = target; \ + break; \ + } \ + } diff --git a/code/_helpers/logging.dm b/code/_helpers/logging.dm index 06b9fc72fa..83f76bcc9e 100644 --- a/code/_helpers/logging.dm +++ b/code/_helpers/logging.dm @@ -140,7 +140,7 @@ //more or less a logging utility //Always return "Something/(Something)", even if it's an error message. -/proc/key_name(var/whom, var/include_link = null, var/highlight_special_characters = 1) +/proc/key_name(var/whom, var/include_link = FALSE, var/include_name = TRUE, var/highlight_special_characters = TRUE) var/mob/M var/client/C var/key @@ -186,17 +186,18 @@ else . += "INVALID" - var/name = "INVALID" - if(M) - if(M.real_name) - name = M.real_name - else if(M.name) - name = M.name + if(include_name) + var/name = "INVALID" + if(M) + if(M.real_name) + name = M.real_name + else if(M.name) + name = M.name - if(include_link && is_special_character(M) && highlight_special_characters) - name = "[name]" //Orange - - . += "/([name])" + if(include_link && is_special_character(M) && highlight_special_characters) + name = "[name]" //Orange + + . += "/([name])" return . diff --git a/code/_helpers/logging_vr.dm b/code/_helpers/logging_vr.dm index b87da0a8b5..66a91e0c2e 100644 --- a/code/_helpers/logging_vr.dm +++ b/code/_helpers/logging_vr.dm @@ -1,11 +1,11 @@ /proc/log_nsay(text, inside, mob/speaker) if (config.log_say) - diary << "\[[time_stamp()]]NSAY (NIF:[inside]): [speaker.simple_info_line()]: [text][log_end]" + diary << "\[[time_stamp()]]NSAY (NIF:[inside]): [speaker.simple_info_line()]: [html_decode(text)][log_end]" /proc/log_nme(text, inside, mob/speaker) if (config.log_emote) - diary << "\[[time_stamp()]]NME (NIF:[inside]): [speaker.simple_info_line()]: [text][log_end]" + diary << "\[[time_stamp()]]NME (NIF:[inside]): [speaker.simple_info_line()]: [html_decode(text)][log_end]" /proc/log_subtle(text, mob/speaker) if (config.log_emote) - diary << "\[[time_stamp()]]SUBTLE: [speaker.simple_info_line()]: [text][log_end]" + diary << "\[[time_stamp()]]SUBTLE: [speaker.simple_info_line()]: [html_decode(text)][log_end]" diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm index 1ba5ec30b5..76f1f9f780 100644 --- a/code/_helpers/mobs.dm +++ b/code/_helpers/mobs.dm @@ -285,3 +285,16 @@ Proc for attack log creation, because really why not else . = getCompoundIcon(desired) cached_character_icons[cachekey] = . + +/proc/getviewsize(view) + var/viewX + var/viewY + if(isnum(view)) + var/totalviewrange = 1 + 2 * view + viewX = totalviewrange + viewY = totalviewrange + else + var/list/viewrangelist = splittext(view,"x") + viewX = text2num(viewrangelist[1]) + viewY = text2num(viewrangelist[2]) + return list(viewX, viewY) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index c994aff121..e18970802e 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -511,3 +511,9 @@ /atom/proc/AllowDrop() return FALSE + +/atom/proc/get_nametag_name(mob/user) + return name + +/atom/proc/get_nametag_desc(mob/user) + return "" //Desc itself is often too long to use diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index f03e56e642..e4e42bbd7b 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -2,1317 +2,273 @@ Buildable pipes Buildable meters */ -#define PIPE_SIMPLE_STRAIGHT 0 -#define PIPE_SIMPLE_BENT 1 -#define PIPE_HE_STRAIGHT 2 -#define PIPE_HE_BENT 3 -#define PIPE_CONNECTOR 4 -#define PIPE_MANIFOLD 5 -#define PIPE_JUNCTION 6 -#define PIPE_UVENT 7 -#define PIPE_MVALVE 8 -#define PIPE_PUMP 9 -#define PIPE_SCRUBBER 10 -#define PIPE_INSULATED_STRAIGHT 11 -#define PIPE_INSULATED_BENT 12 -#define PIPE_GAS_FILTER 13 -#define PIPE_GAS_MIXER 14 -#define PIPE_PASSIVE_GATE 15 -#define PIPE_VOLUME_PUMP 16 -#define PIPE_HEAT_EXCHANGE 17 -#define PIPE_MTVALVE 18 -#define PIPE_MANIFOLD4W 19 -#define PIPE_CAP 20 -///// Z-Level stuff -#define PIPE_UP 21 -#define PIPE_DOWN 22 -///// Z-Level stuff -#define PIPE_GAS_FILTER_M 23 -#define PIPE_GAS_MIXER_T 24 -#define PIPE_GAS_MIXER_M 25 -#define PIPE_OMNI_MIXER 26 -#define PIPE_OMNI_FILTER 27 -///// Supply, scrubbers and universal pipes -#define PIPE_UNIVERSAL 28 -#define PIPE_SUPPLY_STRAIGHT 29 -#define PIPE_SUPPLY_BENT 30 -#define PIPE_SCRUBBERS_STRAIGHT 31 -#define PIPE_SCRUBBERS_BENT 32 -#define PIPE_SUPPLY_MANIFOLD 33 -#define PIPE_SCRUBBERS_MANIFOLD 34 -#define PIPE_SUPPLY_MANIFOLD4W 35 -#define PIPE_SCRUBBERS_MANIFOLD4W 36 -#define PIPE_SUPPLY_UP 37 -#define PIPE_SCRUBBERS_UP 38 -#define PIPE_SUPPLY_DOWN 39 -#define PIPE_SCRUBBERS_DOWN 40 -#define PIPE_SUPPLY_CAP 41 -#define PIPE_SCRUBBERS_CAP 42 -///// Mirrored T-valve ~ because I couldn't be bothered re-sorting all of the defines -#define PIPE_MTVALVEM 43 -///// Digital Valves sit here because otherwise we're resorting every define. -#define PIPE_DVALVE 44 -#define PIPE_DTVALVE 45 -#define PIPE_DTVALVEM 46 - -#define PIPE_PASSIVE_VENT 47 /obj/item/pipe name = "pipe" - desc = "A pipe" - var/pipe_type = 0 - //var/pipe_dir = 0 + desc = "A pipe." + var/pipe_type var/pipename - var/connect_types = CONNECT_TYPE_REGULAR force = 7 + throwforce = 7 icon = 'icons/obj/pipe-item.dmi' icon_state = "simple" item_state = "buildpipe" w_class = ITEMSIZE_NORMAL level = 2 + var/piping_layer = PIPING_LAYER_DEFAULT + var/dispenser_class // Tells the dispenser what orientations we support, so RPD can show previews. -/obj/item/pipe/New(var/loc, var/pipe_type as num, var/dir as num, var/obj/machinery/atmospherics/make_from = null) - ..() - if (make_from) - src.set_dir(make_from.dir) - src.pipename = make_from.name - if(make_from.req_access) - src.req_access = make_from.req_access - if(make_from.req_one_access) - src.req_one_access = make_from.req_one_access - color = make_from.pipe_color - var/is_bent - if (make_from.initialize_directions in list(NORTH|SOUTH, WEST|EAST)) - is_bent = 0 - else - is_bent = 1 - if (istype(make_from, /obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction)) - src.pipe_type = PIPE_JUNCTION - connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_HE - else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/heat_exchanging)) - src.pipe_type = PIPE_HE_STRAIGHT + is_bent - connect_types = CONNECT_TYPE_HE - else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/insulated)) - src.pipe_type = PIPE_INSULATED_STRAIGHT + is_bent - else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/visible/supply) || istype(make_from, /obj/machinery/atmospherics/pipe/simple/hidden/supply)) - src.pipe_type = PIPE_SUPPLY_STRAIGHT + is_bent - connect_types = CONNECT_TYPE_SUPPLY - src.color = PIPE_COLOR_BLUE - else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/visible/scrubbers) || istype(make_from, /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers)) - src.pipe_type = PIPE_SCRUBBERS_STRAIGHT + is_bent - connect_types = CONNECT_TYPE_SCRUBBER - src.color = PIPE_COLOR_RED - else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/visible/universal) || istype(make_from, /obj/machinery/atmospherics/pipe/simple/hidden/universal)) - src.pipe_type = PIPE_UNIVERSAL - connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SUPPLY|CONNECT_TYPE_SCRUBBER - else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple)) - src.pipe_type = PIPE_SIMPLE_STRAIGHT + is_bent - else if(istype(make_from, /obj/machinery/atmospherics/portables_connector)) - src.pipe_type = PIPE_CONNECTOR - else if(istype(make_from, /obj/machinery/atmospherics/pipe/manifold/visible/supply) || istype(make_from, /obj/machinery/atmospherics/pipe/manifold/hidden/supply)) - src.pipe_type = PIPE_SUPPLY_MANIFOLD - connect_types = CONNECT_TYPE_SUPPLY - src.color = PIPE_COLOR_BLUE - else if(istype(make_from, /obj/machinery/atmospherics/pipe/manifold/visible/scrubbers) || istype(make_from, /obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers)) - src.pipe_type = PIPE_SCRUBBERS_MANIFOLD - connect_types = CONNECT_TYPE_SCRUBBER - src.color = PIPE_COLOR_RED - else if(istype(make_from, /obj/machinery/atmospherics/pipe/manifold)) - src.pipe_type = PIPE_MANIFOLD - else if(istype(make_from, /obj/machinery/atmospherics/unary/vent_pump)) - src.pipe_type = PIPE_UVENT - else if(istype(make_from, /obj/machinery/atmospherics/valve/digital)) - src.pipe_type = PIPE_DVALVE - else if(istype(make_from, /obj/machinery/atmospherics/valve)) - src.pipe_type = PIPE_MVALVE - else if(istype(make_from, /obj/machinery/atmospherics/binary/pump/high_power)) - src.pipe_type = PIPE_VOLUME_PUMP - else if(istype(make_from, /obj/machinery/atmospherics/binary/pump)) - src.pipe_type = PIPE_PUMP - else if(istype(make_from, /obj/machinery/atmospherics/trinary/atmos_filter/m_filter)) - src.pipe_type = PIPE_GAS_FILTER_M - else if(istype(make_from, /obj/machinery/atmospherics/trinary/mixer/t_mixer)) - src.pipe_type = PIPE_GAS_MIXER_T - else if(istype(make_from, /obj/machinery/atmospherics/trinary/mixer/m_mixer)) - src.pipe_type = PIPE_GAS_MIXER_M - else if(istype(make_from, /obj/machinery/atmospherics/trinary/atmos_filter)) - src.pipe_type = PIPE_GAS_FILTER - else if(istype(make_from, /obj/machinery/atmospherics/trinary/mixer)) - src.pipe_type = PIPE_GAS_MIXER - else if(istype(make_from, /obj/machinery/atmospherics/unary/vent_scrubber)) - src.pipe_type = PIPE_SCRUBBER - else if(istype(make_from, /obj/machinery/atmospherics/binary/passive_gate)) - src.pipe_type = PIPE_PASSIVE_GATE - else if(istype(make_from, /obj/machinery/atmospherics/unary/heat_exchanger)) - src.pipe_type = PIPE_HEAT_EXCHANGE - else if(istype(make_from, /obj/machinery/atmospherics/tvalve/digital/mirrored)) - src.pipe_type = PIPE_DTVALVEM - else if(istype(make_from, /obj/machinery/atmospherics/tvalve/mirrored)) - src.pipe_type = PIPE_MTVALVEM - else if(istype(make_from, /obj/machinery/atmospherics/tvalve/digital)) - src.pipe_type = PIPE_DTVALVE - else if(istype(make_from, /obj/machinery/atmospherics/tvalve)) - src.pipe_type = PIPE_MTVALVE - else if(istype(make_from, /obj/machinery/atmospherics/pipe/manifold4w/visible/supply) || istype(make_from, /obj/machinery/atmospherics/pipe/manifold4w/hidden/supply)) - src.pipe_type = PIPE_SUPPLY_MANIFOLD4W - connect_types = CONNECT_TYPE_SUPPLY - src.color = PIPE_COLOR_BLUE - else if(istype(make_from, /obj/machinery/atmospherics/pipe/manifold4w/visible/scrubbers) || istype(make_from, /obj/machinery/atmospherics/pipe/manifold4w/hidden/scrubbers)) - src.pipe_type = PIPE_SCRUBBERS_MANIFOLD4W - connect_types = CONNECT_TYPE_SCRUBBER - src.color = PIPE_COLOR_RED - else if(istype(make_from, /obj/machinery/atmospherics/pipe/manifold4w)) - src.pipe_type = PIPE_MANIFOLD4W - else if(istype(make_from, /obj/machinery/atmospherics/pipe/cap/visible/supply) || istype(make_from, /obj/machinery/atmospherics/pipe/cap/hidden/supply)) - src.pipe_type = PIPE_SUPPLY_CAP - connect_types = CONNECT_TYPE_SUPPLY - src.color = PIPE_COLOR_BLUE - else if(istype(make_from, /obj/machinery/atmospherics/pipe/cap/visible/scrubbers) || istype(make_from, /obj/machinery/atmospherics/pipe/cap/hidden/scrubbers)) - src.pipe_type = PIPE_SCRUBBERS_CAP - connect_types = CONNECT_TYPE_SCRUBBER - src.color = PIPE_COLOR_RED - else if(istype(make_from, /obj/machinery/atmospherics/pipe/cap)) - src.pipe_type = PIPE_CAP - else if(istype(make_from, /obj/machinery/atmospherics/omni/mixer)) - src.pipe_type = PIPE_OMNI_MIXER - else if(istype(make_from, /obj/machinery/atmospherics/omni/atmos_filter)) - src.pipe_type = PIPE_OMNI_FILTER -///// Z-Level stuff - else if(istype(make_from, /obj/machinery/atmospherics/pipe/zpipe/up/supply)) - src.pipe_type = PIPE_SUPPLY_UP - connect_types = CONNECT_TYPE_SUPPLY - src.color = PIPE_COLOR_BLUE - else if(istype(make_from, /obj/machinery/atmospherics/pipe/zpipe/up/scrubbers)) - src.pipe_type = PIPE_SCRUBBERS_UP - connect_types = CONNECT_TYPE_SCRUBBER - src.color = PIPE_COLOR_RED - else if(istype(make_from, /obj/machinery/atmospherics/pipe/zpipe/up)) - src.pipe_type = PIPE_UP - else if(istype(make_from, /obj/machinery/atmospherics/pipe/zpipe/down/supply)) - src.pipe_type = PIPE_SUPPLY_DOWN - connect_types = CONNECT_TYPE_SUPPLY - src.color = PIPE_COLOR_BLUE - else if(istype(make_from, /obj/machinery/atmospherics/pipe/zpipe/down/scrubbers)) - src.pipe_type = PIPE_SCRUBBERS_DOWN - connect_types = CONNECT_TYPE_SCRUBBER - src.color = PIPE_COLOR_RED - else if(istype(make_from, /obj/machinery/atmospherics/pipe/zpipe/down)) - src.pipe_type = PIPE_DOWN -///// Z-Level stuff - else if(istype(make_from, /obj/machinery/atmospherics/pipe/vent)) - src.pipe_type = PIPE_PASSIVE_VENT +// One subtype for each way components connect to neighbors +/obj/item/pipe/directional + dispenser_class = PIPE_DIRECTIONAL +/obj/item/pipe/binary + dispenser_class = PIPE_STRAIGHT +/obj/item/pipe/binary/bendable + dispenser_class = PIPE_BENDABLE +/obj/item/pipe/trinary + dispenser_class = PIPE_TRINARY +/obj/item/pipe/trinary/flippable + dispenser_class = PIPE_TRIN_M + var/mirrored = FALSE +/obj/item/pipe/quaternary + dispenser_class = PIPE_ONEDIR + +/** + * Call constructor with: + * @param loc Location + * @pipe_type + */ +/obj/item/pipe/initialize(var/mapload, var/_pipe_type, var/_dir, var/obj/machinery/atmospherics/make_from) + if(make_from) + make_from_existing(make_from) else - src.pipe_type = pipe_type - src.set_dir(dir) - if (pipe_type == 29 || pipe_type == 30 || pipe_type == 33 || pipe_type == 35 || pipe_type == 37 || pipe_type == 39 || pipe_type == 41) - connect_types = CONNECT_TYPE_SUPPLY - src.color = PIPE_COLOR_BLUE - else if (pipe_type == 31 || pipe_type == 32 || pipe_type == 34 || pipe_type == 36 || pipe_type == 38 || pipe_type == 40 || pipe_type == 42) - connect_types = CONNECT_TYPE_SCRUBBER - src.color = PIPE_COLOR_RED - else if (pipe_type == 2 || pipe_type == 3) - connect_types = CONNECT_TYPE_HE - else if (pipe_type == 6) - connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_HE - else if (pipe_type == 28) - connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SUPPLY|CONNECT_TYPE_SCRUBBER - //src.pipe_dir = get_pipe_dir() - update() - src.pixel_x = rand(-5, 5) - src.pixel_y = rand(-5, 5) + pipe_type = _pipe_type + set_dir(_dir) -//update the name and icon of the pipe item depending on the type + update() + pixel_x += rand(-5, 5) + pixel_y += rand(-5, 5) + return ..() + +/obj/item/pipe/proc/make_from_existing(obj/machinery/atmospherics/make_from) + set_dir(make_from.dir) + pipename = make_from.name + if(make_from.req_access) + src.req_access = make_from.req_access + if(make_from.req_one_access) + src.req_one_access = make_from.req_one_access + color = make_from.pipe_color + pipe_type = make_from.type + +/obj/item/pipe/trinary/flippable/make_from_existing(obj/machinery/atmospherics/trinary/make_from) + ..() + if(make_from.mirrored) + do_a_flip() + +/obj/item/pipe/dropped() + if(loc) + setPipingLayer(piping_layer) + return ..() + +/obj/item/pipe/proc/setPipingLayer(new_layer = PIPING_LAYER_DEFAULT) + var/obj/machinery/atmospherics/fakeA = pipe_type + if(initial(fakeA.pipe_flags) & (PIPING_ALL_LAYER|PIPING_DEFAULT_LAYER_ONLY)) + new_layer = PIPING_LAYER_DEFAULT + piping_layer = new_layer + // Do it the Polaris way + switch(piping_layer) + if(PIPING_LAYER_SCRUBBER) + color = PIPE_COLOR_RED + name = "[initial(fakeA.name)] scrubber fitting" + if(PIPING_LAYER_SUPPLY) + color = PIPE_COLOR_BLUE + name = "[initial(fakeA.name)] supply fitting" + // Or if we were to do it the TG way... + // pixel_x = PIPE_PIXEL_OFFSET_X(piping_layer) + // pixel_y = PIPE_PIXEL_OFFSET_Y(piping_layer) + // layer = initial(layer) + PIPE_LAYER_OFFSET(piping_layer) /obj/item/pipe/proc/update() - var/list/nlist = list( \ - "pipe", \ - "bent pipe", \ - "h/e pipe", \ - "bent h/e pipe", \ - "connector", \ - "manifold", \ - "junction", \ - "uvent", \ - "mvalve", \ - "pump", \ - "scrubber", \ - "insulated pipe", \ - "bent insulated pipe", \ - "gas filter", \ - "gas mixer", \ - "pressure regulator", \ - "high power pump", \ - "heat exchanger", \ - "t-valve", \ - "4-way manifold", \ - "pipe cap", \ -///// Z-Level stuff - "pipe up", \ - "pipe down", \ -///// Z-Level stuff - "gas filter m", \ - "gas mixer t", \ - "gas mixer m", \ - "omni mixer", \ - "omni filter", \ -///// Supply and scrubbers pipes - "universal pipe adapter", \ - "supply pipe", \ - "bent supply pipe", \ - "scrubbers pipe", \ - "bent scrubbers pipe", \ - "supply manifold", \ - "scrubbers manifold", \ - "supply 4-way manifold", \ - "scrubbers 4-way manifold", \ - "supply pipe up", \ - "scrubbers pipe up", \ - "supply pipe down", \ - "scrubbers pipe down", \ - "supply pipe cap", \ - "scrubbers pipe cap", \ - "t-valve m", \ - "dvalve", \ - "dt-valve", \ - "dt-valve m", \ - "passive vent", \ - ) - name = nlist[pipe_type+1] + " fitting" - var/list/islist = list( \ - "simple", \ - "simple", \ - "he", \ - "he", \ - "connector", \ - "manifold", \ - "junction", \ - "uvent", \ - "mvalve", \ - "pump", \ - "scrubber", \ - "insulated", \ - "insulated", \ - "filter", \ - "mixer", \ - "passivegate", \ - "volumepump", \ - "heunary", \ - "mtvalve", \ - "manifold4w", \ - "cap", \ -///// Z-Level stuff - "cap", \ - "cap", \ -///// Z-Level stuff - "m_filter", \ - "t_mixer", \ - "m_mixer", \ - "omni_mixer", \ - "omni_filter", \ -///// Supply and scrubbers pipes - "universal", \ - "simple", \ - "simple", \ - "simple", \ - "simple", \ - "manifold", \ - "manifold", \ - "manifold4w", \ - "manifold4w", \ - "cap", \ - "cap", \ - "cap", \ - "cap", \ - "cap", \ - "cap", \ - "mtvalvem", \ - "dvalve", \ - "dtvalve", \ - "dtvalvem", \ - "passive vent", \ - ) - icon_state = islist[pipe_type + 1] + var/obj/machinery/atmospherics/fakeA = pipe_type + name = "[initial(fakeA.name)] fitting" + icon_state = initial(fakeA.pipe_state) -//called when a turf is attacked with a pipe item -/obj/item/pipe/afterattack(turf/simulated/floor/target, mob/user, proximity) - if(!proximity) return - if(istype(target)) - user.drop_from_inventory(src, target) - else - return ..() +/obj/item/pipe/verb/flip() + set category = "Object" + set name = "Flip Pipe" + set src in view(1) -// rotate the pipe item clockwise + if ( usr.stat || usr.restrained() || !usr.canmove ) + return + + do_a_flip() + +/obj/item/pipe/proc/do_a_flip() + set_dir(turn(dir, -180)) + fixdir() + +/obj/item/pipe/trinary/flippable/do_a_flip() + // set_dir(turn(dir, flipped ? 45 : -45)) + // TG has a magic icon set with the flipped versions in the diagonals. + // We may switch to this later, but for now gotta do some magic. + mirrored = !mirrored + var/obj/machinery/atmospherics/fakeA = pipe_type + icon_state = "[initial(fakeA.pipe_state)][mirrored ? "m" : ""]" /obj/item/pipe/verb/rotate() set category = "Object" set name = "Rotate Pipe" set src in view(1) - if ( usr.stat || usr.restrained() ) + if ( usr.stat || usr.restrained() || !usr.canmove ) return - src.set_dir(turn(src.dir, -90)) - - if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_UNIVERSAL, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE)) - if(dir==2) - set_dir(1) - else if(dir==8) - set_dir(4) - else if (pipe_type in list (PIPE_MANIFOLD4W, PIPE_SUPPLY_MANIFOLD4W, PIPE_SCRUBBERS_MANIFOLD4W)) - set_dir(2) - //src.pipe_set_dir(get_pipe_dir()) - return + set_dir(turn(src.dir, -90)) // Rotate clockwise + fixdir() /obj/item/pipe/Move() - ..() - if ((pipe_type in list (PIPE_SIMPLE_BENT, PIPE_SUPPLY_BENT, PIPE_SCRUBBERS_BENT, PIPE_HE_BENT, PIPE_INSULATED_BENT)) \ - && (src.dir in cardinal)) - src.set_dir(src.dir|turn(src.dir, 90)) - else if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_UNIVERSAL, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE)) - if(dir==2) - set_dir(1) - else if(dir==8) - set_dir(4) + var/old_dir = dir + . = ..() + set_dir(old_dir) //pipes changing direction when moved is just annoying and buggy + +//Helper to clean up dir +/obj/item/pipe/proc/fixdir() return -// returns all pipe's endpoints +/obj/item/pipe/binary/fixdir() + if(dir == SOUTH) + set_dir(NORTH) + else if(dir == WEST) + set_dir(EAST) -/obj/item/pipe/proc/get_pipe_dir() - if (!dir) - return 0 - var/flip = turn(dir, 180) - var/cw = turn(dir, -90) - var/acw = turn(dir, 90) +/obj/item/pipe/trinary/flippable/fixdir() + if(dir in cornerdirs) + set_dir(turn(dir, 45)) - switch(pipe_type) - if( PIPE_SIMPLE_STRAIGHT, \ - PIPE_INSULATED_STRAIGHT, \ - PIPE_HE_STRAIGHT, \ - PIPE_JUNCTION ,\ - PIPE_PUMP ,\ - PIPE_VOLUME_PUMP ,\ - PIPE_PASSIVE_GATE ,\ - PIPE_MVALVE, \ - PIPE_SUPPLY_STRAIGHT, \ - PIPE_SCRUBBERS_STRAIGHT, \ - PIPE_UNIVERSAL, \ - PIPE_DVALVE, \ - ) - return dir|flip - if(PIPE_SIMPLE_BENT, PIPE_INSULATED_BENT, PIPE_HE_BENT, PIPE_SUPPLY_BENT, PIPE_SCRUBBERS_BENT) - return dir //dir|acw - if(PIPE_CONNECTOR,PIPE_UVENT,PIPE_SCRUBBER,PIPE_HEAT_EXCHANGE) - return dir - if(PIPE_MANIFOLD4W, PIPE_SUPPLY_MANIFOLD4W, PIPE_SCRUBBERS_MANIFOLD4W, PIPE_OMNI_MIXER, PIPE_OMNI_FILTER) - return dir|flip|cw|acw - if(PIPE_MANIFOLD, PIPE_SUPPLY_MANIFOLD, PIPE_SCRUBBERS_MANIFOLD) - return flip|cw|acw - if(PIPE_GAS_FILTER, PIPE_GAS_MIXER, PIPE_MTVALVE, PIPE_DTVALVE) - return dir|flip|cw - if(PIPE_GAS_FILTER_M, PIPE_GAS_MIXER_M, PIPE_MTVALVEM, PIPE_DTVALVEM) - return dir|flip|acw - if(PIPE_GAS_MIXER_T) - return dir|cw|acw - if(PIPE_CAP, PIPE_SUPPLY_CAP, PIPE_SCRUBBERS_CAP) - return dir -///// Z-Level stuff - if(PIPE_UP,PIPE_DOWN,PIPE_SUPPLY_UP,PIPE_SUPPLY_DOWN,PIPE_SCRUBBERS_UP,PIPE_SCRUBBERS_DOWN) - return dir -///// Z-Level stuff - if(PIPE_PASSIVE_VENT) - return dir - return 0 +/obj/item/pipe/attack_self(mob/user) + set_dir(turn(dir,-90)) + fixdir() -/obj/item/pipe/proc/get_pdir() //endpoints for regular pipes - - var/flip = turn(dir, 180) -// var/cw = turn(dir, -90) -// var/acw = turn(dir, 90) - - if (!(pipe_type in list(PIPE_HE_STRAIGHT, PIPE_HE_BENT, PIPE_JUNCTION))) - return get_pipe_dir() - switch(pipe_type) - if(PIPE_HE_STRAIGHT,PIPE_HE_BENT) - return 0 - if(PIPE_JUNCTION) - return flip - return 0 - -// return the h_dir (heat-exchange pipes) from the type and the dir - -/obj/item/pipe/proc/get_hdir() //endpoints for h/e pipes - -// var/flip = turn(dir, 180) -// var/cw = turn(dir, -90) - - switch(pipe_type) - if(PIPE_HE_STRAIGHT) - return get_pipe_dir() - if(PIPE_HE_BENT) - return get_pipe_dir() - if(PIPE_JUNCTION) - return dir - else - return 0 - -/obj/item/pipe/attack_self(mob/user as mob) - return rotate() +//called when a turf is attacked with a pipe item +/obj/item/pipe/afterattack(turf/simulated/floor/target, mob/user, proximity) + if(!proximity) return + if(istype(target) && user.canUnEquip(src)) + user.drop_from_inventory(src, target) + else + return ..() /obj/item/pipe/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - ..() - //* - if (!istype(W, /obj/item/weapon/wrench)) - return ..() - if (!isturf(src.loc)) - return 1 - if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE)) - if(dir==2) - set_dir(1) - else if(dir==8) - set_dir(4) - else if (pipe_type in list(PIPE_MANIFOLD4W, PIPE_SUPPLY_MANIFOLD4W, PIPE_SCRUBBERS_MANIFOLD4W, PIPE_OMNI_MIXER, PIPE_OMNI_FILTER)) - set_dir(2) - var/pipe_dir = get_pipe_dir() + if(iswrench(W)) + return wrench_act(user, W) + return ..() - for(var/obj/machinery/atmospherics/M in src.loc) - if((M.initialize_directions & pipe_dir) && M.check_connect_types_construction(M,src)) // matches at least one direction on either type of pipe & same connection type - user << "There is already a pipe of the same type at this location." - return 1 +/obj/item/pipe/proc/wrench_act(var/mob/living/user, var/obj/item/weapon/wrench/W) + if(!isturf(loc)) + return TRUE + + add_fingerprint(user) + fixdir() + + var/obj/machinery/atmospherics/fakeA = pipe_type + var/flags = initial(fakeA.pipe_flags) + for(var/obj/machinery/atmospherics/M in loc) + if((M.pipe_flags & flags & PIPING_ONE_PER_TURF)) //Only one dense/requires density object per tile, eg connectors/cryo/heater/coolers. + to_chat(user, "Something is hogging the tile!") + return TRUE + if((M.piping_layer != piping_layer) && !((M.pipe_flags | flags) & PIPING_ALL_LAYER)) // Pipes on different layers can't block each other unless they are ALL_LAYER + continue + if(M.get_init_dirs() & SSmachines.get_init_dirs(pipe_type, dir)) // matches at least one direction on either type of pipe + to_chat(user, "There is already a pipe at that location!") + return TRUE // no conflicts found - var/pipefailtext = "There's nothing to connect this pipe section to!" //(with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)" - - //TODO: Move all of this stuff into the various pipe constructors. - switch(pipe_type) - if(PIPE_SIMPLE_STRAIGHT, PIPE_SIMPLE_BENT) - var/obj/machinery/atmospherics/pipe/simple/P = new( src.loc ) - P.pipe_color = color - P.set_dir(src.dir) - P.initialize_directions = pipe_dir - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - if (QDELETED(P)) - usr << pipefailtext - return 1 - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() - if (P.node2) - P.node2.atmos_init() - P.node2.build_network() - - if(PIPE_SUPPLY_STRAIGHT, PIPE_SUPPLY_BENT) - var/obj/machinery/atmospherics/pipe/simple/hidden/supply/P = new( src.loc ) - P.pipe_color = color - P.set_dir(src.dir) - P.initialize_directions = pipe_dir - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - if (QDELETED(P)) - usr << pipefailtext - return 1 - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() - if (P.node2) - P.node2.atmos_init() - P.node2.build_network() - - if(PIPE_SCRUBBERS_STRAIGHT, PIPE_SCRUBBERS_BENT) - var/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers/P = new( src.loc ) - P.pipe_color = color - P.set_dir(src.dir) - P.initialize_directions = pipe_dir - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - if (QDELETED(P)) - usr << pipefailtext - return 1 - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() - if (P.node2) - P.node2.atmos_init() - P.node2.build_network() - - if(PIPE_UNIVERSAL) - var/obj/machinery/atmospherics/pipe/simple/hidden/universal/P = new( src.loc ) - P.pipe_color = color - P.set_dir(src.dir) - P.initialize_directions = pipe_dir - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - if (QDELETED(P)) - usr << pipefailtext - return 1 - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() - if (P.node2) - P.node2.atmos_init() - P.node2.build_network() - - if(PIPE_HE_STRAIGHT, PIPE_HE_BENT) - var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/P = new ( src.loc ) - P.set_dir(src.dir) - P.initialize_directions = pipe_dir //this var it's used to know if the pipe is bent or not - P.initialize_directions_he = pipe_dir - P.atmos_init() - if (QDELETED(P)) - usr << pipefailtext - return 1 - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() - if (P.node2) - P.node2.atmos_init() - P.node2.build_network() - - if(PIPE_CONNECTOR) // connector - var/obj/machinery/atmospherics/portables_connector/C = new( src.loc ) - C.set_dir(dir) - C.initialize_directions = pipe_dir - if (pipename) - C.name = pipename - var/turf/T = C.loc - C.level = !T.is_plating() ? 2 : 1 - C.atmos_init() - C.build_network() - if (C.node) - C.node.atmos_init() - C.node.build_network() - - - if(PIPE_MANIFOLD) //manifold - var/obj/machinery/atmospherics/pipe/manifold/M = new( src.loc ) - M.pipe_color = color - M.set_dir(dir) - M.initialize_directions = pipe_dir - //M.New() - var/turf/T = M.loc - M.level = !T.is_plating() ? 2 : 1 - M.atmos_init() - if (QDELETED(M)) - usr << pipefailtext - return 1 - M.build_network() - if (M.node1) - M.node1.atmos_init() - M.node1.build_network() - if (M.node2) - M.node2.atmos_init() - M.node2.build_network() - if (M.node3) - M.node3.atmos_init() - M.node3.build_network() - - if(PIPE_SUPPLY_MANIFOLD) //manifold - var/obj/machinery/atmospherics/pipe/manifold/hidden/supply/M = new( src.loc ) - M.pipe_color = color - M.set_dir(dir) - M.initialize_directions = pipe_dir - //M.New() - var/turf/T = M.loc - M.level = !T.is_plating() ? 2 : 1 - M.atmos_init() - if (!M) - usr << "There's nothing to connect this manifold to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)" - return 1 - M.build_network() - if (M.node1) - M.node1.atmos_init() - M.node1.build_network() - if (M.node2) - M.node2.atmos_init() - M.node2.build_network() - if (M.node3) - M.node3.atmos_init() - M.node3.build_network() - - if(PIPE_SCRUBBERS_MANIFOLD) //manifold - var/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers/M = new( src.loc ) - M.pipe_color = color - M.set_dir(dir) - M.initialize_directions = pipe_dir - //M.New() - var/turf/T = M.loc - M.level = !T.is_plating() ? 2 : 1 - M.atmos_init() - if (!M) - usr << "There's nothing to connect this manifold to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)" - return 1 - M.build_network() - if (M.node1) - M.node1.atmos_init() - M.node1.build_network() - if (M.node2) - M.node2.atmos_init() - M.node2.build_network() - if (M.node3) - M.node3.atmos_init() - M.node3.build_network() - M.node3.build_network() - - if(PIPE_MANIFOLD4W) //4-way manifold - var/obj/machinery/atmospherics/pipe/manifold4w/M = new( src.loc ) - M.pipe_color = color - M.set_dir(dir) - M.initialize_directions = pipe_dir - //M.New() - var/turf/T = M.loc - M.level = !T.is_plating() ? 2 : 1 - M.atmos_init() - if (QDELETED(M)) - usr << pipefailtext - return 1 - M.build_network() - if (M.node1) - M.node1.atmos_init() - M.node1.build_network() - if (M.node2) - M.node2.atmos_init() - M.node2.build_network() - if (M.node3) - M.node3.atmos_init() - M.node3.build_network() - if (M.node4) - M.node4.atmos_init() - M.node4.build_network() - - if(PIPE_SUPPLY_MANIFOLD4W) //4-way manifold - var/obj/machinery/atmospherics/pipe/manifold4w/hidden/supply/M = new( src.loc ) - M.pipe_color = color - M.set_dir(dir) - M.initialize_directions = pipe_dir - M.connect_types = src.connect_types - //M.New() - var/turf/T = M.loc - M.level = !T.is_plating() ? 2 : 1 - M.atmos_init() - if (!M) - usr << "There's nothing to connect this manifold to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)" - return 1 - M.build_network() - if (M.node1) - M.node1.atmos_init() - M.node1.build_network() - if (M.node2) - M.node2.atmos_init() - M.node2.build_network() - if (M.node3) - M.node3.atmos_init() - M.node3.build_network() - if (M.node4) - M.node4.atmos_init() - M.node4.build_network() - - if(PIPE_SCRUBBERS_MANIFOLD4W) //4-way manifold - var/obj/machinery/atmospherics/pipe/manifold4w/hidden/scrubbers/M = new( src.loc ) - M.pipe_color = color - M.set_dir(dir) - M.initialize_directions = pipe_dir - M.connect_types = src.connect_types - //M.New() - var/turf/T = M.loc - M.level = !T.is_plating() ? 2 : 1 - M.atmos_init() - if (!M) - usr << "There's nothing to connect this manifold to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)" - return 1 - M.build_network() - if (M.node1) - M.node1.atmos_init() - M.node1.build_network() - if (M.node2) - M.node2.atmos_init() - M.node2.build_network() - if (M.node3) - M.node3.atmos_init() - M.node3.build_network() - if (M.node4) - M.node4.atmos_init() - M.node4.build_network() - - if(PIPE_JUNCTION) - var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/P = new ( src.loc ) - P.set_dir(src.dir) - P.initialize_directions = src.get_pdir() - P.initialize_directions_he = src.get_hdir() - P.atmos_init() - if (QDELETED(P)) - usr << pipefailtext //"There's nothing to connect this pipe to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)" - return 1 - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() - if (P.node2) - P.node2.atmos_init() - P.node2.build_network() - - if(PIPE_UVENT) //unary vent - var/obj/machinery/atmospherics/unary/vent_pump/V = new( src.loc ) - V.set_dir(dir) - V.initialize_directions = pipe_dir - if (pipename) - V.name = pipename - var/turf/T = V.loc - V.level = !T.is_plating() ? 2 : 1 - V.atmos_init() - V.build_network() - if (V.node) - V.node.atmos_init() - V.node.build_network() - - if(PIPE_MVALVE) //manual valve - var/obj/machinery/atmospherics/valve/V = new( src.loc) - V.set_dir(dir) - V.initialize_directions = pipe_dir - if (pipename) - V.name = pipename - var/turf/T = V.loc - V.level = !T.is_plating() ? 2 : 1 - V.atmos_init() - V.build_network() - if (V.node1) -// world << "[V.node1.name] is connected to valve, forcing it to update its nodes." - V.node1.atmos_init() - V.node1.build_network() - if (V.node2) -// world << "[V.node2.name] is connected to valve, forcing it to update its nodes." - V.node2.atmos_init() - V.node2.build_network() - - if(PIPE_PUMP) //gas pump - var/obj/machinery/atmospherics/binary/pump/P = new(src.loc) - P.set_dir(dir) - P.initialize_directions = pipe_dir - if (pipename) - P.name = pipename - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() - if (P.node2) - P.node2.atmos_init() - P.node2.build_network() - - if(PIPE_GAS_FILTER) //gas filter - var/obj/machinery/atmospherics/trinary/atmos_filter/P = new(src.loc) - P.set_dir(dir) - P.initialize_directions = pipe_dir - if (pipename) - P.name = pipename - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() - if (P.node2) - P.node2.atmos_init() - P.node2.build_network() - if (P.node3) - P.node3.atmos_init() - P.node3.build_network() - - if(PIPE_GAS_MIXER) //gas mixer - var/obj/machinery/atmospherics/trinary/mixer/P = new(src.loc) - P.set_dir(dir) - P.initialize_directions = pipe_dir - if (pipename) - P.name = pipename - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() - if (P.node2) - P.node2.atmos_init() - P.node2.build_network() - if (P.node3) - P.node3.atmos_init() - P.node3.build_network() - - if(PIPE_GAS_FILTER_M) //gas filter mirrored - var/obj/machinery/atmospherics/trinary/atmos_filter/m_filter/P = new(src.loc) - P.set_dir(dir) - P.initialize_directions = pipe_dir - if (pipename) - P.name = pipename - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() - if (P.node2) - P.node2.atmos_init() - P.node2.build_network() - if (P.node3) - P.node3.atmos_init() - P.node3.build_network() - - if(PIPE_GAS_MIXER_T) //gas mixer-t - var/obj/machinery/atmospherics/trinary/mixer/t_mixer/P = new(src.loc) - P.set_dir(dir) - P.initialize_directions = pipe_dir - if (pipename) - P.name = pipename - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() - if (P.node2) - P.node2.atmos_init() - P.node2.build_network() - if (P.node3) - P.node3.atmos_init() - P.node3.build_network() - - if(PIPE_GAS_MIXER_M) //gas mixer mirrored - var/obj/machinery/atmospherics/trinary/mixer/m_mixer/P = new(src.loc) - P.set_dir(dir) - P.initialize_directions = pipe_dir - if (pipename) - P.name = pipename - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() - if (P.node2) - P.node2.atmos_init() - P.node2.build_network() - if (P.node3) - P.node3.atmos_init() - P.node3.build_network() - - if(PIPE_SCRUBBER) //scrubber - var/obj/machinery/atmospherics/unary/vent_scrubber/S = new(src.loc) - S.set_dir(dir) - S.initialize_directions = pipe_dir - if (pipename) - S.name = pipename - var/turf/T = S.loc - S.level = !T.is_plating() ? 2 : 1 - S.atmos_init() - S.build_network() - if (S.node) - S.node.atmos_init() - S.node.build_network() - - if(PIPE_INSULATED_STRAIGHT, PIPE_INSULATED_BENT) - var/obj/machinery/atmospherics/pipe/simple/insulated/P = new( src.loc ) - P.set_dir(src.dir) - P.initialize_directions = pipe_dir - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - if (QDELETED(P)) - usr << pipefailtext - return 1 - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() - if (P.node2) - P.node2.atmos_init() - P.node2.build_network() - - if(PIPE_MTVALVE) //manual t-valve - var/obj/machinery/atmospherics/tvalve/V = new(src.loc) - V.set_dir(dir) - V.initialize_directions = pipe_dir - if (pipename) - V.name = pipename - var/turf/T = V.loc - V.level = !T.is_plating() ? 2 : 1 - V.atmos_init() - V.build_network() - if (V.node1) - V.node1.atmos_init() - V.node1.build_network() - if (V.node2) - V.node2.atmos_init() - V.node2.build_network() - if (V.node3) - V.node3.atmos_init() - V.node3.build_network() - - if(PIPE_MTVALVEM) //manual t-valve - var/obj/machinery/atmospherics/tvalve/mirrored/V = new(src.loc) - V.set_dir(dir) - V.initialize_directions = pipe_dir - if (pipename) - V.name = pipename - var/turf/T = V.loc - V.level = !T.is_plating() ? 2 : 1 - V.atmos_init() - V.build_network() - if (V.node1) - V.node1.atmos_init() - V.node1.build_network() - if (V.node2) - V.node2.atmos_init() - V.node2.build_network() - if (V.node3) - V.node3.atmos_init() - V.node3.build_network() - - if(PIPE_CAP) - var/obj/machinery/atmospherics/pipe/cap/C = new(src.loc) - C.set_dir(dir) - C.initialize_directions = pipe_dir - C.atmos_init() - C.build_network() - if(C.node) - C.node.atmos_init() - C.node.build_network() - - if(PIPE_SUPPLY_CAP) - var/obj/machinery/atmospherics/pipe/cap/hidden/supply/C = new(src.loc) - C.set_dir(dir) - C.initialize_directions = pipe_dir - C.atmos_init() - C.build_network() - if(C.node) - C.node.atmos_init() - C.node.build_network() - - if(PIPE_SCRUBBERS_CAP) - var/obj/machinery/atmospherics/pipe/cap/hidden/scrubbers/C = new(src.loc) - C.set_dir(dir) - C.initialize_directions = pipe_dir - C.atmos_init() - C.build_network() - if(C.node) - C.node.atmos_init() - C.node.build_network() - - if(PIPE_PASSIVE_GATE) //passive gate - var/obj/machinery/atmospherics/binary/passive_gate/P = new(src.loc) - P.set_dir(dir) - P.initialize_directions = pipe_dir - if (pipename) - P.name = pipename - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() - if (P.node2) - P.node2.atmos_init() - P.node2.build_network() - - if(PIPE_VOLUME_PUMP) //volume pump - var/obj/machinery/atmospherics/binary/pump/high_power/P = new(src.loc) - P.set_dir(dir) - P.initialize_directions = pipe_dir - if (pipename) - P.name = pipename - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() - if (P.node2) - P.node2.atmos_init() - P.node2.build_network() - - if(PIPE_HEAT_EXCHANGE) // heat exchanger - var/obj/machinery/atmospherics/unary/heat_exchanger/C = new( src.loc ) - C.set_dir(dir) - C.initialize_directions = pipe_dir - if (pipename) - C.name = pipename - var/turf/T = C.loc - C.level = !T.is_plating() ? 2 : 1 - C.atmos_init() - C.build_network() - if (C.node) - C.node.atmos_init() - C.node.build_network() - - if(PIPE_DVALVE) //digital valve - var/obj/machinery/atmospherics/valve/digital/V = new( src.loc) - if(src.req_access) - V.req_access = src.req_access - if(src.req_one_access) - V.req_one_access = src.req_one_access - V.set_dir(dir) - V.initialize_directions = pipe_dir - if (pipename) - V.name = pipename - var/turf/T = V.loc - V.level = !T.is_plating() ? 2 : 1 - V.atmos_init() - V.build_network() - if (V.node1) - V.node1.atmos_init() - V.node1.build_network() - if (V.node2) - V.node2.atmos_init() - V.node2.build_network() - - if(PIPE_DTVALVE) //digital t-valve - var/obj/machinery/atmospherics/tvalve/digital/V = new(src.loc) - if(src.req_access) - V.req_access = src.req_access - if(src.req_one_access) - V.req_one_access = src.req_one_access - V.set_dir(dir) - V.initialize_directions = pipe_dir - if (pipename) - V.name = pipename - var/turf/T = V.loc - V.level = !T.is_plating() ? 2 : 1 - V.atmos_init() - V.build_network() - if (V.node1) - V.node1.atmos_init() - V.node1.build_network() - if (V.node2) - V.node2.atmos_init() - V.node2.build_network() - if (V.node3) - V.node3.atmos_init() - V.node3.build_network() - - if(PIPE_DTVALVEM) //mirrored digital t-valve - var/obj/machinery/atmospherics/tvalve/digital/mirrored/V = new(src.loc) - if(src.req_access) - V.req_access = src.req_access - if(src.req_one_access) - V.req_one_access = src.req_one_access - V.set_dir(dir) - V.initialize_directions = pipe_dir - if (pipename) - V.name = pipename - var/turf/T = V.loc - V.level = !T.is_plating() ? 2 : 1 - V.atmos_init() - V.build_network() - if (V.node1) - V.node1.atmos_init() - V.node1.build_network() - if (V.node2) - V.node2.atmos_init() - V.node2.build_network() - if (V.node3) - V.node3.atmos_init() - V.node3.build_network() - -///// Z-Level stuff - if(PIPE_UP) - var/obj/machinery/atmospherics/pipe/zpipe/up/P = new(src.loc) - P.set_dir(dir) - P.initialize_directions = pipe_dir - if (pipename) - P.name = pipename - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() - if (P.node2) - P.node2.atmos_init() - P.node2.build_network() - if(PIPE_DOWN) - var/obj/machinery/atmospherics/pipe/zpipe/down/P = new(src.loc) - P.set_dir(dir) - P.initialize_directions = pipe_dir - if (pipename) - P.name = pipename - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() - if (P.node2) - P.node2.atmos_init() - P.node2.build_network() - if(PIPE_SUPPLY_UP) - var/obj/machinery/atmospherics/pipe/zpipe/up/supply/P = new(src.loc) - P.set_dir(dir) - P.initialize_directions = pipe_dir - if (pipename) - P.name = pipename - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() - if (P.node2) - P.node2.atmos_init() - P.node2.build_network() - if(PIPE_SUPPLY_DOWN) - var/obj/machinery/atmospherics/pipe/zpipe/down/supply/P = new(src.loc) - P.set_dir(dir) - P.initialize_directions = pipe_dir - if (pipename) - P.name = pipename - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() - if (P.node2) - P.node2.atmos_init() - P.node2.build_network() - if(PIPE_SCRUBBERS_UP) - var/obj/machinery/atmospherics/pipe/zpipe/up/scrubbers/P = new(src.loc) - P.set_dir(dir) - P.initialize_directions = pipe_dir - if (pipename) - P.name = pipename - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() - if (P.node2) - P.node2.atmos_init() - P.node2.build_network() - if(PIPE_SCRUBBERS_DOWN) - var/obj/machinery/atmospherics/pipe/zpipe/down/scrubbers/P = new(src.loc) - P.set_dir(dir) - P.initialize_directions = pipe_dir - if (pipename) - P.name = pipename - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() - if (P.node2) - P.node2.atmos_init() - P.node2.build_network() -///// Z-Level stuff - if(PIPE_OMNI_MIXER) - var/obj/machinery/atmospherics/omni/mixer/P = new(loc) - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - P.build_network() - if(PIPE_OMNI_FILTER) - var/obj/machinery/atmospherics/omni/atmos_filter/P = new(loc) - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - P.build_network() - if(PIPE_PASSIVE_VENT) - var/obj/machinery/atmospherics/pipe/vent/P = new(loc) - P.set_dir(dir) - P.initialize_directions = pipe_dir - var/turf/T = P.loc - P.level = !T.is_plating() ? 2 : 1 - P.atmos_init() - P.build_network() - if (P.node1) - P.node1.atmos_init() - P.node1.build_network() + var/obj/machinery/atmospherics/A = new pipe_type(loc) + build_pipe(A) + // TODO - Evaluate and remove the "need at least one thing to connect to" thing ~Leshana + // With how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment. + if (QDELETED(A)) + to_chat(user, "There's nothing to connect this pipe section to!") + return TRUE + transfer_fingerprints_to(A) playsound(src, W.usesound, 50, 1) user.visible_message( \ - "[user] fastens the [src].", \ - "You have fastened the [src].", \ - "You hear ratchet.") - qdel(src) // remove the pipe item + "[user] fastens \the [src].", \ + "You fasten \the [src].", \ + "You hear ratcheting.") - return - //TODO: DEFERRED + qdel(src) -// ensure that setterm() is called for a newly connected pipeline +/obj/item/pipe/proc/build_pipe(obj/machinery/atmospherics/A) + A.set_dir(dir) + A.init_dir() + if(pipename) + A.name = pipename + if(req_access) + A.req_access = req_access + if(req_one_access) + A.req_one_access = req_one_access + A.on_construction(color, piping_layer) + +/obj/item/pipe/trinary/flippable/build_pipe(obj/machinery/atmospherics/trinary/T) + T.mirrored = mirrored + . = ..() + +// Lookup the initialize_directions for a given atmos machinery instance facing dir. +// TODO - Right now this determines the answer by instantiating an instance and checking! +// There has to be a better way... ~Leshana +/datum/controller/subsystem/machines/proc/get_init_dirs(type, dir) + var/static/list/pipe_init_dirs_cache = list() + if(!pipe_init_dirs_cache[type]) + pipe_init_dirs_cache[type] = list() + + if(!pipe_init_dirs_cache[type]["[dir]"]) + var/obj/machinery/atmospherics/temp = new type(null, dir) + pipe_init_dirs_cache[type]["[dir]"] = temp.get_init_dirs() + qdel(temp) + + return pipe_init_dirs_cache[type]["[dir]"] + + +// +// Meters are special - not like any other pipes or components +// + /obj/item/pipe_meter name = "meter" - desc = "A meter that can be laid on pipes" + desc = "A meter that can be laid on pipes." icon = 'icons/obj/pipe-item.dmi' icon_state = "meter" item_state = "buildpipe" w_class = ITEMSIZE_LARGE + var/piping_layer = PIPING_LAYER_DEFAULT /obj/item/pipe_meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - ..() + if(iswrench(W)) + return wrench_act(user, W) + return ..() - if (!istype(W, /obj/item/weapon/wrench)) - return ..() - if(!locate(/obj/machinery/atmospherics/pipe, src.loc)) - user << "You need to fasten it to a pipe" - return 1 - new/obj/machinery/meter( src.loc ) +/obj/item/pipe_meter/proc/wrench_act(var/mob/living/user, var/obj/item/weapon/wrench/W) + var/obj/machinery/atmospherics/pipe/pipe + for(var/obj/machinery/atmospherics/pipe/P in loc) + if(P.piping_layer == piping_layer) + pipe = P + break + if(!pipe) + to_chat(user, "You need to fasten it to a pipe!") + return TRUE + new /obj/machinery/meter(loc, piping_layer) playsound(src, W.usesound, 50, 1) - user << "You have fastened the meter to the pipe" + to_chat(user, "You fasten the meter to the pipe.") qdel(src) -//not sure why these are necessary -#undef PIPE_SIMPLE_STRAIGHT -#undef PIPE_SIMPLE_BENT -#undef PIPE_HE_STRAIGHT -#undef PIPE_HE_BENT -#undef PIPE_CONNECTOR -#undef PIPE_MANIFOLD -#undef PIPE_JUNCTION -#undef PIPE_UVENT -#undef PIPE_MVALVE -#undef PIPE_PUMP -#undef PIPE_SCRUBBER -#undef PIPE_INSULATED_STRAIGHT -#undef PIPE_INSULATED_BENT -#undef PIPE_GAS_FILTER -#undef PIPE_GAS_MIXER -#undef PIPE_PASSIVE_GATE -#undef PIPE_VOLUME_PUMP -#undef PIPE_OUTLET_INJECT -#undef PIPE_MTVALVE -#undef PIPE_MTVALVEM -#undef PIPE_GAS_FILTER_M -#undef PIPE_GAS_MIXER_T -#undef PIPE_GAS_MIXER_M -#undef PIPE_SUPPLY_STRAIGHT -#undef PIPE_SUPPLY_BENT -#undef PIPE_SCRUBBERS_STRAIGHT -#undef PIPE_SCRUBBERS_BENT -#undef PIPE_SUPPLY_MANIFOLD -#undef PIPE_SCRUBBERS_MANIFOLD -#undef PIPE_UNIVERSAL -//#undef PIPE_MANIFOLD4W + +/obj/item/pipe_meter/dropped() + . = ..() + if(loc) + setAttachLayer(piping_layer) + +/obj/item/pipe_meter/proc/setAttachLayer(new_layer = PIPING_LAYER_DEFAULT) + piping_layer = new_layer diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm index 8bc779adf3..6675a5ca15 100644 --- a/code/game/machinery/pipe/pipe_dispenser.dm +++ b/code/game/machinery/pipe/pipe_dispenser.dm @@ -6,74 +6,32 @@ anchored = 1 var/unwrenched = 0 var/wait = 0 + var/p_layer = PIPING_LAYER_REGULAR -/obj/machinery/pipedispenser/attack_hand(user as mob) - if(..()) +// TODO - Its about time to make this NanoUI don't we think? +/obj/machinery/pipedispenser/attack_hand(var/mob/user as mob) + if((. = ..())) return -///// Z-Level stuff - var/dat = {" -Regular pipes:
-Pipe
-Bent Pipe
-Manifold
-Digital Valve
-Manual Valve
-Pipe Cap
-4-Way Manifold
-Digital T-Valve
-Digital T-Valve - Mirrored
-Manual T-Valve
-Manual T-Valve - Mirrored
-Upward Pipe
-Downward Pipe
-Supply pipes:
-Pipe
-Bent Pipe
-Manifold
-Pipe Cap
-4-Way Manifold
-Upward Pipe
-Downward Pipe
-Scrubbers pipes:
-Pipe
-Bent Pipe
-Manifold
-Pipe Cap
-4-Way Manifold
-Upward Pipe
-Downward Pipe
-Devices:
-Universal pipe adapter
-Connector
-Unary Vent
-Passive Vent
-Gas Pump
-Pressure Regulator
-High Power Gas Pump
-Scrubber
-Meter
-Gas Filter
-Gas Filter - Mirrored
-Gas Mixer
-Gas Mixer - Mirrored
-Gas Mixer - T
-Omni Gas Mixer
-Omni Gas Filter
-Heat exchange:
-Pipe
-Bent Pipe
-Junction
-Heat Exchanger
-Insulated pipes:
-Pipe
-Bent Pipe
+ src.interact(user) -"} -///// Z-Level stuff -//What number the make points to is in the define # at the top of construction.dm in same folder +/obj/machinery/pipedispenser/interact(mob/user) + user.set_machine(src) - user << browse("[src][dat]", "window=pipedispenser") - onclose(user, "pipedispenser") + var/list/lines = list() + for(var/category in atmos_pipe_recipes) + lines += "[category]:
" + if(category == "Pipes") + // Stupid hack. Fix someday. So tired right now. + lines += "Regular " + lines += "Supply " + lines += "Scrubber " + lines += "
" + for(var/datum/pipe_recipe/PI in atmos_pipe_recipes[category]) + lines += PI.Render(src) + var/dat = lines.Join() + var/datum/browser/popup = new(user, "pipedispenser", name, 300, 800, src) + popup.set_content("[dat]") + popup.open() return /obj/machinery/pipedispenser/Topic(href, href_list) @@ -81,20 +39,27 @@ return if(unwrenched || !usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr)) usr << browse(null, "window=pipedispenser") + usr.unset_machine(src) return usr.set_machine(src) src.add_fingerprint(usr) - if(href_list["make"]) + if(href_list["setlayer"]) + var/new_pipe_layer = text2num(href_list["setlayer"]) + if(isnum(new_pipe_layer)) + p_layer = new_pipe_layer + updateDialog() + else if(href_list["makepipe"]) if(!wait) - var/p_type = text2num(href_list["make"]) + var/obj/machinery/atmospherics/p_type = text2path(href_list["makepipe"]) var/p_dir = text2num(href_list["dir"]) - var/obj/item/pipe/P = new (/*usr.loc*/ src.loc, pipe_type=p_type, dir=p_dir) - P.update() + var/pi_type = initial(p_type.construction_type) + var/obj/item/pipe/P = new pi_type(src.loc, p_type, p_dir) + P.setPipingLayer(p_layer) P.add_fingerprint(usr) wait = 1 spawn(10) wait = 0 - if(href_list["makemeter"]) + else if(href_list["makemeter"]) if(!wait) new /obj/item/pipe_meter(/*usr.loc*/ src.loc) wait = 1 diff --git a/code/game/machinery/pipe/pipe_recipes.dm b/code/game/machinery/pipe/pipe_recipes.dm new file mode 100644 index 0000000000..f0ae483055 --- /dev/null +++ b/code/game/machinery/pipe/pipe_recipes.dm @@ -0,0 +1,102 @@ +// +// Recipies for Pipe Dispenser and (someday) the RPD +// + +var/global/list/atmos_pipe_recipes = null + +/hook/startup/proc/init_pipe_recipes() + global.atmos_pipe_recipes = list( + "Pipes" = list( + new /datum/pipe_recipe/pipe("Pipe", /obj/machinery/atmospherics/pipe/simple), + new /datum/pipe_recipe/pipe("Manifold", /obj/machinery/atmospherics/pipe/manifold), + new /datum/pipe_recipe/pipe("Manual Valve", /obj/machinery/atmospherics/valve), + new /datum/pipe_recipe/pipe("Digital Valve", /obj/machinery/atmospherics/valve/digital), + new /datum/pipe_recipe/pipe("Pipe cap", /obj/machinery/atmospherics/pipe/cap), + new /datum/pipe_recipe/pipe("4-Way Manifold", /obj/machinery/atmospherics/pipe/manifold4w), + new /datum/pipe_recipe/pipe("Manual T-Valve", /obj/machinery/atmospherics/tvalve), + new /datum/pipe_recipe/pipe("Digital T-Valve", /obj/machinery/atmospherics/tvalve/digital), + new /datum/pipe_recipe/pipe("Upward Pipe", /obj/machinery/atmospherics/pipe/zpipe/up), + new /datum/pipe_recipe/pipe("Downward Pipe", /obj/machinery/atmospherics/pipe/zpipe/down), + new /datum/pipe_recipe/pipe("Universal Pipe Adaptor", /obj/machinery/atmospherics/pipe/simple/visible/universal), + ), + "Devices" = list( + new /datum/pipe_recipe/pipe("Connector", /obj/machinery/atmospherics/portables_connector), + new /datum/pipe_recipe/pipe("Unary Vent", /obj/machinery/atmospherics/unary/vent_pump), + new /datum/pipe_recipe/pipe("Passive Vent", /obj/machinery/atmospherics/pipe/vent), + new /datum/pipe_recipe/pipe("Injector", /obj/machinery/atmospherics/unary/outlet_injector), + new /datum/pipe_recipe/pipe("Gas Pump", /obj/machinery/atmospherics/binary/pump), + new /datum/pipe_recipe/pipe("Pressure Regulator", /obj/machinery/atmospherics/binary/passive_gate), + new /datum/pipe_recipe/pipe("High Power Gas Pump",/obj/machinery/atmospherics/binary/pump/high_power), + new /datum/pipe_recipe/pipe("Scrubber", /obj/machinery/atmospherics/unary/vent_scrubber), + new /datum/pipe_recipe/meter("Meter"), + new /datum/pipe_recipe/pipe("Gas Filter", /obj/machinery/atmospherics/trinary/atmos_filter), + new /datum/pipe_recipe/pipe("Gas Mixer", /obj/machinery/atmospherics/trinary/mixer), + new /datum/pipe_recipe/pipe("Gas Mixer 'T'", /obj/machinery/atmospherics/trinary/mixer/t_mixer), + new /datum/pipe_recipe/pipe("Omni Gas Mixer", /obj/machinery/atmospherics/omni/mixer), + new /datum/pipe_recipe/pipe("Omni Gas Filter", /obj/machinery/atmospherics/omni/atmos_filter), + ), + "Heat Exchange" = list( + new /datum/pipe_recipe/pipe("Pipe", /obj/machinery/atmospherics/pipe/simple/heat_exchanging), + new /datum/pipe_recipe/pipe("Junction", /obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction), + new /datum/pipe_recipe/pipe("Heat Exchanger", /obj/machinery/atmospherics/unary/heat_exchanger), + ), + "Insulated pipes" = list( + new /datum/pipe_recipe/pipe("Pipe", /obj/machinery/atmospherics/pipe/simple/insulated), + ) + ) + return TRUE + +// +// New method of handling pipe construction. Instead of numeric constants and a giant switch statement of doom +// every pipe type has a datum instance which describes its name, placement rules and construction method, dispensing etc. +// The advantages are obvious, mostly in simplifying the code of the dispenser, and the ability to add new pipes without hassle. +// +/datum/pipe_recipe + var/name = "Abstract Pipe (fixme)" // Recipe name + var/dirtype // If using an RPD, this tells more about what previews to show. + +// Render an HTML link to select this pipe type. Returns text. +/datum/pipe_recipe/proc/Render(dispenser) + return "[name]
" + +// Parameters for the Topic link returned by Render(). Returns text. +/datum/pipe_recipe/proc/Params() + return "" + +// +// Subtype for actual pipes +// +/datum/pipe_recipe/pipe + var/obj/item/pipe/construction_type // The type PATH to the type of pipe fitting object the recipe makes. + var/obj/machinery/atmospherics/pipe_type // The type PATH of what actual pipe the fitting becomes. + +/datum/pipe_recipe/pipe/New(var/label, var/obj/machinery/atmospherics/path) + name = label + pipe_type = path + construction_type = initial(path.construction_type) + dirtype = initial(construction_type.dispenser_class) + +// Render an HTML link to select this pipe type +/datum/pipe_recipe/pipe/Render(dispenser) + var/dat = ..(dispenser) + // Stationary pipe dispensers don't allow you to pre-select pipe directions. + // This makes it impossble to spawn bent versions of bendable pipes. + // We add a "Bent" pipe type with a preset diagonal direction to work around it. + if(istype(dispenser, /obj/machinery/pipedispenser) && (dirtype == PIPE_BENDABLE)) + dat += "Bent [name]
" + return dat + +/datum/pipe_recipe/pipe/Params() + return "makepipe=[pipe_type]" + +// +// Subtype for meters +// +/datum/pipe_recipe/meter + dirtype = PIPE_ONEDIR + +/datum/pipe_recipe/meter/New(label) + name = label + +/datum/pipe_recipe/meter/Params() + return "makemeter=1" diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index d4d3cedb47..5e0f181d82 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -289,7 +289,7 @@ set name = "Eject Recharger" set src in oview(1) - if(usr.incapacitated()) + if(usr.incapacitated() || !isliving(usr)) return go_out() @@ -301,8 +301,9 @@ set name = "Enter Recharger" set src in oview(1) - if(!usr.incapacitated()) + if(usr.incapacitated() || !isliving(usr)) return + go_in(usr) /obj/machinery/recharge_station/ghost_pod_recharger diff --git a/code/game/objects/items/devices/radio/encryptionkey_vr.dm b/code/game/objects/items/devices/radio/encryptionkey_vr.dm index b9ad7f72c1..4d2debc341 100644 --- a/code/game/objects/items/devices/radio/encryptionkey_vr.dm +++ b/code/game/objects/items/devices/radio/encryptionkey_vr.dm @@ -13,3 +13,8 @@ name = "colony director's encryption key" icon_state = "cap_cypherkey" channels = list("Command" = 1, "Security" = 1, "Engineering" = 0, "Science" = 0, "Medical" = 0, "Supply" = 0, "Service" = 0, "Explorer" = 0) + +/obj/item/device/encryptionkey/heads/rd + name = "research director's encryption key" + icon_state = "rd_cypherkey" + channels = list("Command" = 1, "Science" = 1, "Explorer" = 1) diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm index f6bf71c9ff..00c959fd30 100644 --- a/code/modules/client/client defines.dm +++ b/code/modules/client/client defines.dm @@ -22,6 +22,7 @@ var/adminobs = null var/area = null var/time_died_as_mouse = null //when the client last died as a mouse + var/datum/tooltip/tooltips = null var/adminhelped = 0 diff --git a/code/modules/client/preference_setup/global/01_ui.dm b/code/modules/client/preference_setup/global/01_ui.dm index 09289c1068..6168aa36b0 100644 --- a/code/modules/client/preference_setup/global/01_ui.dm +++ b/code/modules/client/preference_setup/global/01_ui.dm @@ -7,24 +7,28 @@ S["UI_style_color"] >> pref.UI_style_color S["UI_style_alpha"] >> pref.UI_style_alpha S["ooccolor"] >> pref.ooccolor + S["tooltipstyle"] >> pref.tooltipstyle /datum/category_item/player_setup_item/player_global/ui/save_preferences(var/savefile/S) S["UI_style"] << pref.UI_style S["UI_style_color"] << pref.UI_style_color S["UI_style_alpha"] << pref.UI_style_alpha S["ooccolor"] << pref.ooccolor + S["tooltipstyle"] >> pref.tooltipstyle /datum/category_item/player_setup_item/player_global/ui/sanitize_preferences() pref.UI_style = sanitize_inlist(pref.UI_style, all_ui_styles, initial(pref.UI_style)) pref.UI_style_color = sanitize_hexcolor(pref.UI_style_color, initial(pref.UI_style_color)) pref.UI_style_alpha = sanitize_integer(pref.UI_style_alpha, 0, 255, initial(pref.UI_style_alpha)) pref.ooccolor = sanitize_hexcolor(pref.ooccolor, initial(pref.ooccolor)) + pref.tooltipstyle = sanitize_inlist(pref.tooltipstyle, all_tooltip_styles, all_tooltip_styles[1]) /datum/category_item/player_setup_item/player_global/ui/content(var/mob/user) . = "UI Style: [pref.UI_style]
" . += "Custom UI (recommended for White UI):
" . += "-Color: [pref.UI_style_color] 
__
 reset
" . += "-Alpha(transparency): [pref.UI_style_alpha] reset
" + . += "Tooltip Style: [pref.tooltipstyle]
" if(can_select_ooc_color(user)) . += "OOC Color: " if(pref.ooccolor == initial(pref.ooccolor)) @@ -57,6 +61,12 @@ pref.ooccolor = new_ooccolor return TOPIC_REFRESH + else if(href_list["select_tooltip_style"]) + var/tooltip_style_new = input(user, "Choose tooltip style.", "Character Preference", pref.tooltipstyle) as null|anything in all_tooltip_styles + if(!tooltip_style_new || !CanUseTopic(user)) return TOPIC_NOACTION + pref.tooltipstyle = tooltip_style_new + return TOPIC_REFRESH + else if(href_list["reset"]) switch(href_list["reset"]) if("ui") diff --git a/code/modules/client/preference_setup/global/setting_datums.dm b/code/modules/client/preference_setup/global/setting_datums.dm index 222813460b..05d3410467 100644 --- a/code/modules/client/preference_setup/global/setting_datums.dm +++ b/code/modules/client/preference_setup/global/setting_datums.dm @@ -122,6 +122,12 @@ var/list/_client_preferences_by_type enabled_description = "Show" disabled_description = "Hide" +/datum/client_preference/mob_tooltips + description ="Mob tooltips" + key = "MOB_TOOLTIPS" + enabled_description = "Show" + disabled_description = "Hide" + /datum/client_preference/attack_icons description ="Attack icons" key = "ATTACK_ICONS" diff --git a/code/modules/client/preference_setup/vore/01_ears.dm b/code/modules/client/preference_setup/vore/01_ears.dm index 65dfc87c34..08e704511a 100644 --- a/code/modules/client/preference_setup/vore/01_ears.dm +++ b/code/modules/client/preference_setup/vore/01_ears.dm @@ -186,8 +186,9 @@ pretty_ear_styles[instance.name] = path // Present choice to user - var/selection = input(user, "Pick ears", "Character Preference") as null|anything in pretty_ear_styles - pref.ear_style = pretty_ear_styles[selection] + var/new_ear_style = input(user, "Pick ears", "Character Preference", pref.ear_style) as null|anything in pretty_ear_styles + if(new_ear_style) + pref.ear_style = pretty_ear_styles[new_ear_style] return TOPIC_REFRESH_UPDATE_PREVIEW @@ -218,8 +219,9 @@ pretty_tail_styles[instance.name] = path // Present choice to user - var/selection = input(user, "Pick tails", "Character Preference") as null|anything in pretty_tail_styles - pref.tail_style = pretty_tail_styles[selection] + var/new_tail_style = input(user, "Pick tails", "Character Preference", pref.tail_style) as null|anything in pretty_tail_styles + if(new_tail_style) + pref.tail_style = pretty_tail_styles[new_tail_style] return TOPIC_REFRESH_UPDATE_PREVIEW @@ -250,8 +252,9 @@ pretty_wing_styles[instance.name] = path // Present choice to user - var/selection = input(user, "Pick wings", "Character Preference") as null|anything in pretty_wing_styles - pref.wing_style = pretty_wing_styles[selection] + var/new_wing_style = input(user, "Pick wings", "Character Preference", pref.wing_style) as null|anything in pretty_wing_styles + if(new_wing_style) + pref.wing_style = pretty_wing_styles[new_wing_style] return TOPIC_REFRESH_UPDATE_PREVIEW diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 697d850d51..497aa44a35 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -21,6 +21,7 @@ datum/preferences var/UI_style = "Midnight" var/UI_style_color = "#ffffff" var/UI_style_alpha = 255 + var/tooltipstyle = "Midnight" //Style for popup tooltips //character preferences var/real_name //our character's name diff --git a/code/modules/client/preferences_toggle_procs.dm b/code/modules/client/preferences_toggle_procs.dm index a350942c58..ca6fae65fd 100644 --- a/code/modules/client/preferences_toggle_procs.dm +++ b/code/modules/client/preferences_toggle_procs.dm @@ -207,6 +207,19 @@ feedback_add_details("admin_verb","TFiringMode") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! +/client/verb/toggle_mob_tooltips() + set name = "Toggle Mob Tooltips" + set category = "Preferences" + set desc = "Toggles displaying name/species over mobs when moused over." + + var/pref_path = /datum/client_preference/mob_tooltips + toggle_preference(pref_path) + prefs.save_preferences() + + src << "You will now [(is_preference_enabled(/datum/client_preference/mob_tooltips)) ? "see" : "not see"] mob tooltips." + + feedback_add_details("admin_verb","TMobTooltips") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + //Toggles for Staff //Developers diff --git a/code/modules/client/ui_style.dm b/code/modules/client/ui_style.dm index d8d683d5d3..4a736aec5e 100644 --- a/code/modules/client/ui_style.dm +++ b/code/modules/client/ui_style.dm @@ -20,6 +20,15 @@ "Hologram" = 'icons/mob/screen1_robot_minimalist.dmi' ) +var/global/list/all_tooltip_styles = list( + "Midnight", //Default for everyone is the first one, + "Plasmafire", + "Retro", + "Slimecore", + "Operative", + "Clockwork" + ) + /proc/ui_style2icon(ui_style) if(ui_style in all_ui_styles) return all_ui_styles[ui_style] diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 6da16a608d..facc1ac438 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1576,3 +1576,55 @@ if(update_icons) update_icons() + +/mob/living/carbon/human/proc/get_display_species() + //Shows species in tooltip + if(src.custom_species) //VOREStation Add + return custom_species //VOREStation Add + //Beepboops get special text if obviously beepboop + if(looksSynthetic()) + if(gender == MALE) + return "Android" + else if(gender == FEMALE) + return "Gynoid" + else + return "Synthetic" + //Else species name + if(species) + return species.get_examine_name() + //Else CRITICAL FAILURE! + return "" + +/mob/living/carbon/human/get_nametag_name(mob/user) + return name //Could do fancy stuff here? + +/mob/living/carbon/human/get_nametag_desc(mob/user) + var/msg = "" + if(hasHUD(user,"security")) + //Try to find their name + var/perpname + if(wear_id) + var/obj/item/weapon/card/id/I = wear_id.GetID() + if(I) + perpname = I.registered_name + else + perpname = name + else + perpname = name + //Try to find their record + var/criminal = "None" + if(perpname) + var/datum/data/record/G = find_general_record("name", perpname) + if(G) + var/datum/data/record/S = find_security_record("id", G.fields["id"]) + if(S) + criminal = S.fields["criminal"] + //If it's interesting, append + if(criminal != "None") + msg += "([criminal]) " + + if(hasHUD(user,"medical")) + msg += "(Health: [round((health/getMaxHealth())*100)]%) " + + msg += get_display_species() + return msg diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/negative.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/negative.dm index 307fc537ee..f8fdcc79cb 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/negative.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/negative.dm @@ -110,7 +110,7 @@ /datum/trait/lightweight name = "Lightweight" desc = "Your light weight and poor balance make you very susceptible to unhelpful bumping. Think of it like a bowling ball versus a pin." - cost = -4 + cost = -2 var_changes = list("lightweight" = 1) /datum/trait/colorblind diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 600a452dbb..c1a2be9078 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -137,8 +137,6 @@ default behaviour is: return // VOREStation Edit - Begin - // Handle grabbing, stomping, and such of micros! - if(handle_micro_bump_other(tmob)) return // Plow that nerd. if(ishuman(tmob)) var/mob/living/carbon/human/H = tmob @@ -147,6 +145,8 @@ default behaviour is: H.Weaken(20) now_pushing = 0 return + // Handle grabbing, stomping, and such of micros! + if(handle_micro_bump_other(tmob)) return // VOREStation Edit - End if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations)) diff --git a/code/modules/mob/living/simple_animal/animals/bat.dm b/code/modules/mob/living/simple_animal/animals/bat.dm index 726c94f143..c51c7c1b36 100644 --- a/code/modules/mob/living/simple_animal/animals/bat.dm +++ b/code/modules/mob/living/simple_animal/animals/bat.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/hostile/scarybat name = "space bats" desc = "A swarm of cute little blood sucking bats that looks pretty upset." + tt_desc = "Desmodus rotundus" //Common vampire bat icon = 'icons/mob/bats.dmi' icon_state = "bat" icon_living = "bat" diff --git a/code/modules/mob/living/simple_animal/animals/bear.dm b/code/modules/mob/living/simple_animal/animals/bear.dm index 3cb3fa8cbe..55eda3fcca 100644 --- a/code/modules/mob/living/simple_animal/animals/bear.dm +++ b/code/modules/mob/living/simple_animal/animals/bear.dm @@ -2,6 +2,7 @@ /mob/living/simple_animal/hostile/bear name = "space bear" desc = "RawrRawr!!" + tt_desc = "Ursinae aetherius" //...bearspace? Maybe. icon_state = "bear" icon_living = "bear" icon_dead = "bear_dead" diff --git a/code/modules/mob/living/simple_animal/animals/carp.dm b/code/modules/mob/living/simple_animal/animals/carp.dm index 4dc4daffda..8b6e01c452 100644 --- a/code/modules/mob/living/simple_animal/animals/carp.dm +++ b/code/modules/mob/living/simple_animal/animals/carp.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/hostile/carp name = "space carp" desc = "A ferocious, fang-bearing creature that resembles a fish." + tt_desc = "Cyprinus aetherius" //carpspace? maybe icon_state = "carp" icon_living = "carp" icon_dead = "carp_dead" diff --git a/code/modules/mob/living/simple_animal/animals/cat.dm b/code/modules/mob/living/simple_animal/animals/cat.dm index 1f0c9c6d26..0eb3516d67 100644 --- a/code/modules/mob/living/simple_animal/animals/cat.dm +++ b/code/modules/mob/living/simple_animal/animals/cat.dm @@ -2,6 +2,7 @@ /mob/living/simple_animal/cat name = "cat" desc = "A domesticated, feline pet. Has a tendency to adopt crewmembers." + tt_desc = "Felis catus" intelligence_level = SA_ANIMAL icon_state = "cat2" item_state = "cat2" @@ -155,6 +156,7 @@ /mob/living/simple_animal/cat/fluff/Runtime name = "Runtime" desc = "Her fur has the look and feel of velvet, and her tail quivers occasionally." + tt_desc = "Felis medicalis" gender = FEMALE icon_state = "cat" item_state = "cat" diff --git a/code/modules/mob/living/simple_animal/animals/corgi.dm b/code/modules/mob/living/simple_animal/animals/corgi.dm index a6d0dcd9c0..d5c198ad78 100644 --- a/code/modules/mob/living/simple_animal/animals/corgi.dm +++ b/code/modules/mob/living/simple_animal/animals/corgi.dm @@ -3,6 +3,7 @@ name = "corgi" real_name = "corgi" desc = "It's a corgi." + tt_desc = "Canis familiaris" intelligence_level = SA_ANIMAL icon_state = "corgi" icon_living = "corgi" @@ -37,6 +38,7 @@ real_name = "Ian" //Intended to hold the name without altering it. gender = MALE desc = "It's a corgi." + tt_desc = "Canis commandus" var/turns_since_scan = 0 var/obj/movement_target response_help = "pets" diff --git a/code/modules/mob/living/simple_animal/animals/crab.dm b/code/modules/mob/living/simple_animal/animals/crab.dm index 0d485d859d..de131b9055 100644 --- a/code/modules/mob/living/simple_animal/animals/crab.dm +++ b/code/modules/mob/living/simple_animal/animals/crab.dm @@ -2,6 +2,7 @@ /mob/living/simple_animal/crab name = "crab" desc = "A hard-shelled crustacean. Seems quite content to lounge around all the time." + tt_desc = "Ranina ranina" icon_state = "crab" icon_living = "crab" icon_dead = "crab_dead" diff --git a/code/modules/mob/living/simple_animal/animals/farm_animals.dm b/code/modules/mob/living/simple_animal/animals/farm_animals.dm index 213aff73bf..52904786a4 100644 --- a/code/modules/mob/living/simple_animal/animals/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/animals/farm_animals.dm @@ -2,6 +2,7 @@ /mob/living/simple_animal/retaliate/goat name = "goat" desc = "Not known for their pleasant disposition." + tt_desc = "Oreamnos americanus" icon_state = "goat" icon_living = "goat" icon_dead = "goat_dead" @@ -85,6 +86,7 @@ /mob/living/simple_animal/cow name = "cow" desc = "Known for their milk, just don't tip them over." + tt_desc = "Bos taurus" icon_state = "cow" icon_living = "cow" icon_dead = "cow_dead" @@ -153,6 +155,7 @@ /mob/living/simple_animal/chick name = "\improper chick" desc = "Adorable! They make such a racket though." + tt_desc = "Gallus domesticus" icon_state = "chick" icon_living = "chick" icon_dead = "chick_dead" @@ -203,6 +206,7 @@ var/global/chicken_count = 0 /mob/living/simple_animal/chicken name = "\improper chicken" desc = "Hopefully the eggs are good this season." + tt_desc = "Gallus domesticus" icon_state = "chicken" icon_living = "chicken" icon_dead = "chicken_dead" diff --git a/code/modules/mob/living/simple_animal/animals/fox_vr.dm b/code/modules/mob/living/simple_animal/animals/fox_vr.dm index 65938cb249..90131fc8b9 100644 --- a/code/modules/mob/living/simple_animal/animals/fox_vr.dm +++ b/code/modules/mob/living/simple_animal/animals/fox_vr.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/fox name = "fox" desc = "It's a fox. I wonder what it says?" + tt_desc = "Vulpes vulpes" icon = 'icons/mob/fox_vr.dmi' icon_state = "fox2" icon_living = "fox2" @@ -183,6 +184,7 @@ /mob/living/simple_animal/fox/fluff/Renault name = "Renault" desc = "Renault, the Colony Director's trustworthy fox. I wonder what it says?" + tt_desc = "Vulpes nobilis" befriend_job = "Colony Director" /mob/living/simple_animal/fox/fluff/Renault/init_belly() @@ -218,6 +220,7 @@ /mob/living/simple_animal/fox/syndicate name = "syndi-fox" desc = "It's a DASTARDLY fox! The horror! Call the shuttle!" + tt_desc = "Vulpes malus" icon = 'icons/mob/fox_vr.dmi' icon_state = "syndifox" icon_living = "syndifox" diff --git a/code/modules/mob/living/simple_animal/animals/giant_spider.dm b/code/modules/mob/living/simple_animal/animals/giant_spider.dm index c0b8d75c54..094a3060b0 100644 --- a/code/modules/mob/living/simple_animal/animals/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/animals/giant_spider.dm @@ -8,6 +8,7 @@ /mob/living/simple_animal/hostile/giant_spider name = "giant spider" desc = "Furry and brown, it makes you shudder to look at it. This one has deep red eyes." + tt_desc = "Atrax robustus gigantus" icon_state = "guard" icon_living = "guard" icon_dead = "guard_dead" diff --git a/code/modules/mob/living/simple_animal/animals/goose.dm b/code/modules/mob/living/simple_animal/animals/goose.dm index ce6dbdfda8..67e0bdad81 100644 --- a/code/modules/mob/living/simple_animal/animals/goose.dm +++ b/code/modules/mob/living/simple_animal/animals/goose.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/hostile/goose name = "space goose" desc = "That's no duck. That's a space goose. You have a bad feeling about this." + tt_desc = "Anser aetherius" //Goose space?! icon_state = "goose" icon_living = "goose" icon_dead = "goose_dead" diff --git a/code/modules/mob/living/simple_animal/animals/lizard.dm b/code/modules/mob/living/simple_animal/animals/lizard.dm index 38822faf0d..c4c1487315 100644 --- a/code/modules/mob/living/simple_animal/animals/lizard.dm +++ b/code/modules/mob/living/simple_animal/animals/lizard.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/lizard name = "Lizard" desc = "A cute tiny lizard." + tt_desc = "Gekko gecko" icon = 'icons/mob/critter.dmi' icon_state = "lizard" icon_living = "lizard" diff --git a/code/modules/mob/living/simple_animal/animals/mouse.dm b/code/modules/mob/living/simple_animal/animals/mouse.dm index 87df901527..123e82a611 100644 --- a/code/modules/mob/living/simple_animal/animals/mouse.dm +++ b/code/modules/mob/living/simple_animal/animals/mouse.dm @@ -2,6 +2,7 @@ name = "mouse" real_name = "mouse" desc = "It's a small rodent." + tt_desc = "Mus musculus" icon_state = "mouse_gray" item_state = "mouse_gray" icon_living = "mouse_gray" diff --git a/code/modules/mob/living/simple_animal/animals/parrot.dm b/code/modules/mob/living/simple_animal/animals/parrot.dm index e495c0e1c7..f48dace302 100644 --- a/code/modules/mob/living/simple_animal/animals/parrot.dm +++ b/code/modules/mob/living/simple_animal/animals/parrot.dm @@ -31,6 +31,7 @@ /mob/living/simple_animal/parrot name = "parrot" desc = "The parrot squawks, \"It's a parrot! BAWWK!\"" + tt_desc = "Poicephalus robustus" icon = 'icons/mob/animal.dmi' icon_state = "parrot_fly" icon_living = "parrot_fly" diff --git a/code/modules/mob/living/simple_animal/animals/penguin.dm b/code/modules/mob/living/simple_animal/animals/penguin.dm index 4bb985d1ac..8463d9ac39 100644 --- a/code/modules/mob/living/simple_animal/animals/penguin.dm +++ b/code/modules/mob/living/simple_animal/animals/penguin.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/penguin name = "space penguin" desc = "An ungainly, waddling, cute, and VERY well-dressed bird." + tt_desc = "Aptenodytes forsteri" icon_state = "penguin" icon_living = "penguin" icon_dead = "penguin_dead" diff --git a/code/modules/mob/living/simple_animal/animals/slime.dm b/code/modules/mob/living/simple_animal/animals/slime.dm index d3a8b1df0c..8c6ef9cf82 100644 --- a/code/modules/mob/living/simple_animal/animals/slime.dm +++ b/code/modules/mob/living/simple_animal/animals/slime.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/old_slime name = "pet slime" desc = "A lovable, domesticated slime." + tt_desc = "Amorphidae proteus" icon = 'icons/mob/slimes.dmi' icon_state = "grey baby slime" icon_living = "grey baby slime" diff --git a/code/modules/mob/living/simple_animal/animals/spiderbot.dm b/code/modules/mob/living/simple_animal/animals/spiderbot.dm index 7ae8edfb7a..83f18c071a 100644 --- a/code/modules/mob/living/simple_animal/animals/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/animals/spiderbot.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/spiderbot name = "spider-bot" desc = "A skittering robotic friend!" + tt_desc = "Maintenance Robot" icon = 'icons/mob/robots.dmi' icon_state = "spiderbot-chassis" icon_living = "spiderbot-chassis" diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 5bf254583a..cde93f797d 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -5,6 +5,7 @@ /mob/living/simple_animal name = "animal" + desc = "" icon = 'icons/mob/animal.dmi' health = 20 maxHealth = 20 @@ -13,6 +14,8 @@ mob_swap_flags = MONKEY|SLIME|HUMAN mob_push_flags = MONKEY|SLIME|HUMAN + var/tt_desc = "Uncataloged Life Form" //Tooltip description + //Settings for played mobs var/show_stat_health = 1 // Does the percentage health show in the stat panel for the mob var/ai_inactive = 0 // Set to 1 to turn off most AI actions @@ -1718,3 +1721,6 @@ /mob/living/simple_animal/retaliate retaliate = 1 destroy_surroundings = 1 + +/mob/living/simple_animal/get_nametag_desc(mob/user) + return "tt_desc" diff --git a/code/modules/mob/living/simple_animal/vore/awoo.dm b/code/modules/mob/living/simple_animal/vore/awoo.dm index 95234454af..fbd6d8dac5 100644 --- a/code/modules/mob/living/simple_animal/vore/awoo.dm +++ b/code/modules/mob/living/simple_animal/vore/awoo.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/retaliate/awoo name = "wolfgirl" desc = "AwooOOOOoooo!" + tt_desc = "Homo lupus" icon = 'icons/mob/vore.dmi' icon_state = "awoo" icon_living = "awoo" diff --git a/code/modules/mob/living/simple_animal/vore/catgirl.dm b/code/modules/mob/living/simple_animal/vore/catgirl.dm index f0c0f8ad25..dc8b5f1d8d 100644 --- a/code/modules/mob/living/simple_animal/vore/catgirl.dm +++ b/code/modules/mob/living/simple_animal/vore/catgirl.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/catgirl name = "catgirl" desc = "Her hobbies are catnaps, knocking things over, and headpats." + tt_desc = "Homo felinus" icon = 'icons/mob/vore.dmi' icon_state = "catgirl" diff --git a/code/modules/mob/living/simple_animal/vore/fennec.dm b/code/modules/mob/living/simple_animal/vore/fennec.dm index e658f8f441..1f7a869a4a 100644 --- a/code/modules/mob/living/simple_animal/vore/fennec.dm +++ b/code/modules/mob/living/simple_animal/vore/fennec.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/fennec name = "fennec" desc = "It's a dusty big-eared sandfox! Adorable!" + tt_desc = "Vulpes zerda" icon = 'icons/mob/vore.dmi' icon_state = "fennec" icon_living = "fennec" diff --git a/code/modules/mob/living/simple_animal/vore/frog.dm b/code/modules/mob/living/simple_animal/vore/frog.dm index 45f73456e8..ae4389914b 100644 --- a/code/modules/mob/living/simple_animal/vore/frog.dm +++ b/code/modules/mob/living/simple_animal/vore/frog.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/hostile/frog name = "giant frog" desc = "You've heard of having a frog in your throat, now get ready for the reverse." + tt_desc = "Anura gigantus" icon = 'icons/mob/vore.dmi' icon_dead = "frog-dead" icon_living = "frog" diff --git a/code/modules/mob/living/simple_animal/vore/gaslamp.dm b/code/modules/mob/living/simple_animal/vore/gaslamp.dm index 121cc6acfc..8df8d216b4 100644 --- a/code/modules/mob/living/simple_animal/vore/gaslamp.dm +++ b/code/modules/mob/living/simple_animal/vore/gaslamp.dm @@ -13,6 +13,7 @@ TODO: Make them light up and heat the air when exposed to oxygen. /mob/living/simple_animal/retaliate/gaslamp name = "gaslamp" desc = "Some sort of floaty alien with a warm glow. This creature is endemic to Virgo-3B." + tt_desc = "Semaeostomeae virginus" icon = 'icons/mob/vore32x64.dmi' icon_state = "gaslamp" icon_living = "gaslamp" diff --git a/code/modules/mob/living/simple_animal/vore/horse.dm b/code/modules/mob/living/simple_animal/vore/horse.dm index 35d8603094..59bbfa4550 100644 --- a/code/modules/mob/living/simple_animal/vore/horse.dm +++ b/code/modules/mob/living/simple_animal/vore/horse.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/horse name = "horse" desc = "Don't look it in the mouth." + tt_desc = "Equus ferus caballus" icon = 'icons/mob/vore.dmi' icon_state = "horse" icon_living = "horse" diff --git a/code/modules/mob/living/simple_animal/vore/otie.dm b/code/modules/mob/living/simple_animal/vore/otie.dm index eb814c5425..184ab76888 100644 --- a/code/modules/mob/living/simple_animal/vore/otie.dm +++ b/code/modules/mob/living/simple_animal/vore/otie.dm @@ -6,6 +6,7 @@ /mob/living/simple_animal/otie //Spawn this one only if you're looking for a bad time. Not friendly. name = "otie" desc = "The classic bioengineered longdog." + tt_desc = "Canis otis" icon = 'icons/mob/vore64x32.dmi' icon_state = "otie" icon_living = "otie" diff --git a/code/modules/mob/living/simple_animal/vore/panther.dm b/code/modules/mob/living/simple_animal/vore/panther.dm index f22fd275a1..3e723e68fc 100644 --- a/code/modules/mob/living/simple_animal/vore/panther.dm +++ b/code/modules/mob/living/simple_animal/vore/panther.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/hostile/panther name = "panther" desc = "Runtime's larger, less cuddly cousin." + tt_desc = "Panthera pardus" icon = 'icons/mob/vore64x64.dmi' icon_state = "panther" icon_living = "panther" diff --git a/code/modules/mob/living/simple_animal/vore/shadekin/shadekin.dm b/code/modules/mob/living/simple_animal/vore/shadekin/shadekin.dm index 2a2085d8e4..73027e0a37 100644 --- a/code/modules/mob/living/simple_animal/vore/shadekin/shadekin.dm +++ b/code/modules/mob/living/simple_animal/vore/shadekin/shadekin.dm @@ -447,6 +447,6 @@ speech_verb = "mars" ask_verb = "mars" exclaim_verb = "mars" - key = "s" + key = "m" machine_understands = 0 flags = RESTRICTED | HIVEMIND diff --git a/code/modules/mob/living/simple_animal/vore/wah.dm b/code/modules/mob/living/simple_animal/vore/wah.dm index b0fd4887bf..316441edd7 100644 --- a/code/modules/mob/living/simple_animal/vore/wah.dm +++ b/code/modules/mob/living/simple_animal/vore/wah.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/wah name = "red panda" desc = "It's a wah! Beware of doom pounce!" + tt_desc = "Ailurus fulgens" icon = 'icons/mob/vore.dmi' icon_state = "wah" icon_living = "wah" @@ -39,6 +40,7 @@ /mob/living/simple_animal/wah/fae name = "dark wah" desc = "Ominous, but still cute!" + tt_desc = "Ailurus brattus" icon_state = "wah_fae" icon_living = "wah_fae" diff --git a/code/modules/mob/living/simple_animal/vore/wolf.dm b/code/modules/mob/living/simple_animal/vore/wolf.dm index e503847030..fe3a970ac0 100644 --- a/code/modules/mob/living/simple_animal/vore/wolf.dm +++ b/code/modules/mob/living/simple_animal/vore/wolf.dm @@ -1,6 +1,7 @@ /mob/living/simple_animal/hostile/wolf name = "grey wolf" desc = "My, what big jaws it has!" + tt_desc = "Canis lupus" icon = 'icons/mob/vore.dmi' icon_dead = "wolf-dead" icon_living = "wolf" diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index cf50a44f85..9f316ba184 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -58,3 +58,7 @@ //set macro to normal incase it was overriden (like cyborg currently does) client.set_hotkeys_macro("macro", "hotkeymode") + + if(!client.tooltips) + client.tooltips = new(client) + \ No newline at end of file diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 1ad998a1f1..0739a64fe6 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1146,3 +1146,14 @@ mob/proc/yank_out_object() //Throwing stuff /mob/proc/throw_item(atom/target) return + +/mob/MouseEntered(location, control, params) + if(usr != src && usr.is_preference_enabled(/datum/client_preference/mob_tooltips)) + openToolTip(user = usr, tip_src = src, params = params, title = get_nametag_name(usr), content = get_nametag_desc(usr)) + + ..() + +/mob/MouseExited() + closeToolTip(usr) //No reason not to, really + + ..() diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index d21a82f9cc..804934838d 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -354,6 +354,7 @@ var/mob/living/character = create_character(T) //creates the human and transfers vars and mind character = job_master.EquipRank(character, rank, 1) //equips the human UpdateFactionList(character) + log_game("JOINED [key_name(character)] as \"[rank]\"") // AIs don't need a spawnpoint, they must spawn at an empty core if(character.mind.assigned_role == "AI") diff --git a/code/modules/multiz/pipes.dm b/code/modules/multiz/pipes.dm index 3a491867bf..8d03c8f862 100644 --- a/code/modules/multiz/pipes.dm +++ b/code/modules/multiz/pipes.dm @@ -13,6 +13,9 @@ obj/machinery/atmospherics/pipe/zpipe dir = SOUTH initialize_directions = SOUTH + construction_type = /obj/item/pipe/directional + pipe_state = "cap" + // node1 is the connection on the same Z // node2 is the connection on the other Z @@ -135,16 +138,15 @@ obj/machinery/atmospherics/pipe/zpipe/up/atmos_init() node1_dir = direction for(var/obj/machinery/atmospherics/target in get_step(src,node1_dir)) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node1 = target - break + if(can_be_node(target, 1)) + node1 = target + break var/turf/above = GetAbove(src) if(above) for(var/obj/machinery/atmospherics/target in above) - if(target.initialize_directions && istype(target, /obj/machinery/atmospherics/pipe/zpipe/down)) - if (check_connect_types(target,src)) + if(istype(target, /obj/machinery/atmospherics/pipe/zpipe/down)) + if (check_connectable(target) && target.check_connectable(src)) node2 = target break @@ -173,16 +175,15 @@ obj/machinery/atmospherics/pipe/zpipe/down/atmos_init() node1_dir = direction for(var/obj/machinery/atmospherics/target in get_step(src,node1_dir)) - if(target.initialize_directions & get_dir(target,src)) - if (check_connect_types(target,src)) - node1 = target - break + if(can_be_node(target, 1)) + node1 = target + break var/turf/below = GetBelow(src) if(below) for(var/obj/machinery/atmospherics/target in below) - if(target.initialize_directions && istype(target, /obj/machinery/atmospherics/pipe/zpipe/up)) - if (check_connect_types(target,src)) + if(istype(target, /obj/machinery/atmospherics/pipe/zpipe/up)) + if (check_connectable(target) && target.check_connectable(src)) node2 = target break @@ -199,6 +200,8 @@ obj/machinery/atmospherics/pipe/zpipe/up/scrubbers name = "upwards scrubbers pipe" desc = "A scrubbers pipe segment to connect upwards." connect_types = CONNECT_TYPE_SCRUBBER + piping_layer = PIPING_LAYER_SCRUBBER + layer = 2.38 icon_connect_type = "-scrubbers" color = PIPE_COLOR_RED @@ -207,6 +210,8 @@ obj/machinery/atmospherics/pipe/zpipe/up/supply name = "upwards supply pipe" desc = "A supply pipe segment to connect upwards." connect_types = CONNECT_TYPE_SUPPLY + piping_layer = PIPING_LAYER_SUPPLY + layer = 2.39 icon_connect_type = "-supply" color = PIPE_COLOR_BLUE @@ -215,6 +220,8 @@ obj/machinery/atmospherics/pipe/zpipe/down/scrubbers name = "downwards scrubbers pipe" desc = "A scrubbers pipe segment to connect downwards." connect_types = CONNECT_TYPE_SCRUBBER + piping_layer = PIPING_LAYER_SCRUBBER + layer = 2.38 icon_connect_type = "-scrubbers" color = PIPE_COLOR_RED @@ -223,5 +230,7 @@ obj/machinery/atmospherics/pipe/zpipe/down/supply name = "downwards supply pipe" desc = "A supply pipe segment to connect downwards." connect_types = CONNECT_TYPE_SUPPLY + piping_layer = PIPING_LAYER_SUPPLY + layer = 2.39 icon_connect_type = "-supply" - color = PIPE_COLOR_BLUE \ No newline at end of file + color = PIPE_COLOR_BLUE diff --git a/code/modules/organs/robolimbs.dm b/code/modules/organs/robolimbs.dm index 12933c0ff2..63376a7203 100644 --- a/code/modules/organs/robolimbs.dm +++ b/code/modules/organs/robolimbs.dm @@ -42,7 +42,7 @@ var/const/standard_monitor_styles = "blank=ipc_blank;\ var/lifelike // If set, appears organic. var/skin_tone // If set, applies skin tone rather than part color var/blood_color = "#030303" - var/list/species_cannot_use = list("Teshari") + var/list/species_cannot_use = list("Teshari", "Promethean") //VOREStation Add var/list/monitor_styles //If empty, the model of limbs offers a head compatible with monitors. var/parts = BP_ALL //Defines what parts said brand can replace on a body. var/health_hud_intensity = 1 // Intensity modifier for the health GUI indicator. diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index f4f6579420..827bd9aefd 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -48,7 +48,7 @@ /obj/machinery/power/emitter/Destroy() message_admins("Emitter deleted at ([x],[y],[z] - JMP)",0,1) - log_game("Emitter deleted at ([x],[y],[z])") + log_game("EMITTER([x],[y],[z]) Destroyed/deleted.") investigate_log("deleted at ([x],[y],[z])","singulo") ..() @@ -72,7 +72,7 @@ src.active = 0 user << "You turn off [src]." message_admins("Emitter turned off by [key_name(user, user.client)](?) in ([x],[y],[z] - JMP)",0,1) - log_game("Emitter turned off by [user.ckey]([user]) in ([x],[y],[z])") + log_game("EMITTER([x],[y],[z]) OFF by [key_name(user)]") investigate_log("turned off by [user.key]","singulo") else src.active = 1 @@ -80,7 +80,7 @@ src.shot_number = 0 src.fire_delay = get_initial_fire_delay() message_admins("Emitter turned on by [key_name(user, user.client)](?) in ([x],[y],[z] - JMP)",0,1) - log_game("Emitter turned on by [user.ckey]([user]) in ([x],[y],[z])") + log_game("EMITTER([x],[y],[z]) ON by [key_name(user)]") investigate_log("turned on by [user.key]","singulo") update_icon() else @@ -112,11 +112,13 @@ if(!powered) powered = 1 update_icon() + log_game("EMITTER([x],[y],[z]) Regained power and is ON.") investigate_log("regained power and turned on","singulo") else if(powered) powered = 0 update_icon() + log_game("EMITTER([x],[y],[z]) Lost power and was ON.") investigate_log("lost power and turned off","singulo") return diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index a9251e27ee..d32670a2ce 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -90,6 +90,7 @@ field_generator power level display "You turn on the [src.name].", \ "You hear heavy droning") turn_on() + log_game("FIELDGEN([x],[y],[z]) Activated by [key_name(user)]") investigate_log("activated by [user.key].","singulo") src.add_fingerprint(user) @@ -213,6 +214,7 @@ field_generator power level display for(var/mob/M in viewers(src)) M.show_message("\The [src] shuts down!") turn_off() + log_game("FIELDGEN([x],[y],[z]) Lost power and was ON.") investigate_log("ran out of power and deactivated","singulo") src.power = 0 return 0 @@ -336,6 +338,8 @@ field_generator power level display if(O.last_warning && temp) if((world.time - O.last_warning) > 50) //to stop message-spam temp = 0 + admin_chat_message(message = "SINGUL/TESLOOSE!", color = "#FF2222") //VOREStation Add message_admins("A singulo exists and a containment field has failed.",1) investigate_log("has failed whilst a singulo exists.","singulo") + log_game("FIELDGEN([x],[y],[z]) Containment failed while singulo/tesla exists.") O.last_warning = world.time diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index 80f90fbacc..a5d2a4ac0a 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -139,6 +139,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin ..() if(master && master.active) master.toggle_power() + log_game("PACCEL([x],[y],[z]) Was moved while active and turned off.") investigate_log("was moved whilst active; it powered down.","singulo") /obj/structure/particle_accelerator/ex_act(severity) diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm index 0bc4adabcf..bcdd0d5036 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -119,7 +119,7 @@ strength = strength_upper_limit else message_admins("PA Control Computer increased to [strength] by [key_name(usr, usr.client)](?) in ([x],[y],[z] - JMP)",0,1) - log_game("PA Control Computer increased to [strength] by [usr.ckey]([usr]) in ([x],[y],[z])") + log_game("PACCEL([x],[y],[z]) [key_name(usr)] increased to [strength]") investigate_log("increased to [strength] by [usr.key]","singulo") strength_change() @@ -130,7 +130,7 @@ strength = 0 else message_admins("PA Control Computer decreased to [strength] by [key_name(usr, usr.client)](?) in ([x],[y],[z] - JMP)",0,1) - log_game("PA Control Computer decreased to [strength] by [usr.ckey]([usr]) in ([x],[y],[z])") + log_game("PACCEL([x],[y],[z]) [key_name(usr)] decreased to [strength]") investigate_log("decreased to [strength] by [usr.key]","singulo") strength_change() @@ -147,6 +147,7 @@ if(src.active) //a part is missing! if( length(connected_parts) < 6 ) + log_game("PACCEL([x],[y],[z]) Failed due to missing parts.") investigate_log("lost a connected part; It powered down.","singulo") toggle_power() return @@ -209,7 +210,7 @@ active = !active investigate_log("turned [active?"ON":"OFF"] by [usr ? usr.key : "outside forces"]","singulo") message_admins("PA Control Computer turned [active ?"ON":"OFF"] by [key_name(usr, usr.client)](?) in ([x],[y],[z] - JMP)",0,1) - log_game("PA Control Computer turned [active ?"ON":"OFF"] by [usr.ckey]([usr]) in ([x],[y],[z])") + log_game("PACCEL([x],[y],[z]) [key_name(usr)] turned [active?"ON":"OFF"].") if(active) update_use_power(2) for(var/obj/structure/particle_accelerator/part in connected_parts) diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index d1189f25fb..e2b37348a9 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -148,6 +148,7 @@ if(output_used < 0.0001) // either from no charge or set to 0 outputting(0) investigate_log("lost power and turned off","singulo") + log_game("SMES([x],[y],[z]) Power depleted.") else if(output_attempt && output_level > 0) outputting = 1 else @@ -374,7 +375,7 @@ output_level = max(0, min(output_level_max, output_level)) // clamp to range investigate_log("input/output; on":"off"] | Input-mode: [input_attempt?"auto":"off"] by [usr.key]","singulo") - + log_game("SMES([x],[y],[z]) [key_name(usr)] changed settings: I:[input_level]([input_attempt]), O:[output_level]([output_attempt])") return 1 diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index df27be9d78..c7b113ae32 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -94,7 +94,7 @@ /obj/machinery/power/supermatter/proc/explode() message_admins("Supermatter exploded at ([x],[y],[z] - JMP)",0,1) - log_game("Supermatter exploded at ([x],[y],[z])") + log_game("SUPERMATTER([x],[y],[z]) Exploded. Power:[power], Oxygen:[oxygen], Damage:[damage], Integrity:[get_integrity()]") anchored = 1 grav_pulling = 1 exploded = 1 @@ -146,11 +146,13 @@ alert_msg = null if(alert_msg) global_announcer.autosay(alert_msg, "Supermatter Monitor", "Engineering") + log_game("SUPERMATTER([x],[y],[z]) Emergency engineering announcement. Power:[power], Oxygen:[oxygen], Damage:[damage], Integrity:[get_integrity()]") //Public alerts if((damage > emergency_point) && !public_alert) global_announcer.autosay("WARNING: SUPERMATTER CRYSTAL DELAMINATION IMMINENT!", "Supermatter Monitor") admin_chat_message(message = "SUPERMATTER DELAMINATING!", color = "#FF2222") //VOREStation Add public_alert = 1 + log_game("SUPERMATTER([x],[y],[z]) Emergency PUBLIC announcement. Power:[power], Oxygen:[oxygen], Damage:[damage], Integrity:[get_integrity()]") else if(safe_warned && public_alert) global_announcer.autosay(alert_msg, "Supermatter Monitor") public_alert = 0 @@ -272,12 +274,17 @@ return 0 // This stops people from being able to really power up the supermatter // Then bring it inside to explode instantly upon landing on a valid turf. - + var/added_energy + var/added_damage var/proj_damage = Proj.get_structure_damage() if(istype(Proj, /obj/item/projectile/beam)) - power += proj_damage * config_bullet_energy * CHARGING_FACTOR / POWER_FACTOR + added_energy = proj_damage * config_bullet_energy * CHARGING_FACTOR / POWER_FACTOR + power += added_energy else - damage += proj_damage * config_bullet_energy + added_damage = proj_damage * config_bullet_energy + damage += added_damage + if(added_energy || added_damage) + log_game("SUPERMATTER([x],[y],[z]) Hit by \"[Proj.name]\". +[added_energy] Energy, +[added_damage] Damage.") return 0 /obj/machinery/power/supermatter/attack_robot(mob/user as mob) diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index d37eec4b5d..9274bb85a6 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -93,6 +93,7 @@ /obj/singularity/energy_ball/proc/handle_energy() if (energy <= 0) + log_game("TESLA([x],[y],[z]) Collapsed entirely.") investigate_log("collapsed.", I_SINGULO) qdel(src) return TRUE @@ -290,6 +291,8 @@ else if(closest_mob) var/shock_damage = Clamp(round(power/400), 10, 90) + rand(-5, 5) closest_mob.electrocute_act(shock_damage, source, 1, ran_zone()) + log_game("TESLA([source.x],[source.y],[source.z]) Shocked [key_name(closest_mob)] for [shock_damage]dmg.") + message_admins("Tesla zapped [key_name_admin(closest_mob)]!") if(issilicon(closest_mob)) var/mob/living/silicon/S = closest_mob if(stun_mobs) diff --git a/code/modules/reagents/reagent_containers/syringes_vr.dm b/code/modules/reagents/reagent_containers/syringes_vr.dm index 1c6fb55fe8..3f012a257a 100644 --- a/code/modules/reagents/reagent_containers/syringes_vr.dm +++ b/code/modules/reagents/reagent_containers/syringes_vr.dm @@ -14,7 +14,7 @@ /obj/item/weapon/reagent_containers/syringe/Destroy() qdel_null_list(viruses) - targets.Cut() + LAZYCLEARLIST(targets) return ..() /obj/item/weapon/reagent_containers/syringe/process() diff --git a/code/modules/tooltip/tooltip.dm b/code/modules/tooltip/tooltip.dm new file mode 100644 index 0000000000..1b03157e83 --- /dev/null +++ b/code/modules/tooltip/tooltip.dm @@ -0,0 +1,124 @@ +/* +Tooltips v1.1 - 22/10/15 +Developed by Wire (#goonstation on irc.synirc.net) +- Added support for screen_loc pixel offsets. Should work. Maybe. +- Added init function to more efficiently send base vars + +Configuration: +- Set control to the correct skin element (remember to actually place the skin element) +- Set file to the correct path for the .html file (remember to actually place the html file) +- Attach the datum to the user client on login, e.g. +/client/New() + src.tooltips = new /datum/tooltip(src) + +Usage: +- Define mouse event procs on your (probably HUD) object and simply call the show and hide procs respectively: +/obj/screen/hud + MouseEntered(location, control, params) + usr.client.tooltip.show(params, title = src.name, content = src.desc) + + MouseExited() + usr.client.tooltip.hide() + +Customization: +- Theming can be done by passing the theme var to show() and using css in the html file to change the look +- For your convenience some pre-made themes are included + +Notes: +- You may have noticed 90% of the work is done via javascript on the client. Gotta save those cycles man. +- This is entirely untested in any other codebase besides goonstation so I have no idea if it will port nicely. Good luck! + - After testing and discussion (Wire, Remie, MrPerson, AnturK) ToolTips are ok and work for /tg/station13 +*/ + + +/datum/tooltip + var/client/owner + var/control = "mainwindow.tooltip" + var/showing = 0 + var/queueHide = 0 + var/init = 0 + + +/datum/tooltip/New(client/C) + if (C) + owner = C + owner << browse(file2text('code/modules/tooltip/tooltip.html'), "window=[control]") + ..() + + +/datum/tooltip/proc/show(atom/movable/thing, params = null, title = null, content = null, theme = "default", special = "none") + if (!thing || !params || (!title && !content) || !owner || !isnum(world.icon_size)) + return 0 + if (!init) + //Initialize some vars + init = 1 + owner << output(list2params(list(world.icon_size, control)), "[control]:tooltip.init") + + showing = 1 + + if (title && content) + title = "

[title]

" + content = "

[content]

" + else if (title && !content) + title = "

[title]

" + else if (!title && content) + content = "

[content]

" + + // Strip macros from item names + title = replacetext(title, "\proper", "") + title = replacetext(title, "\improper", "") + + //Make our dumb param object + if(params[1] != "i") //Byond Bug: http://www.byond.com/forum/?post=2352648 + params = "icon-x=16;icon-y=16;[params]" //Put in some placeholders + params = {"{ "cursor": "[params]", "screenLoc": "[thing.screen_loc]" }"} + + //Send stuff to the tooltip + var/view_size = getviewsize(owner.view) + owner << output(list2params(list(params, view_size[1] , view_size[2], "[title][content]", theme, special)), "[control]:tooltip.update") + + //If a hide() was hit while we were showing, run hide() again to avoid stuck tooltips + showing = 0 + if (queueHide) + hide() + + return 1 + + +/datum/tooltip/proc/hide() + if (queueHide) + schedule_task_with_source_in(1, src, .proc/do_hide) + else + do_hide() + + queueHide = showing ? TRUE : FALSE + + return TRUE + +/datum/tooltip/proc/do_hide() + winshow(owner, control, FALSE) + +/* TG SPECIFIC CODE */ + + +//Open a tooltip for user, at a location based on params +//Theme is a CSS class in tooltip.html, by default this wrapper chooses a CSS class based on the user's UI_style (Midnight, Plasmafire, Retro, etc) +//Includes sanity.checks +/proc/openToolTip(mob/user = null, atom/movable/tip_src = null, params = null, title = "", content = "", theme = "") + if(istype(user)) + if(user.client && user.client.tooltips) + if(!theme && user.client.prefs && user.client.prefs.tooltipstyle) + theme = lowertext(user.client.prefs.tooltipstyle) + if(!theme) + theme = "midnight" + user.client.tooltips.show(tip_src, params, title, content, theme) + + +//Arbitrarily close a user's tooltip +//Includes sanity checks. +/proc/closeToolTip(mob/user) + if(istype(user)) + if(user.client && user.client.tooltips) + user.client.tooltips.hide() + + diff --git a/code/modules/tooltip/tooltip.html b/code/modules/tooltip/tooltip.html new file mode 100644 index 0000000000..67fb8a77f1 --- /dev/null +++ b/code/modules/tooltip/tooltip.html @@ -0,0 +1,249 @@ + + + + Tooltip + + + + + +
+
+
+ + + + diff --git a/code/world.dm b/code/world.dm index 2e9a7c9d4d..4cf2220863 100644 --- a/code/world.dm +++ b/code/world.dm @@ -147,7 +147,7 @@ var/world_topic_spam_protect_ip = "0.0.0.0" var/world_topic_spam_protect_time = world.timeofday /world/Topic(T, addr, master, key) - diary << "TOPIC: \"[T]\", from:[addr], master:[master], key:[key][log_end]" + debug_log << "TOPIC: \"[T]\", from:[addr], master:[master], key:[key][log_end]" if (T == "ping") var/x = 1 diff --git a/icons/atmos/heat.dmi b/icons/atmos/heat.dmi index 1014c2015b..8ac9682df1 100644 Binary files a/icons/atmos/heat.dmi and b/icons/atmos/heat.dmi differ diff --git a/icons/atmos/junction.dmi b/icons/atmos/junction.dmi index 892f5823f2..36704e0e47 100644 Binary files a/icons/atmos/junction.dmi and b/icons/atmos/junction.dmi differ diff --git a/icons/mob/mask_vr.dmi b/icons/mob/mask_vr.dmi index c6ce65576f..3315852358 100644 Binary files a/icons/mob/mask_vr.dmi and b/icons/mob/mask_vr.dmi differ diff --git a/icons/obj/clothing/masks_vr.dmi b/icons/obj/clothing/masks_vr.dmi index a96948180b..3850f292c5 100644 Binary files a/icons/obj/clothing/masks_vr.dmi and b/icons/obj/clothing/masks_vr.dmi differ diff --git a/icons/obj/pipe-item.dmi b/icons/obj/pipe-item.dmi index d49236c9dd..516178b6cc 100644 Binary files a/icons/obj/pipe-item.dmi and b/icons/obj/pipe-item.dmi differ diff --git a/interface/skin.dmf b/interface/skin.dmf index 0bfc8524ae..ea7d069105 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -1940,6 +1940,14 @@ window "mainwindow" is-checked = false group = "" button-type = pushbox + elem "tooltip" + type = BROWSER + pos = 0,0 + size = 999x999 + anchor1 = none + anchor2 = none + is-visible = false + saved-params = "" window "mapwindow" elem "mapwindow" diff --git a/maps/tether/tether-05-station1.dmm b/maps/tether/tether-05-station1.dmm index b87878dc5a..e300fd1795 100644 --- a/maps/tether/tether-05-station1.dmm +++ b/maps/tether/tether-05-station1.dmm @@ -583,10 +583,10 @@ /area/engineering/hallway) "aby" = ( /obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 10 + dir = 9 }, /obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 + dir = 10 }, /obj/structure/cable{ d1 = 2; @@ -770,6 +770,9 @@ /turf/simulated/floor/tiled, /area/engineering/hallway) "abO" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/machinery/atmospherics/pipe/simple/hidden/supply{ dir = 4 }, @@ -779,9 +782,6 @@ /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/structure/cable{ d1 = 1; d2 = 2; @@ -957,10 +957,10 @@ /area/hallway/station/atrium) "acu" = ( /obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 10 + dir = 9 }, /obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 + dir = 10 }, /obj/structure/cable{ d1 = 1; @@ -1270,15 +1270,15 @@ /turf/simulated/floor/tiled, /area/engineering/hallway) "ads" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/machinery/atmospherics/unary/vent_scrubber/on{ dir = 4 }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/structure/cable{ d1 = 1; d2 = 2; @@ -1311,10 +1311,10 @@ /area/engineering/hallway) "adv" = ( /obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 10 + dir = 9 }, /obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 + dir = 10 }, /turf/simulated/floor/tiled, /area/engineering/hallway) @@ -1518,15 +1518,15 @@ /turf/simulated/floor/tiled, /area/engineering/hallway) "adV" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/machinery/atmospherics/pipe/simple/hidden/supply{ dir = 6 }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/structure/cable{ d1 = 1; d2 = 2; @@ -1771,6 +1771,9 @@ /turf/simulated/floor/tiled, /area/engineering/hallway) "aeE" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 4; d2 = 8; @@ -1783,9 +1786,6 @@ /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals4{ dir = 6 }, @@ -2783,6 +2783,9 @@ /turf/simulated/floor/tiled, /area/engineering/hallway) "ahO" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 4; d2 = 8; @@ -2791,9 +2794,6 @@ /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals4{ dir = 6 }, @@ -3268,15 +3268,15 @@ /turf/simulated/floor/tiled, /area/engineering/hallway) "ajC" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/machinery/atmospherics/pipe/simple/hidden/supply{ dir = 5 }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/structure/extinguisher_cabinet{ dir = 4; icon_state = "extinguisher_closed"; @@ -3468,15 +3468,21 @@ /turf/simulated/floor/tiled, /area/tether/station/explorer_prep) "aka" = ( +/obj/effect/floor_decal/steeldecal/steel_decals10, +/obj/effect/floor_decal/steeldecal/steel_decals10{ + dir = 4 + }, +/obj/structure/table/standard, +/obj/item/device/multitool/tether_buffered, +/obj/structure/cable/green{ + d2 = 8; + icon_state = "0-8" + }, /obj/machinery/power/apc{ dir = 4; name = "east bump"; pixel_x = 28 }, -/obj/structure/cable/green{ - d2 = 8; - icon_state = "0-8" - }, /turf/simulated/floor/tiled, /area/tether/station/explorer_prep) "ake" = ( @@ -3696,10 +3702,10 @@ /area/engineering/hallway) "akX" = ( /obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 10 + dir = 9 }, /obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 + dir = 10 }, /obj/machinery/door/firedoor/glass, /obj/structure/cable{ @@ -4953,6 +4959,9 @@ /turf/simulated/wall/r_wall, /area/engineering/hallway) "aoB" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -4970,9 +4979,6 @@ /obj/effect/floor_decal/corner/yellow/bordercorner2{ dir = 6 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -5513,6 +5519,9 @@ /turf/simulated/floor/tiled, /area/engineering/hallway) "apL" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -5524,9 +5533,6 @@ /obj/effect/floor_decal/corner/yellow/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -5606,13 +5612,13 @@ /turf/simulated/floor/tiled, /area/engineering/atmos/backup) "aqd" = ( -/obj/machinery/atmospherics/pipe/simple/hidden/supply, /obj/structure/cable/green{ d1 = 1; d2 = 2; icon_state = "1-2" }, -/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{ +/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, +/obj/machinery/atmospherics/pipe/manifold/hidden/supply{ dir = 8 }, /turf/simulated/floor/tiled/monotile, @@ -6059,6 +6065,9 @@ /turf/simulated/floor/tiled, /area/engineering/hallway) "aqR" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -6076,9 +6085,6 @@ /obj/effect/floor_decal/corner/yellow/bordercorner2{ dir = 5 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -6132,15 +6138,15 @@ /turf/simulated/floor/tiled, /area/hallway/station/atrium) "arf" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/effect/floor_decal/borderfloor{ dir = 4 }, /obj/effect/floor_decal/corner/lightgrey/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -6945,6 +6951,9 @@ /turf/simulated/floor/tiled/monotile, /area/engineering/workshop) "atF" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -6962,9 +6971,6 @@ /obj/effect/floor_decal/corner/yellow/bordercorner2{ dir = 6 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -7329,12 +7335,6 @@ }, /turf/simulated/floor/tiled/monotile, /area/tether/station/excursion_dock) -"auR" = ( -/obj/machinery/atmospherics/unary/vent_pump/on{ - dir = 8 - }, -/turf/simulated/floor/tiled, -/area/tether/station/excursion_dock) "auS" = ( /obj/machinery/atmospherics/pipe/simple/hidden/supply, /obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{ @@ -7347,20 +7347,21 @@ /turf/simulated/shuttle/floor/black, /area/shuttle/excursion/tether) "auU" = ( -/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ - dir = 9 - }, /obj/machinery/light, /obj/structure/cable/green{ d1 = 1; d2 = 8; icon_state = "1-8" }, -/obj/machinery/atmospherics/pipe/manifold/hidden/supply, /obj/structure/disposalpipe/segment{ dir = 8; icon_state = "pipe-c" }, +/obj/machinery/atmospherics/pipe/simple/hidden/supply{ + dir = 9; + pixel_y = 0 + }, +/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers, /turf/simulated/floor/tiled/monotile, /area/tether/station/excursion_dock) "auV" = ( @@ -7853,6 +7854,9 @@ }, /area/engineering/hallway) "awO" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -7870,9 +7874,6 @@ /obj/effect/floor_decal/corner/yellow/bordercorner2{ dir = 6 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -7919,15 +7920,15 @@ /turf/simulated/floor/tiled, /area/storage/tools) "awZ" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/effect/floor_decal/borderfloor{ dir = 4 }, /obj/effect/floor_decal/corner/lightgrey/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -7973,6 +7974,9 @@ /turf/simulated/floor/tiled/monotile, /area/bridge_hallway) "axg" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/effect/floor_decal/borderfloor{ dir = 4 }, @@ -7985,9 +7989,6 @@ /obj/effect/floor_decal/corner/blue/bordercorner2{ dir = 6 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -8259,6 +8260,9 @@ /turf/simulated/floor, /area/hallway/station/docks) "ayb" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -8270,9 +8274,6 @@ /obj/effect/floor_decal/corner/yellow/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -8429,6 +8430,9 @@ /turf/simulated/floor/tiled, /area/hallway/station/docks) "ayF" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/machinery/atmospherics/pipe/simple/hidden{ dir = 4 }, @@ -8441,9 +8445,6 @@ /obj/effect/floor_decal/corner/lightgrey/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -8496,15 +8497,15 @@ /turf/simulated/floor/tiled/monotile, /area/bridge_hallway) "ayU" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/effect/floor_decal/borderfloor{ dir = 4 }, /obj/effect/floor_decal/corner/blue/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -8551,6 +8552,9 @@ /turf/simulated/floor/tiled/monotile, /area/engineering/workshop) "azf" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -8565,9 +8569,6 @@ /obj/effect/floor_decal/corner/yellow/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -8683,15 +8684,15 @@ /turf/simulated/floor/tiled/dark, /area/bridge) "azv" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/effect/floor_decal/borderfloor{ dir = 4 }, /obj/effect/floor_decal/corner/blue/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -8829,15 +8830,15 @@ /turf/simulated/floor/tiled, /area/hallway/station/docks) "azR" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/effect/floor_decal/borderfloor{ dir = 4 }, /obj/effect/floor_decal/corner/lightgrey/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /turf/simulated/floor/tiled, /area/hallway/station/docks) "azU" = ( @@ -8898,6 +8899,9 @@ /turf/simulated/floor/tiled, /area/bridge_hallway) "azZ" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/effect/floor_decal/borderfloor{ dir = 4 }, @@ -8910,9 +8914,6 @@ /obj/effect/floor_decal/corner/blue/bordercorner2{ dir = 5 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -9154,6 +9155,9 @@ /turf/simulated/floor/tiled, /area/hallway/station/atrium) "aAo" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/effect/floor_decal/borderfloor{ dir = 4 }, @@ -9163,9 +9167,6 @@ /obj/machinery/door/firedoor/glass/hidden/steel{ dir = 8 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -9815,6 +9816,9 @@ /turf/simulated/floor/tiled/steel_grid, /area/engineering/workshop) "aBA" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/machinery/power/apc{ dir = 4; name = "east bump"; @@ -9826,9 +9830,6 @@ /obj/effect/floor_decal/corner/yellow/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -10118,6 +10119,9 @@ /turf/simulated/floor/tiled, /area/bridge_hallway) "aCw" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -10134,9 +10138,6 @@ /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /turf/simulated/floor/tiled, /area/hallway/station/atrium) "aCx" = ( @@ -10355,6 +10356,9 @@ /turf/simulated/floor/tiled, /area/bridge_hallway) "aCV" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -10366,9 +10370,6 @@ /obj/effect/floor_decal/corner/yellow/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -10667,6 +10668,9 @@ /turf/simulated/floor/tiled, /area/hallway/station/atrium) "aDZ" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -10685,9 +10689,6 @@ /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /turf/simulated/floor/tiled, /area/hallway/station/atrium) "aEa" = ( @@ -10837,6 +10838,9 @@ }, /area/engineering/hallway) "aEA" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -10848,9 +10852,6 @@ /obj/effect/floor_decal/corner/yellow/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -11199,6 +11200,9 @@ /turf/simulated/floor/wood, /area/crew_quarters/captain) "aFz" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -11218,9 +11222,6 @@ /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /turf/simulated/floor/tiled, /area/hallway/station/atrium) "aFB" = ( @@ -11495,6 +11496,9 @@ /turf/simulated/floor/carpet, /area/library) "aGs" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -11506,9 +11510,6 @@ /obj/effect/floor_decal/corner/yellow/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -11758,6 +11759,9 @@ /turf/simulated/floor/tiled, /area/tether/station/dock_two) "aHz" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -11780,9 +11784,6 @@ /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/machinery/light{ icon_state = "tube1"; dir = 4 @@ -11954,6 +11955,9 @@ /turf/simulated/floor/tiled/dark, /area/teleporter) "aIl" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -11965,9 +11969,6 @@ /obj/effect/floor_decal/corner/yellow/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -12367,6 +12368,9 @@ /turf/simulated/floor/plating, /area/engineering/storage) "aKb" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -12378,9 +12382,6 @@ /obj/effect/floor_decal/corner/yellow/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -13200,6 +13201,9 @@ /turf/simulated/floor/tiled/monotile, /area/engineering/workshop) "aML" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -13219,9 +13223,6 @@ /obj/effect/floor_decal/corner/lightgrey/bordercorner2{ dir = 6 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -13375,31 +13376,6 @@ }, /turf/simulated/floor, /area/maintenance/station/eng_lower) -"aOu" = ( -/obj/structure/cable/green{ - d1 = 1; - d2 = 2; - icon_state = "1-2" - }, -/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, -/obj/machinery/atmospherics/pipe/simple/hidden/supply, -/obj/machinery/camera/network/northern_star{ - dir = 9 - }, -/obj/effect/floor_decal/borderfloor{ - dir = 4 - }, -/obj/effect/floor_decal/corner/lightgrey/border{ - dir = 4 - }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 10 - }, -/turf/simulated/floor/tiled, -/area/hallway/station/atrium) "aOL" = ( /obj/machinery/atmospherics/pipe/simple/hidden/supply, /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ @@ -13541,28 +13517,6 @@ }, /turf/simulated/floor, /area/maintenance/station/eng_lower) -"aPR" = ( -/obj/structure/cable/green{ - d1 = 1; - d2 = 2; - icon_state = "1-2" - }, -/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, -/obj/machinery/atmospherics/pipe/simple/hidden/supply, -/obj/effect/floor_decal/borderfloor{ - dir = 4 - }, -/obj/effect/floor_decal/corner/lightgrey/border{ - dir = 4 - }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 10 - }, -/turf/simulated/floor/tiled, -/area/hallway/station/atrium) "aQa" = ( /obj/structure/table/rack{ dir = 8; @@ -13698,6 +13652,9 @@ /turf/simulated/floor/tiled, /area/engineering/foyer) "aQQ" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/machinery/atmospherics/unary/vent_pump/on{ dir = 8 }, @@ -13712,9 +13669,6 @@ /obj/effect/floor_decal/corner/yellow/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -13989,6 +13943,9 @@ /turf/simulated/floor/carpet/oracarpet, /area/crew_quarters/heads/chief) "aTA" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -14006,9 +13963,6 @@ /obj/effect/floor_decal/corner/lightgrey/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -14433,6 +14387,9 @@ /turf/simulated/floor/tiled, /area/hallway/station/atrium) "aWJ" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -14451,9 +14408,6 @@ /obj/effect/floor_decal/corner/lightgrey/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -14814,6 +14768,9 @@ /turf/simulated/floor/carpet/oracarpet, /area/crew_quarters/heads/chief) "baI" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -14835,9 +14792,6 @@ /obj/effect/floor_decal/corner/lightgrey/bordercorner2{ dir = 5 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -15448,6 +15402,9 @@ /turf/simulated/floor/tiled, /area/hallway/station/atrium) "bdW" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable{ d1 = 4; d2 = 8; @@ -15464,9 +15421,6 @@ /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 8 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /turf/simulated/floor/tiled, /area/hallway/station/atrium) "bdZ" = ( @@ -15909,15 +15863,15 @@ /turf/simulated/floor/tiled, /area/engineering/foyer) "beM" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/effect/floor_decal/borderfloor{ dir = 4 }, /obj/effect/floor_decal/corner/yellow/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -16088,6 +16042,9 @@ /turf/simulated/floor/tiled/steel_grid, /area/bridge_hallway) "bgf" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -16113,9 +16070,6 @@ /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /turf/simulated/floor/tiled, /area/hallway/station/atrium) "bgr" = ( @@ -16141,6 +16095,9 @@ /turf/simulated/floor/tiled, /area/engineering/foyer) "bgD" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/machinery/atmospherics/unary/vent_scrubber/on{ dir = 8 }, @@ -16150,9 +16107,6 @@ /obj/effect/floor_decal/corner/yellow/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -16355,6 +16309,9 @@ /turf/simulated/floor/tiled, /area/crew_quarters/heads/hop) "bhH" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 4; @@ -16380,9 +16337,6 @@ /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /turf/simulated/floor/tiled, /area/hallway/station/atrium) "bhJ" = ( @@ -16503,15 +16457,15 @@ /turf/simulated/floor/tiled, /area/storage/tools) "bjo" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/effect/floor_decal/borderfloor{ dir = 4 }, /obj/effect/floor_decal/corner/blue/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -16651,6 +16605,9 @@ /turf/simulated/floor/tiled, /area/hallway/station/atrium) "bjX" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/structure/cable/green{ d1 = 1; d2 = 2; @@ -16667,9 +16624,6 @@ /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/structure/disposalpipe/segment{ dir = 2; icon_state = "pipe-c" @@ -16764,6 +16718,9 @@ /turf/simulated/floor/tiled, /area/hallway/station/docks) "bkA" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/machinery/status_display{ layer = 4; pixel_x = 32; @@ -16775,9 +16732,6 @@ /obj/effect/floor_decal/corner/lightgrey/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -16872,15 +16826,15 @@ /turf/simulated/floor/plating, /area/bridge) "bll" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/effect/floor_decal/borderfloor{ dir = 4 }, /obj/effect/floor_decal/corner/blue/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -17243,6 +17197,9 @@ /turf/simulated/floor/tiled, /area/hallway/station/atrium) "boq" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/machinery/light{ dir = 4; icon_state = "tube1" @@ -17253,9 +17210,6 @@ /obj/effect/floor_decal/corner/lightgrey/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -18044,6 +17998,9 @@ /turf/simulated/floor/tiled/dark, /area/bridge) "bsM" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/effect/floor_decal/borderfloor{ dir = 4 }, @@ -18056,9 +18013,6 @@ /obj/effect/floor_decal/corner/blue/bordercorner2{ dir = 6 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -18285,6 +18239,9 @@ /turf/simulated/floor/tiled/steel_grid, /area/bridge) "bvd" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/effect/floor_decal/borderfloor{ dir = 4 }, @@ -18297,9 +18254,6 @@ /obj/effect/floor_decal/corner/blue/bordercorner2{ dir = 5 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -18973,15 +18927,15 @@ /turf/simulated/floor/plating, /area/crew_quarters/captain) "bAr" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/effect/floor_decal/borderfloor{ dir = 4 }, /obj/effect/floor_decal/corner/blue/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -19210,15 +19164,15 @@ /turf/simulated/floor/tiled/steel_grid, /area/crew_quarters/captain) "bBJ" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/effect/floor_decal/borderfloor{ dir = 4 }, /obj/effect/floor_decal/corner/blue/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -19422,15 +19376,15 @@ /turf/simulated/floor/wood, /area/crew_quarters/captain) "bEG" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/effect/floor_decal/borderfloor{ dir = 4 }, /obj/effect/floor_decal/corner/blue/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -19689,15 +19643,15 @@ /turf/simulated/floor/wood, /area/crew_quarters/captain) "bFW" = ( +/obj/effect/floor_decal/steeldecal/steel_decals7{ + dir = 9 + }, /obj/effect/floor_decal/borderfloor{ dir = 4 }, /obj/effect/floor_decal/corner/blue/border{ dir = 4 }, -/obj/effect/floor_decal/steeldecal/steel_decals7{ - dir = 9 - }, /obj/effect/floor_decal/steeldecal/steel_decals7{ dir = 10 }, @@ -21086,20 +21040,6 @@ }, /turf/simulated/floor/tiled, /area/tether/station/dock_two) -"bQH" = ( -/obj/machinery/firealarm{ - dir = 4; - layer = 3.3; - pixel_x = 26 - }, -/obj/effect/floor_decal/steeldecal/steel_decals10, -/obj/effect/floor_decal/steeldecal/steel_decals10{ - dir = 4 - }, -/obj/structure/table/standard, -/obj/item/device/multitool/tether_buffered, -/turf/simulated/floor/tiled, -/area/tether/station/explorer_prep) "bQJ" = ( /obj/structure/window/reinforced{ dir = 8; @@ -21701,12 +21641,6 @@ }, /turf/simulated/floor/tiled, /area/tether/station/explorer_meeting) -"gsV" = ( -/obj/machinery/atmospherics/unary/vent_pump/on{ - dir = 4 - }, -/turf/simulated/floor/tiled, -/area/tether/station/excursion_dock) "hJg" = ( /obj/structure/table/woodentable, /obj/item/weapon/paper_bin{ @@ -21762,7 +21696,7 @@ icon_state = "bordercolor"; dir = 4 }, -/obj/machinery/vending/snack, +/obj/machinery/vending/cola, /turf/simulated/floor/tiled, /area/tether/station/explorer_meeting) "mtd" = ( @@ -21820,8 +21754,10 @@ /turf/simulated/shuttle/wall/voidcraft, /area/shuttle/excursion/tether) "poz" = ( -/obj/machinery/camera/network/northern_star{ - dir = 8 +/obj/machinery/firealarm{ + dir = 4; + layer = 3.3; + pixel_x = 26 }, /turf/simulated/floor/tiled, /area/tether/station/explorer_prep) @@ -21852,10 +21788,10 @@ /turf/simulated/floor/tiled, /area/tether/station/explorer_meeting) "soc" = ( -/obj/machinery/atmospherics/unary/vent_scrubber/on{ +/obj/machinery/camera/network/northern_star, +/obj/machinery/atmospherics/unary/vent_pump/on{ dir = 8 }, -/obj/machinery/camera/network/northern_star, /turf/simulated/floor/tiled/monotile, /area/tether/station/excursion_dock) "sSn" = ( @@ -22024,6 +21960,20 @@ /obj/effect/floor_decal/steeldecal/steel_decals9, /turf/simulated/floor/tiled/monotile, /area/tether/station/excursion_dock) +"DfE" = ( +/obj/effect/floor_decal/steeldecal/steel_decals9{ + dir = 1 + }, +/obj/effect/floor_decal/steeldecal/steel_decals9{ + dir = 4 + }, +/obj/effect/floor_decal/steeldecal/steel_decals9{ + dir = 8 + }, +/obj/effect/floor_decal/steeldecal/steel_decals9, +/obj/structure/closet/secure_closet/guncabinet/excursion, +/turf/simulated/floor/tiled, +/area/tether/station/explorer_prep) "Dne" = ( /obj/structure/table/woodentable, /obj/item/device/taperecorder, @@ -22106,6 +22056,7 @@ icon_state = "bordercolor"; dir = 4 }, +/obj/machinery/vending/snack, /turf/simulated/floor/tiled, /area/tether/station/explorer_meeting) "KNg" = ( @@ -22139,7 +22090,7 @@ icon_state = "bordercolor"; dir = 4 }, -/obj/machinery/vending/cola, +/obj/machinery/photocopier, /turf/simulated/floor/tiled, /area/tether/station/explorer_meeting) "Nyt" = ( @@ -22256,6 +22207,7 @@ dir = 4 }, /obj/effect/floor_decal/steeldecal/steel_decals_central1, +/obj/machinery/door/firedoor/glass, /turf/simulated/floor/tiled, /area/tether/station/explorer_meeting) "RGf" = ( @@ -22340,7 +22292,10 @@ /area/shuttle/excursion/tether) "Vrx" = ( /obj/machinery/camera/network/northern_star, -/turf/simulated/floor/tiled, +/obj/machinery/atmospherics/unary/vent_pump/on{ + dir = 4 + }, +/turf/simulated/floor/tiled/monotile, /area/tether/station/excursion_dock) "VZf" = ( /obj/structure/bed/chair/office/dark{ @@ -22433,12 +22388,6 @@ }, /turf/simulated/floor/tiled, /area/tether/station/explorer_meeting) -"Zwu" = ( -/obj/machinery/atmospherics/unary/vent_scrubber/on{ - dir = 4 - }, -/turf/simulated/floor/tiled, -/area/tether/station/excursion_dock) (1,1,1) = {" aaa @@ -30285,8 +30234,8 @@ Vrx aah akC aah -gsV -Zwu +aah +aaP aad CaJ sSn @@ -30403,11 +30352,11 @@ aaI aaI aaW ail -abd +cDQ abd abm abJ -cDQ +arp auS ail abd @@ -32243,7 +32192,7 @@ aad soc nxL PeQ -auR +abc aad aac aaT @@ -32255,13 +32204,13 @@ aHz aIT aKQ aML -aOu -aPR -aPR +aFz +aCw +aCw aTA -aPR +aCw aWJ -aOu +aFz baI bch beS @@ -32369,7 +32318,7 @@ nYM nYM nYM nYM -alA +ash aCy amM amM @@ -32491,7 +32440,7 @@ YUm NEQ mCP epz -alA +ash amg amg amg @@ -32613,7 +32562,7 @@ VZf edg Nyt lHz -alA +ash amg amg amg @@ -32735,7 +32684,7 @@ uzS MaY tEu wmC -alA +ash amg amg amg @@ -32857,7 +32806,7 @@ MaY flX rRn jop -alA +ash amg amg amg @@ -32979,7 +32928,7 @@ mtd irt EKk jop -alA +ash amg amg amg @@ -33089,10 +33038,10 @@ aiv ajo poz aka -bQH akL akL -alu +akL +akL amW aiv SzY @@ -33101,7 +33050,7 @@ hJg mtd tEu wmC -alA +ash amg amg amg @@ -33211,10 +33160,10 @@ aiv aiv aiv aiv -aiv bQJ bQT bQJ +bQJ aiv aiv IjZ @@ -33223,7 +33172,7 @@ cNq PqO eUx QQi -alA +ash amg amg amg @@ -33332,11 +33281,11 @@ aaa aac aac aac -aac -aiv +aei bQK bQK bQK +DfE aiv BZA uDP @@ -33345,7 +33294,7 @@ AmC AmC AmC Dne -alA +ash amg amg amg @@ -33467,7 +33416,7 @@ mcn NuW jKX Tlr -alA +ash amg amg amg @@ -33589,7 +33538,7 @@ ggi ggi ggi wSk -alA +ash amg amg amg @@ -33711,7 +33660,7 @@ aat aat aat aat -alA +ash alA amN aFI diff --git a/maps/tether/tether-10-colony.dmm b/maps/tether/tether-10-colony.dmm index 19c2b2a089..1764cceff1 100644 --- a/maps/tether/tether-10-colony.dmm +++ b/maps/tether/tether-10-colony.dmm @@ -11467,11 +11467,11 @@ dir = 2; icon = 'icons/obj/doors/Door2x1glass.dmi'; icon_state = "door_closed"; - name = "Elevator"; - on_enter_occupant_message = "The elevator door closes slowly, You can now head for residential, comercial and several other floors."; + name = "elevator"; + on_enter_occupant_message = "The elevator doors close slowly. You can now head off for the residential, commercial, and other floors."; on_store_message = "has departed for one of the various colony floors"; - on_store_name = "Colonial Oversight"; - on_store_visible_message_2 = "to the colonial districts."; + on_store_name = "Colony Oversight"; + on_store_visible_message_2 = "to the colony districts."; time_till_despawn = 5 }, /turf/unsimulated/floor/steel, diff --git a/vorestation.dme b/vorestation.dme index b472123c80..c32ae09a80 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -833,6 +833,7 @@ #include "code\game\machinery\kitchen\cooking_machines\oven.dm" #include "code\game\machinery\pipe\construction.dm" #include "code\game\machinery\pipe\pipe_dispenser.dm" +#include "code\game\machinery\pipe\pipe_recipes.dm" #include "code\game\machinery\pipe\pipelayer.dm" #include "code\game\machinery\telecomms\broadcaster.dm" #include "code\game\machinery\telecomms\logbrowser.dm" @@ -2691,6 +2692,7 @@ #include "code\modules\telesci\telepad.dm" #include "code\modules\telesci\telesci_computer.dm" #include "code\modules\tension\tension.dm" +#include "code\modules\tooltip\tooltip.dm" #include "code\modules\turbolift\_turbolift.dm" #include "code\modules\turbolift\turbolift.dm" #include "code\modules\turbolift\turbolift_areas.dm"