diff --git a/citadel.dme b/citadel.dme index e66c930ea50b..8d1196d125ee 100644 --- a/citadel.dme +++ b/citadel.dme @@ -14,6 +14,7 @@ // BEGIN_INCLUDE #include "_mapload\_basemap.dm" +#include "_mapload\rift.dm" #include "code\___compile_options.dm" #include "code\__byond_version_compat.dm" #include "code\__global_init.dm" @@ -3116,6 +3117,7 @@ #include "code\modules\mapping\map_helpers\network_builder\_network_builder.dm" #include "code\modules\mapping\map_helpers\network_builder\power_cable.dm" #include "code\modules\mapping\spawner\_spawner.dm" +#include "code\modules\mapping\spawner\tcomms_relay.dm" #include "code\modules\mapping\spawner\window.dm" #include "code\modules\mapping\templates\engine.dm" #include "code\modules\maps\_shim\away_spawner.dm" diff --git a/code/modules/mapping/spawner/tcomms_relay.dm b/code/modules/mapping/spawner/tcomms_relay.dm new file mode 100644 index 000000000000..84bae830b005 --- /dev/null +++ b/code/modules/mapping/spawner/tcomms_relay.dm @@ -0,0 +1,23 @@ + +/obj/spawner/tcomms_relay + name = "Tcomms relay spawner" + var/obj/machinery/telecomms/relay/preset/telecomms/created + +/obj/spawner/tcomms_relay/Spawn() + created = new /obj/machinery/telecomms/relay/preset/telecomms(loc) + +/obj/spawner/tcomms_relay/autoconnect + late = TRUE + +/obj/spawner/tcomms_relay/autoconnect/Spawn() + ..() + var/obj/machinery/telecomms/hub/preset/station_hub + station_hub = locate(/obj/machinery/telecomms/hub/preset/rift) in world + if(!station_hub) + station_hub = locate(/obj/machinery/telecomms/hub/preset/rift) in world + if(!station_hub) + station_hub = locate(/obj/machinery/telecomms/hub/preset/rift) in world + if(!station_hub) + log_and_message_admins("[src] failed to locate telecoms hub, no autoconnection possible.") + else + LAZYDISTINCTADD(station_hub.links, created)