[MIRROR] Fix telecomms to work with multi-z [MDB IGNORE] (#9797)

* Fix telecomms to work with multi-z (#63146)

* Fix telecomms to work with multi-z

Co-authored-by: Tim <timothymtorres@gmail.com>
This commit is contained in:
SkyratBot
2021-12-01 00:24:57 -05:00
committed by GitHub
co-authored by Tim
parent b8560189a0
commit 465f734a2d
@@ -21,9 +21,14 @@
/obj/machinery/telecomms/relay/receive_information(datum/signal/subspace/signal, obj/machinery/telecomms/machine_from)
// Add our level and send it back
var/turf/T = get_turf(src)
if(can_send(signal) && T)
signal.levels |= T.z
var/turf/relay_turf = get_turf(src)
if(can_send(signal) && relay_turf)
// Relays send signals to all ZTRAIT_STATION z-levels
if(SSmapping.level_trait(relay_turf.z, ZTRAIT_STATION))
for(var/z in SSmapping.levels_by_trait(ZTRAIT_STATION))
signal.levels |= z
else
signal.levels |= relay_turf.z
// Checks to see if it can send/receive.