[Ready] Shuttle dock() rewrite (#2040)
This commit is contained in:
committed by
kevinz000
parent
bbc28aa856
commit
e522f715a2
@@ -287,48 +287,4 @@ Pipelines + Other Objects -> Pipe network
|
||||
|
||||
//Used for certain children of obj/machinery/atmospherics to not show pipe vision when mob is inside it.
|
||||
/obj/machinery/atmospherics/proc/can_see_pipes()
|
||||
return 1
|
||||
|
||||
//Properly updates pipes on shuttle movement
|
||||
/obj/machinery/atmospherics/shuttleRotate(rotation)
|
||||
var/list/real_node_connect = getNodeConnects()
|
||||
for(DEVICE_TYPE_LOOP)
|
||||
real_node_connect[I] = angle2dir(rotation+dir2angle(real_node_connect[I]))
|
||||
|
||||
..()
|
||||
SetInitDirections()
|
||||
var/list/supposed_node_connect = getNodeConnects()
|
||||
var/list/nodes_copy = nodes.Copy()
|
||||
|
||||
for(DEVICE_TYPE_LOOP)
|
||||
var/new_pos = supposed_node_connect.Find(real_node_connect[I])
|
||||
nodes[new_pos] = nodes_copy[I]
|
||||
|
||||
/obj/machinery/atmospherics/afterShuttleMove()
|
||||
..()
|
||||
var/missing_nodes = FALSE
|
||||
for(DEVICE_TYPE_LOOP)
|
||||
if(src.nodes[I])
|
||||
var/obj/machinery/atmospherics/node = src.nodes[I]
|
||||
var/connected = FALSE
|
||||
for(var/D in GLOB.cardinals)
|
||||
if(node in get_step(src, D))
|
||||
connected = TRUE
|
||||
break
|
||||
|
||||
if(!connected)
|
||||
nullifyNode(I)
|
||||
|
||||
if(!src.nodes[I])
|
||||
missing_nodes = TRUE
|
||||
|
||||
if(missing_nodes)
|
||||
atmosinit()
|
||||
for(var/obj/machinery/atmospherics/A in pipeline_expansion())
|
||||
A.atmosinit()
|
||||
if(A.returnPipenet())
|
||||
A.addMember(src)
|
||||
build_network()
|
||||
else
|
||||
// atmosinit() calls update_icon(), so we don't need to call it
|
||||
update_icon()
|
||||
return 1
|
||||
Reference in New Issue
Block a user