Rewrite examine() to pass a list around

This commit is contained in:
Aronai Sieyes
2020-04-29 16:42:50 -04:00
committed by VirgoBot
parent 8c5c0a7cfb
commit 6ebd249748
214 changed files with 2021 additions and 1120 deletions
@@ -108,9 +108,9 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
// Parameters: user - the user doing the examining
// Description: Allows the user to click a link when examining to look at video if one is going.
/obj/item/device/communicator/examine(mob/user)
. = ..(user, 1)
if(. && video_source)
to_chat(user, "<span class='notice'>It looks like it's on a video call: <a href='?src=\ref[src];watchvideo=1'>\[view\]</a></span>")
. = ..()
if(Adjacent(user) && video_source)
. += "<span class='notice'>It looks like it's on a video call: <a href='?src=\ref[src];watchvideo=1'>\[view\]</a></span>"
// Proc: initialize_exonet()
// Parameters: 1 (user - the person the communicator belongs to)
@@ -131,28 +131,22 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
// Parameters: 1 (user - the person examining the device)
// Description: Shows all the voice mobs inside the device, and their status.
/obj/item/device/communicator/examine(mob/user)
if(!..(user))
return
var/msg = ""
. = ..()
for(var/mob/living/voice/voice in contents)
msg += "<span class='notice'>On the screen, you can see a image feed of [voice].</span>\n"
msg += "<span class='warning'>"
. += "<span class='notice'>On the screen, you can see a image feed of [voice].</span>"
if(voice && voice.key)
switch(voice.stat)
if(CONSCIOUS)
if(!voice.client)
msg += "[voice] appears to be asleep.\n" //afk
. += "<span class='warning'>[voice] appears to be asleep.</span>" //afk
if(UNCONSCIOUS)
msg += "[voice] doesn't appear to be conscious.\n"
. += "<span class='warning'>[voice] doesn't appear to be conscious.</span>"
if(DEAD)
msg += "<span class='deadsay'>[voice] appears to have died...</span>\n" //Hopefully this never has to be used.
. += "<span class='deadsay'>[voice] appears to have died...</span>" //Hopefully this never has to be used.
else
msg += "<span class='notice'>The device doesn't appear to be transmitting any data.</span>\n"
msg += "</span>"
to_chat(user, msg)
return
. += "<span class='notice'>The device doesn't appear to be transmitting any data.</span>"
// Proc: emp_act()
// Parameters: None