POLARIS: can_telecomm() proc

Attempts to discover if two parties can talk to each other using telecomms, and as a PoC applies it to communicators which attempt to get to their node via the can_telecomm proc.
This commit is contained in:
Arokha Sieyes
2018-02-02 16:13:31 -05:00
parent 558fe8dfcc
commit 04c8942bf7
2 changed files with 51 additions and 7 deletions
@@ -173,13 +173,8 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
// Parameters: None
// Description: Simple check to see if the exonet node is active.
/obj/item/device/communicator/proc/get_connection_to_tcomms()
if(node && node.on && node.allow_external_communicators && !is_jammed(src))
// VOREStation Edit Start - Lose connection if too far from our exonet node.
var/turf/T = get_turf(src)
if(!T || !is_on_same_plane_or_station(T.z, node.z))
return 0
// VOREStation Edit End
return 1
if(node && node.on && node.allow_external_communicators)
return can_telecomm(src,node)
return 0
// Proc: process()