[MIRROR] Removes more sleeps in the code (#10722)

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-04-22 10:26:08 -07:00
committed by GitHub
parent ee2031a364
commit 3c98280038
6 changed files with 10 additions and 13 deletions

View File

@@ -2,7 +2,7 @@
//
// Allows ghosts to roleplay with crewmembers without having to commit to joining the round, and also allows communications between two communicators.
GLOBAL_LIST_EMPTY_TYPED(all_communicators, /obj/item/communicator)
var/global/list/obj/item/communicator/all_communicators = list() //Don't change this to GLOBAL_LIST_EMPTY_TYPED(all_communicators, /obj/item/communicator) for now. Sortatoms goes berserk.
// List of core tabs the communicator can switch to
#define HOMETAB 1
@@ -99,8 +99,8 @@ GLOBAL_LIST_EMPTY_TYPED(all_communicators, /obj/item/communicator)
// assign the device to the holder's name automatically in a spectacularly shitty way.
/obj/item/communicator/Initialize(mapload)
. = ..()
GLOB.all_communicators += src
GLOB.all_communicators = sortAtom(GLOB.all_communicators)
all_communicators += src
all_communicators = sortAtom(all_communicators)
node = get_exonet_node()
START_PROCESSING(SSobj, src)
camera = new(src)
@@ -272,7 +272,7 @@ GLOBAL_LIST_EMPTY_TYPED(all_communicators, /obj/item/communicator)
src.known_devices.Cut()
if(!get_connection_to_tcomms()) //If the network's down, we can't see anything.
return
for(var/obj/item/communicator/comm in GLOB.all_communicators)
for(var/obj/item/communicator/comm in all_communicators)
if(!comm || !comm.exonet || !comm.exonet.address || comm.exonet.address == src.exonet.address) //Don't add addressless devices, and don't add ourselves.
continue
src.known_devices |= comm
@@ -414,7 +414,7 @@ GLOBAL_LIST_EMPTY_TYPED(all_communicators, /obj/item/communicator)
node = null
//Clean up references that might point at us
GLOB.all_communicators -= src
all_communicators -= src
STOP_PROCESSING(SSobj, src)
listening_objects.Remove(src)
QDEL_NULL(camera)

View File

@@ -140,7 +140,7 @@
return
var/list/choices = list()
for(var/obj/item/communicator/comm in GLOB.all_communicators)
for(var/obj/item/communicator/comm in all_communicators)
if(!comm.network_visibility || !comm.exonet || !comm.exonet.address)
continue
choices.Add(comm)

View File

@@ -306,7 +306,7 @@
return
var/list/choices = list()
for(var/obj/item/communicator/comm in GLOB.all_communicators)
for(var/obj/item/communicator/comm in all_communicators)
if(!comm.network_visibility || !comm.exonet || !comm.exonet.address)
continue
choices.Add(comm)