diff --git a/code/ATMOSPHERICS/components/components_base.dm b/code/ATMOSPHERICS/components/components_base.dm index 977f102e2e6..70a46e507e8 100644 --- a/code/ATMOSPHERICS/components/components_base.dm +++ b/code/ATMOSPHERICS/components/components_base.dm @@ -148,7 +148,7 @@ Pipenet stuff; housekeeping parents["p[I]"] = reference break -/obj/machinery/atmospherics/components/returnPipenet(obj/machinery/atmospherics/A) +/obj/machinery/atmospherics/components/returnPipenet(obj/machinery/atmospherics/A = nodes[NODE1]) //returns PARENT1 if called without argument for(var/I = 1; I <= device_type; I++) if(A == nodes["n[I]"]) return parents["p[I]"] @@ -159,7 +159,7 @@ Pipenet stuff; housekeeping P = New break -/obj/machinery/atmospherics/components/unsafe_pressure_release(var/mob/user, var/pressures) //untestable; I'll fix this last +/obj/machinery/atmospherics/components/unsafe_pressure_release(var/mob/user, var/pressures) ..() var/turf/T = get_turf(src) diff --git a/code/ATMOSPHERICS/datum_pipeline.dm b/code/ATMOSPHERICS/datum_pipeline.dm index 02ad35248d5..c0fb0e53beb 100644 --- a/code/ATMOSPHERICS/datum_pipeline.dm +++ b/code/ATMOSPHERICS/datum_pipeline.dm @@ -121,11 +121,7 @@ var/pipenetwarnings = 10 /obj/machinery/atmospherics/components/addMember(obj/machinery/atmospherics/A) var/datum/pipeline/P = returnPipenet(A) - for(var/I = 1; I <= parents.len; I++) - if(parents["p[I]"] == P) - P.addMember(A, src) - break - + P.addMember(A, src) /datum/pipeline/proc/temporarily_store_air() diff --git a/code/game/machinery/atmoalter/portable_atmospherics.dm b/code/game/machinery/atmoalter/portable_atmospherics.dm index 78d87119d01..e484b42e4c3 100644 --- a/code/game/machinery/atmoalter/portable_atmospherics.dm +++ b/code/game/machinery/atmoalter/portable_atmospherics.dm @@ -47,7 +47,7 @@ //Perform the connection connected_port = new_port connected_port.connected_device = src - var/datum/pipeline/connected_port_parent = connected_port.parents["p1"] + var/datum/pipeline/connected_port_parent = connected_port.parents[PARENT1] connected_port_parent.reconcile_air() anchored = 1 //Prevent movement diff --git a/code/modules/mob/living/ventcrawling.dm b/code/modules/mob/living/ventcrawling.dm index de8db9663ea..d0b506f1a12 100644 --- a/code/modules/mob/living/ventcrawling.dm +++ b/code/modules/mob/living/ventcrawling.dm @@ -34,7 +34,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/components/unary if(vent_found) - var/datum/pipeline/vent_found_parent = vent_found.parents["p1"] + var/datum/pipeline/vent_found_parent = vent_found.parents[PARENT1] if(vent_found_parent && (vent_found_parent.members.len || vent_found_parent.other_atmosmch)) visible_message("[src] begins climbing into the ventilation system..." ,"You begin climbing into the ventilation system...") @@ -63,21 +63,21 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/components/unary src << "This ventilation duct is not connected to anything!" -/mob/living/proc/add_ventcrawl(obj/machinery/atmospherics/components/starting_machine) +/mob/living/proc/add_ventcrawl(obj/machinery/atmospherics/components/unary/starting_machine) if(!istype(starting_machine) || !starting_machine.returnPipenet()) return var/list/totalMembers = list() - var/datum/pipeline/starting_machine_parent = starting_machine.parents["p1"] - totalMembers |= starting_machine_parent.members - totalMembers |= starting_machine_parent.other_atmosmch + var/datum/pipeline/starting_machine_parent = starting_machine.parents[PARENT1] + totalMembers += starting_machine_parent.members + totalMembers += starting_machine_parent.other_atmosmch for(var/obj/machinery/atmospherics/A in totalMembers) if(!A.pipe_vision_img) A.pipe_vision_img = image(A, A.loc, layer = 20, dir = A.dir) //20 for being above darkness - pipes_shown |= A.pipe_vision_img + pipes_shown += A.pipe_vision_img if(client) - client.images |= A.pipe_vision_img + client.images += A.pipe_vision_img /mob/living/proc/remove_ventcrawl()