mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
get_cable_node twix
get_cable_node can take custom layer to check.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user