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
+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()