get_cable_node twix

get_cable_node can take custom layer to check.
This commit is contained in:
Dennok
2020-03-05 16:44:52 +02:00
committed by GitHub
parent 0f8c6ab503
commit 5d1ef5c7f5
+2 -2
View File
@@ -354,12 +354,12 @@
///////////////////////////////////////////////
// return a cable if there's one on the turf, null if there isn't one
/turf/proc/get_cable_node()
/turf/proc/get_cable_node(check_layer = CABLE_LAYER_2)
if(!can_have_cabling())
return null
var/obj/structure/cable_bridge/B = locate() in src
for(var/obj/structure/cable/C in src)
if(C.cable_layer == CABLE_LAYER_2 || B)
if(B || C.cable_layer & check_layer)
C.update_icon()
return C
return null