[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

@@ -138,7 +138,7 @@ GLOBAL_VAR_INIT(message_delay, 0) // To make sure restarting the recentmessages
machinetype = 6
produces_heat = 0
var/intercept = 0 // if nonzero, broadcasts all messages to syndicate channel
var/overmap_range = 0 //Same turf //CHOMP Edit: Reverted range from 1 to 0 because I think this is causing double speak somehow over comms.
var/overmap_range = 0
var/list/linked_radios_weakrefs = list()
@@ -417,11 +417,9 @@ GLOBAL_VAR_INIT(message_delay, 0) // To make sure restarting the recentmessages
if(data == DATA_ANTAG && isobserver(R) && R.client?.prefs?.read_preference(/datum/preference/toggle/ghost_radio))
continue
// ChompEDIT START - Ghost blacklist for certain spammy radio channels
var/list/ghostradio_freq_blacklist = list(ENT_FREQ, BDCM_FREQ)
var/list/ghostradio_freq_blacklist = list(ENT_FREQ, BDCM_FREQ) //Kept for Downstream use //CHOMPEdit - Enable BDCM_FREQ
if(istype(R, /mob/observer/dead) && R.client?.prefs?.read_preference(/datum/preference/toggle/ghost_radio) && (connection.frequency in ghostradio_freq_blacklist))
continue
// ChompEDIT END
// --- Check for compression ---
if(compression > 0)

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)

View File

@@ -79,7 +79,7 @@
if(!T) return
if(client)
playsound(T, pick(voice_sounds_list), 75, TRUE, falloff = 1 , is_global = TRUE, frequency = voice_freq, ignore_walls = TRUE, preference = /datum/preference/toggle/emote_sounds) //CHOMPEdit - use say prefs instead //ChompEDIT - also ignore walls
playsound(T, pick(voice_sounds_list), 75, TRUE, falloff = 1 , is_global = TRUE, frequency = voice_freq, ignore_walls = TRUE, preference = /datum/preference/toggle/emote_sounds) //CHOMPEdit - use say prefs instead
var/list/in_range = get_mobs_and_objs_in_view_fast(T,range,2,remote_ghosts = client ? TRUE : FALSE)
var/list/m_viewers = in_range["mobs"]

View File

@@ -65,7 +65,6 @@
update_light_color()
icon_state = "restruct_1"
addtimer(CALLBACK(src, PROC_REF(spawn_slime), user), 3 SECONDS, TIMER_DELETE_ME)
spawn(30)
/obj/machinery/slime/replicator/proc/spawn_slime(mob/user)
PRIVATE_PROC(TRUE)