mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
[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:
committed by
GitHub
parent
ee2031a364
commit
3c98280038
@@ -138,7 +138,7 @@ GLOBAL_VAR_INIT(message_delay, 0) // To make sure restarting the recentmessages
|
|||||||
machinetype = 6
|
machinetype = 6
|
||||||
produces_heat = 0
|
produces_heat = 0
|
||||||
var/intercept = 0 // if nonzero, broadcasts all messages to syndicate channel
|
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()
|
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))
|
if(data == DATA_ANTAG && isobserver(R) && R.client?.prefs?.read_preference(/datum/preference/toggle/ghost_radio))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
// ChompEDIT START - Ghost blacklist for certain spammy radio channels
|
var/list/ghostradio_freq_blacklist = list(ENT_FREQ, BDCM_FREQ) //Kept for Downstream use //CHOMPEdit - Enable BDCM_FREQ
|
||||||
var/list/ghostradio_freq_blacklist = list(ENT_FREQ, BDCM_FREQ)
|
|
||||||
if(istype(R, /mob/observer/dead) && R.client?.prefs?.read_preference(/datum/preference/toggle/ghost_radio) && (connection.frequency in ghostradio_freq_blacklist))
|
if(istype(R, /mob/observer/dead) && R.client?.prefs?.read_preference(/datum/preference/toggle/ghost_radio) && (connection.frequency in ghostradio_freq_blacklist))
|
||||||
continue
|
continue
|
||||||
// ChompEDIT END
|
|
||||||
|
|
||||||
// --- Check for compression ---
|
// --- Check for compression ---
|
||||||
if(compression > 0)
|
if(compression > 0)
|
||||||
|
|||||||
@@ -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.
|
// 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
|
// List of core tabs the communicator can switch to
|
||||||
#define HOMETAB 1
|
#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.
|
// assign the device to the holder's name automatically in a spectacularly shitty way.
|
||||||
/obj/item/communicator/Initialize(mapload)
|
/obj/item/communicator/Initialize(mapload)
|
||||||
. = ..()
|
. = ..()
|
||||||
GLOB.all_communicators += src
|
all_communicators += src
|
||||||
GLOB.all_communicators = sortAtom(GLOB.all_communicators)
|
all_communicators = sortAtom(all_communicators)
|
||||||
node = get_exonet_node()
|
node = get_exonet_node()
|
||||||
START_PROCESSING(SSobj, src)
|
START_PROCESSING(SSobj, src)
|
||||||
camera = new(src)
|
camera = new(src)
|
||||||
@@ -272,7 +272,7 @@ GLOBAL_LIST_EMPTY_TYPED(all_communicators, /obj/item/communicator)
|
|||||||
src.known_devices.Cut()
|
src.known_devices.Cut()
|
||||||
if(!get_connection_to_tcomms()) //If the network's down, we can't see anything.
|
if(!get_connection_to_tcomms()) //If the network's down, we can't see anything.
|
||||||
return
|
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.
|
if(!comm || !comm.exonet || !comm.exonet.address || comm.exonet.address == src.exonet.address) //Don't add addressless devices, and don't add ourselves.
|
||||||
continue
|
continue
|
||||||
src.known_devices |= comm
|
src.known_devices |= comm
|
||||||
@@ -414,7 +414,7 @@ GLOBAL_LIST_EMPTY_TYPED(all_communicators, /obj/item/communicator)
|
|||||||
node = null
|
node = null
|
||||||
|
|
||||||
//Clean up references that might point at us
|
//Clean up references that might point at us
|
||||||
GLOB.all_communicators -= src
|
all_communicators -= src
|
||||||
STOP_PROCESSING(SSobj, src)
|
STOP_PROCESSING(SSobj, src)
|
||||||
listening_objects.Remove(src)
|
listening_objects.Remove(src)
|
||||||
QDEL_NULL(camera)
|
QDEL_NULL(camera)
|
||||||
|
|||||||
@@ -140,7 +140,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
var/list/choices = list()
|
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)
|
if(!comm.network_visibility || !comm.exonet || !comm.exonet.address)
|
||||||
continue
|
continue
|
||||||
choices.Add(comm)
|
choices.Add(comm)
|
||||||
|
|||||||
@@ -306,7 +306,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
var/list/choices = list()
|
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)
|
if(!comm.network_visibility || !comm.exonet || !comm.exonet.address)
|
||||||
continue
|
continue
|
||||||
choices.Add(comm)
|
choices.Add(comm)
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
if(!T) return
|
if(!T) return
|
||||||
|
|
||||||
if(client)
|
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/in_range = get_mobs_and_objs_in_view_fast(T,range,2,remote_ghosts = client ? TRUE : FALSE)
|
||||||
var/list/m_viewers = in_range["mobs"]
|
var/list/m_viewers = in_range["mobs"]
|
||||||
|
|||||||
@@ -65,7 +65,6 @@
|
|||||||
update_light_color()
|
update_light_color()
|
||||||
icon_state = "restruct_1"
|
icon_state = "restruct_1"
|
||||||
addtimer(CALLBACK(src, PROC_REF(spawn_slime), user), 3 SECONDS, TIMER_DELETE_ME)
|
addtimer(CALLBACK(src, PROC_REF(spawn_slime), user), 3 SECONDS, TIMER_DELETE_ME)
|
||||||
spawn(30)
|
|
||||||
|
|
||||||
/obj/machinery/slime/replicator/proc/spawn_slime(mob/user)
|
/obj/machinery/slime/replicator/proc/spawn_slime(mob/user)
|
||||||
PRIVATE_PROC(TRUE)
|
PRIVATE_PROC(TRUE)
|
||||||
|
|||||||
Reference in New Issue
Block a user