anchor.diff:  			if(TRANSIT_CATEGORY) //Making transit tubes
   				if(!can_make_pipe)
   					return ..()
  -				A = get_turf(A)
  -				if(isclosedturf(A))
  +				attack_target = get_turf(attack_target)
  +				if(isclosedturf(attack_target))
   					to_chat(user, "<span class='warning'>[src]'s error light flickers; there's something in the way!</span>")
   					return
   				to_chat(user, "<span class='notice'>You start building a transit tube...</span>")
   				playsound(get_turf(src), 'sound/machines/click.ogg', 50, TRUE)
  -				if(do_after(user, transit_build_speed, target = A))
  +				if(do_after(user, transit_build_speed, target = attack_target))
   					activate()
   					if(queued_p_type == /obj/structure/c_transit_tube_pod)
  -						var/obj/structure/c_transit_tube_pod/pod = new /obj/structure/c_transit_tube_pod(A)
  +						var/obj/structure/c_transit_tube_pod/pod = new /obj/structure/c_transit_tube_pod(attack_target)
   						pod.add_fingerprint(usr)
   						if(mode & WRENCH_MODE)
   							pod.wrench_act(user, src)
   
   					else
  -						var/obj/structure/c_transit_tube/tube = new queued_p_type(A)
  +						var/obj/structure/c_transit_tube/tube = new queued_p_type(attack_target)
   						tube.setDir(queued_p_dir)
   
   						if(queued_p_flipped)
  
positive.code: 						to_chat(user, "<span class='notice'>You can't build this object on the layer...</span>")
  						return ..()
  					to_chat(user, "<span class='notice'>You start building a pipe...</span>")
  					if(do_after(user, atmos_build_speed, target = A))
  						if(recipe.all_layers == FALSE && (piping_layer == 1 || piping_layer == 5))//double check to stop cheaters (and to not waste time waiting for something that can't be placed)
  							to_chat(user, "<span class='notice'>You can't build this object on the layer...</span>")
  							return ..()
  						activate()
  						var/obj/machinery/atmospherics/path = queued_p_type
  						var/pipe_item_type = initial(path.construction_type) || /obj/item/pipe
  						var/obj/item/pipe/P = new pipe_item_type(get_turf(A), queued_p_type, queued_p_dir)
  
  						if(queued_p_flipped && istype(P, /obj/item/pipe/trinary/flippable))
  							var/obj/item/pipe/trinary/flippable/F = P
  
negative.code: 	if(!user.IsAdvancedToolUser() || istype(A, /turf/open/space/transit))
  		return ..()
  
  	var/atom/attack_target = A
  
  	//So that changing the menu settings doesn't affect the pipes already being built.
  	var/queued_p_type = recipe.id
  	var/queued_p_dir = p_dir
  	var/queued_p_flipped = p_flipped
  
  	//Unwrench pipe before we build one over/paint it, but only if we're not already running a do_after on it already to prevent a potential runtime.
  	if((mode & DESTROY_MODE) && (upgrade_flags & RPD_UPGRADE_UNWRENCH) && istype(attack_target, /obj/machinery/atmospherics) && !(attack_target in user.do_afters))
  		attack_target = attack_target.wrench_act(user, src)
  		if(!isatom(attack_target))
  			CRASH("When attempting to call [A.type].wrench_act(), received the following non-atom return value: [attack_target]")
  
  	//make sure what we're clicking is valid for the current category
  	var/static/list/make_pipe_whitelist
  	if(!make_pipe_whitelist)
  		make_pipe_whitelist = typecacheof(list(/obj/structure/lattice, /obj/structure/girder, /obj/item/pipe, /obj/structure/window, /obj/structure/grille))
  	if(istype(attack_target, /obj/machinery/atmospherics) && (mode & BUILD_MODE && !(mode & PAINT_MODE))) //Reduces pixelhunt when coloring is off.
  		attack_target = get_turf(attack_target)
  	var/can_make_pipe = (isturf(attack_target) || is_type_in_typecache(attack_target, make_pipe_whitelist))
  
  	. = TRUE
  
  	if((mode & DESTROY_MODE) && istype(attack_target, /obj/item/pipe) || istype(attack_target, /obj/structure/disposalconstruct) || istype(attack_target, /obj/structure/c_transit_tube) || istype(attack_target, /obj/structure/c_transit_tube_pod) || istype(attack_target, /obj/item/pipe_meter))
  		to_chat(user, "<span class='notice'>You start destroying a pipe...</span>")
  		playsound(get_turf(src), 'sound/machines/click.ogg', 50, TRUE)
  		if(do_after(user, destroy_speed, target = attack_target))
  			activate()
  			qdel(attack_target)
  		return
  
  	if((mode & PAINT_MODE))
  		var/obj/machinery/atmospherics/M = attack_target
  		if(istype(M) && M.paintable)
  			to_chat(user, "<span class='notice'>You start painting \the [M] [paint_color]...</span>")
  			playsound(get_turf(src), 'sound/machines/click.ogg', 50, TRUE)
  