Fixes external turrets being unlinked from AI

This commit is contained in:
Kyep
2018-08-22 13:52:32 -07:00
parent aad79ee59f
commit 6fe50ae629
2 changed files with 6 additions and 3 deletions
+5 -1
View File
@@ -12,8 +12,12 @@
/obj/structure/fusionreactor/Initialize()
. = ..()
depotarea = areaMaster
if(depotarea)
if(istype(depotarea))
depotarea.reactor = src
spawn(50) // Necessary since random spawners may take a second to spawn turrets in depot.
for(var/obj/machinery/porta_turret/syndicate/T in range(50, loc))
if(!istype(T.depotarea))
T.depotarea = depotarea
/obj/structure/fusionreactor/Destroy()
if(istype(depotarea))