From e8d8d32a3306af98be0626a95c6135fe96105e64 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Wed, 15 Jan 2020 18:34:16 -0700 Subject: [PATCH] ree --- .../network_builder/atmos_pipe.dm | 68 ------------------- .../network_builder/power_cables.dm | 10 +-- 2 files changed, 5 insertions(+), 73 deletions(-) diff --git a/code/modules/mapping/mapping_helpers/network_builder/atmos_pipe.dm b/code/modules/mapping/mapping_helpers/network_builder/atmos_pipe.dm index 1183ec0434..15097faedd 100644 --- a/code/modules/mapping/mapping_helpers/network_builder/atmos_pipe.dm +++ b/code/modules/mapping/mapping_helpers/network_builder/atmos_pipe.dm @@ -74,74 +74,6 @@ built.SetInitDirections() built.on_construction(pipe_color, piping_layer) -/obj/item/pipe/wrench_act(mob/living/user, obj/item/wrench/W) - if(!isturf(loc)) - return TRUE - - add_fingerprint(user) - - 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)) //don't continue if either pipe goes across all layers - continue - if(M.GetInitDirections() & SSair.get_init_dirs(pipe_type, fixed_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/obj/machinery/atmospherics/A = new pipe_type(loc) - build_pipe(A) - A.on_construction(color, piping_layer) - transfer_fingerprints_to(A) - - W.play_tool_sound(src) - user.visible_message( \ - "[user] fastens \the [src].", \ - "You fasten \the [src].", \ - "You hear ratcheting.") - - qdel(src) - -/obj/item/pipe/proc/build_pipe(obj/machinery/atmospherics/A) - A.setDir(fixed_dir()) - A.SetInitDirections() - - if(pipename) - A.name = pipename - if(A.on) - // Certain pre-mapped subtypes are on by default, we want to preserve - // every other aspect of these subtypes (name, pre-set filters, etc.) - // but they shouldn't turn on automatically when wrenched. - A.on = FALSE - -/obj/effect/network_builder/atmos_pipe/proc/spawn_wires(list/directions) - if(!length(directions)) - return - else if(length(directions) == 1) - var/knot = (knot == KNOT_FORCED) || ((knot == KNOT_AUTO) && should_auto_knot()) - if(knot) - var/dir = directions[1] - new /obj/structure/cable(loc, cable_color, NONE, directions[1]) - else - if(knot == KNOT_FORCED) - for(var/d in directions) - new /obj/structure/cable(loc, cable_color, NONE, d) - else - var/knot = (knot == KNOT_FORCED) || ((knot == KNOT_AUTO) && should_auto_knot()) - var/dirs = length(directions) - for(var/i in dirs) - var/li = i - 1 - if(li < 1) - li = dirs + li - new /obj/structure/cable(loc, cable_color, directions[i], directions[li]) - if(knot) - new /obj/structure/cable(loc, cable_color, NONE, directions[i]) - knot = FALSE - /obj/effect/network_builder/atmos_pipe/distro name = "distro line autobuilder" piping_layer = PIPING_LAYER_MIN diff --git a/code/modules/mapping/mapping_helpers/network_builder/power_cables.dm b/code/modules/mapping/mapping_helpers/network_builder/power_cables.dm index a01d345f05..48b458aef4 100644 --- a/code/modules/mapping/mapping_helpers/network_builder/power_cables.dm +++ b/code/modules/mapping/mapping_helpers/network_builder/power_cables.dm @@ -43,8 +43,8 @@ if(!length(directions)) return else if(length(directions) == 1) - var/knot = (knot == KNOT_FORCED) || ((knot == KNOT_AUTO) && should_auto_knot()) - if(knot) + var/do_knot = (knot == KNOT_FORCED) || ((knot == KNOT_AUTO) && should_auto_knot()) + if(do_knot) var/dir = directions[1] new /obj/structure/cable(loc, cable_color, NONE, directions[1]) else @@ -52,16 +52,16 @@ for(var/d in directions) new /obj/structure/cable(loc, cable_color, NONE, d) else - var/knot = (knot == KNOT_FORCED) || ((knot == KNOT_AUTO) && should_auto_knot()) + var/do_knot = (knot == KNOT_FORCED) || ((knot == KNOT_AUTO) && should_auto_knot()) var/dirs = length(directions) for(var/i in dirs) var/li = i - 1 if(li < 1) li = dirs + li new /obj/structure/cable(loc, cable_color, directions[i], directions[li]) - if(knot) + if(do_knot) new /obj/structure/cable(loc, cable_color, NONE, directions[i]) - knot = FALSE + do_knot = FALSE /obj/effect/network_builder/power_cable/proc/should_auto_knot() return (locate(/obj/machinery/terminal) in loc)