mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 08:03:43 +01:00
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:
@@ -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))
|
||||
|
||||
@@ -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]"
|
||||
|
||||
Reference in New Issue
Block a user