fixes ventcrawling; minor cleanup of a couple other things

This commit is contained in:
duncathan
2015-07-19 13:13:51 -06:00
parent b194b1e4af
commit 7be382cd7f
4 changed files with 11 additions and 15 deletions
@@ -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)
+1 -5
View File
@@ -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()
@@ -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
+7 -7
View File
@@ -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("<span class='notice'>[src] begins climbing into the ventilation system...</span>" ,"<span class='notice'>You begin climbing into the ventilation system...</span>")
@@ -63,21 +63,21 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/components/unary
src << "<span class='warning'>This ventilation duct is not connected to anything!</span>"
/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()