Offship RND Servers (#18860)

RND servers and consoles will now only sync with each other if they are
on connected Z-levels. This allows for offship servers and RND equipment
to be mapped in without syncing with or erasing the Horizon's tech
levels.
This commit is contained in:
RustingWithYou
2024-04-08 04:21:32 +12:00
committed by GitHub
parent 45a5e16ff5
commit d2eec222a2
3 changed files with 57 additions and 3 deletions
+12 -3
View File
@@ -230,13 +230,20 @@
temp_server = null
consoles = list()
servers = list()
var/turf/T = get_turf(src)
for(var/obj/machinery/r_n_d/server/S in SSmachinery.machinery)
var/turf/ST = get_turf(S)
if(ST && !AreConnectedZLevels(ST.z, T.z))
continue
if(S.server_id == text2num(href_list["access"]) || S.server_id == text2num(href_list["data"]) || S.server_id == text2num(href_list[TRANSFER_CREW]))
temp_server = S
break
if(href_list["access"])
screen = 1
for(var/obj/machinery/computer/rdconsole/C in SSmachinery.machinery)
var/turf/CT = get_turf(C)
if(CT && !AreConnectedZLevels(CT.z, T.z))
continue
if(C.sync)
consoles += C
else if(href_list["data"])
@@ -244,7 +251,8 @@
else if(href_list[TRANSFER_CREW])
screen = 3
for(var/obj/machinery/r_n_d/server/S in SSmachinery.machinery)
if(S == src)
var/turf/ST = get_turf(S)
if(S == src || (ST && !AreConnectedZLevels(ST.z, T.z)))
continue
servers += S
@@ -289,9 +297,10 @@
switch(screen)
if(0) //Main Menu
dat += "Connected Servers:<BR><BR>"
var/turf/T = get_turf(src)
for(var/obj/machinery/r_n_d/server/S in SSmachinery.machinery)
if(istype(S, /obj/machinery/r_n_d/server/centcom) && !badmin)
var/turf/ST = get_turf(S)
if((istype(S, /obj/machinery/r_n_d/server/centcom) && !badmin) || (ST && !AreConnectedZLevels(ST.z, T.z)))
continue
dat += "[S.name] || "
dat += "<A href='?src=\ref[src];access=[S.server_id]'> Access Rights</A> | "