From 7c56b53aab37ad0208d7ae6ed7299a72473c34df Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Mon, 5 Feb 2018 00:57:04 -0600 Subject: [PATCH] [MIRROR] Ports telecoms to Initialize (#5249) * Ports telecoms to Initialize * Update telecomunications.dm --- .../machinery/telecomms/telecomunications.dm | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index a9eb5e3d46..79c737fc58 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -80,21 +80,16 @@ GLOBAL_LIST_EMPTY(telecomms_list) // return TRUE if found, FALSE if not found return signal && (!freq_listening.len || (signal.frequency in freq_listening)) -/obj/machinery/telecomms/New() - GLOB.telecomms_list += src - ..() - /obj/machinery/telecomms/Initialize(mapload) . = ..() + GLOB.telecomms_list += src if(mapload && autolinkers.len) - // Links nearby machines - if(!long_range_link) - for(var/obj/machinery/telecomms/T in urange(20, src, 1)) - add_link(T) - else - for(var/obj/machinery/telecomms/T in GLOB.telecomms_list) - add_link(T) + return INITIALIZE_HINT_LATELOAD +/obj/machinery/telecomms/LateInitialize() + ..() + for(var/obj/machinery/telecomms/T in (long_range_link ? GLOB.telecomms_list : urange(20, src, 1))) + add_link(T) /obj/machinery/telecomms/Destroy() GLOB.telecomms_list -= src