mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-25 14:16:58 +01:00
[MIRROR] next globs (#12552)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
co-authored by
Kashargul
parent
73faa45a34
commit
5567a1a245
@@ -86,8 +86,7 @@
|
||||
// assign the device to the holder's name automatically in a spectacularly shitty way.
|
||||
/obj/item/communicator/Initialize(mapload)
|
||||
. = ..()
|
||||
all_communicators += src
|
||||
all_communicators = sort_names(all_communicators)
|
||||
GLOB.all_communicators += src
|
||||
node = get_exonet_node()
|
||||
START_PROCESSING(SSobj, src)
|
||||
camera = new(src)
|
||||
@@ -259,7 +258,7 @@
|
||||
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 all_communicators)
|
||||
for(var/obj/item/communicator/comm in GLOB.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
|
||||
@@ -403,7 +402,7 @@
|
||||
node = null
|
||||
|
||||
//Clean up references that might point at us
|
||||
all_communicators -= src
|
||||
GLOB.all_communicators -= src
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
GLOB.listening_objects.Remove(src)
|
||||
QDEL_NULL(camera)
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
return
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/obj/item/communicator/comm in all_communicators)
|
||||
for(var/obj/item/communicator/comm in GLOB.all_communicators)
|
||||
if(!comm.network_visibility || !comm.exonet || !comm.exonet.address)
|
||||
continue
|
||||
choices.Add(comm)
|
||||
|
||||
@@ -307,16 +307,16 @@
|
||||
return
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/obj/item/communicator/comm in all_communicators)
|
||||
for(var/obj/item/communicator/comm in GLOB.all_communicators)
|
||||
if(!comm.network_visibility || !comm.exonet || !comm.exonet.address)
|
||||
continue
|
||||
choices.Add(comm)
|
||||
|
||||
if(!choices.len)
|
||||
to_chat(src , span_danger("There are no available communicators, sorry."))
|
||||
to_chat(src, span_danger("There are no available communicators, sorry."))
|
||||
return
|
||||
|
||||
var/choice = tgui_input_list(src,"Send a voice request to whom?", "Recipient Choice", choices)
|
||||
var/choice = tgui_input_list(src, "Send a voice request to whom?", "Recipient Choice", choices)
|
||||
if(choice)
|
||||
var/obj/item/communicator/chosen_communicator = choice
|
||||
var/mob/observer/dead/O = src
|
||||
|
||||
Reference in New Issue
Block a user