Refactors tcomms stuff a little

This commit is contained in:
Crazylemon64
2017-02-24 18:10:08 -08:00
parent c8ec2347e6
commit 2f8feff402
7 changed files with 45 additions and 43 deletions
@@ -82,6 +82,17 @@ I'm using this for Stat to give it a more nifty interface to work with
/mob/living/carbon/brain/proc/has_synthetic_assistance()
return (container && istype(container, /obj/item/device/mmi)) || in_contents_of(/obj/mecha)
/mob/living/carbon/brain/proc/get_race()
if(container)
var/obj/item/device/mmi/M = container
if(istype(M) && M.held_brain)
return M.held_brain.dna.get_species_name()
else
return "Artificial Life"
if(istype(loc, /obj/item/organ/internal/brain))
var/obj/item/organ/internal/brain/B = loc
return B.dna.get_species_name()
/mob/living/carbon/brain/Stat()
..()
if(has_synthetic_assistance())
@@ -321,6 +321,7 @@
newsign.data["mob"] = null
newsign.data["mobtype"] = /mob/living/carbon/human
newsign.data["race"] = "Automated Signal"
newsign.data["name"] = source
newsign.data["realname"] = newsign.data["name"]
newsign.data["job"] = "[job]"
@@ -343,4 +344,4 @@
var/pass = S.relay_information(newsign, "/obj/machinery/telecomms/hub")
if(!pass)
S.relay_information(newsign, "/obj/machinery/telecomms/broadcaster") // send this simple message to broadcasters
S.relay_information(newsign, "/obj/machinery/telecomms/broadcaster") // send this simple message to broadcasters