Fixes certain atmos devices appearing wrong when unwrenched (#28757)

* Fixes certain atmos device subtypes not being handled properly when unwrenched

* review changes
This commit is contained in:
Migratingcocofruit
2025-04-03 13:39:59 +00:00
committed by GitHub
parent 6c4affecd5
commit 1194a436f5
@@ -106,7 +106,15 @@ GLOBAL_LIST_INIT(pipe_path2type, list(
if(make_from.initialize_directions in list(NORTH|WEST, NORTH|EAST, SOUTH|WEST, SOUTH|EAST))
is_bent = TRUE
pipe_type = GLOB.pipe_path2type[makes_type] + is_bent
// If our path is in the list use the list
if(makes_type in GLOB.pipe_path2type)
pipe_type = GLOB.pipe_path2type[makes_type] + is_bent
// If our path isn't exactly in the list (e.g /obj/machinery/atmospherics/binary/pump/on) try and find an ancestor there
else
for(var/type_path in GLOB.pipe_path2type)
if(ispath(makes_type, type_path))
pipe_type = GLOB.pipe_path2type[type_path] + is_bent
break
switch(pipe_type)
if(PIPE_SUPPLY_STRAIGHT, PIPE_SUPPLY_BENT, PIPE_SUPPLY_MANIFOLD, PIPE_SUPPLY_MANIFOLD4W, PIPE_SUPPLY_CAP)