Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes invisible pipes while pipecrawling #18163

Merged
merged 6 commits into from
Jul 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/modules/atmospherics/machinery/atmospherics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ Pipelines + Other Objects -> Pipe network
user.forceMove(target_move.loc) //handles entering and so on
user.visible_message("You hear something squeezing through the ducts.", "You climb out of the ventilation system.")
else if(target_move.can_crawl_through())
if(returnPipenet() != target_move.returnPipenet())
if(returnPipenet(target_move) != target_move.returnPipenet())
kugamo marked this conversation as resolved.
Show resolved Hide resolved
user.update_pipe_vision(target_move)
kugamo marked this conversation as resolved.
Show resolved Hide resolved
user.forceMove(target_move)
if(world.time - user.last_played_vent > VENT_SOUND_DELAY)
Expand Down
14 changes: 8 additions & 6 deletions code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -517,10 +517,10 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
to_chat(src, "<span class='warning'>This ventilation duct is not connected to anything!</span>")


/mob/living/proc/add_ventcrawl(obj/machinery/atmospherics/starting_machine)
if(!istype(starting_machine) || !starting_machine.returnPipenet() || !starting_machine.can_see_pipes())
/mob/living/proc/add_ventcrawl(obj/machinery/atmospherics/starting_machine, obj/machinery/atmospherics/target_move)
if(!istype(starting_machine) || !starting_machine.returnPipenet(target_move) || !starting_machine.can_see_pipes())
return
var/datum/pipeline/pipeline = starting_machine.returnPipenet()
var/datum/pipeline/pipeline = starting_machine.returnPipenet(target_move)
var/list/totalMembers = list()
totalMembers |= pipeline.members
totalMembers |= pipeline.other_atmosmch
Expand All @@ -542,13 +542,15 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
/atom/proc/update_pipe_vision()
return

/mob/living/update_pipe_vision()
if(pipes_shown.len)
/mob/living/update_pipe_vision(obj/machinery/atmospherics/target_move)
if(pipes_shown.len && !(target_move))
if(!is_ventcrawling(src))
remove_ventcrawl()
else
if(is_ventcrawling(src))
add_ventcrawl(loc)
if(target_move)
remove_ventcrawl()
add_ventcrawl(loc, target_move)


//Throwing stuff
Expand Down