Ventcrawling fixes

d3athrow/vgstation13#4251
tgstation/-tg-station#9296

 - Fixes moving between pipeline datums not updating pipe vision
 - Fixes login() not updating pipe vision
 - Removes hardcoded limit of entering through unary machinery-- does
   nothing *now*
 - Can see pipes in darkness as fullbright
 - More sanity checks
This commit is contained in:
Tigercat2000
2015-05-03 09:19:27 -07:00
parent f42f8e9b39
commit b14f7a429f
5 changed files with 32 additions and 18 deletions
+14 -11
View File
@@ -334,22 +334,25 @@ mob/living
src << "You must be conscious to do this!"
return
/mob/living/proc/add_ventcrawl(obj/machinery/atmospherics/unary/starting_machine)
for(var/datum/pipeline/pipeline in starting_machine.network.line_members)
for(var/atom/A in (pipeline.members || pipeline.edges))
var/image/new_image = image(A, A.loc, dir = A.dir)
pipes_shown += new_image
client.images += new_image
/mob/living/proc/add_ventcrawl(obj/machinery/atmospherics/starting_machine)
var/datum/pipe_network/network = starting_machine.return_network(starting_machine)
if(!network)
return
for(var/datum/pipeline/pipeline in network.line_members)
for(var/obj/machinery/atmospherics/A in (pipeline.members || pipeline.edges))
if(!A.pipe_image)
A.pipe_image = image(A, A.loc, layer = 20, dir = A.dir) //the 20 puts it above Byond's darkness (not its opacity view)
pipes_shown += A.pipe_image
client.images += A.pipe_image
/mob/living/proc/remove_ventcrawl()
for(var/image/current_image in pipes_shown)
client.images -= current_image
if(client)
for(var/image/current_image in pipes_shown)
client.images -= current_image
client.eye = src
pipes_shown.len = 0
if(client)
client.eye = src
/mob/living/carbon/clean_blood()
. = ..()
if(ishuman(src))
+5
View File
@@ -7,6 +7,11 @@
//If they're SSD, remove it so they can wake back up.
player_logged = 0
//login during ventcrawl
if(istype(loc, /obj/machinery/atmospherics)) //attach us back into the pipes
remove_ventcrawl()
add_ventcrawl(loc)
//Round specific stuff like hud updates
if(ticker && ticker.mode)
var/ref = "\ref[mind]"