Rewrite examine() to pass a list around

This commit is contained in:
Aronai Sieyes
2020-04-29 16:42:16 -04:00
committed by VirgoBot
parent 8c5c0a7cfb
commit 6ebd249748
214 changed files with 2021 additions and 1120 deletions

View File

@@ -113,11 +113,11 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
callHook("debrain", list(brainmob))
/obj/item/organ/internal/brain/examine(mob/user) // -- TLE
..(user)
. = ..()
if(brainmob && brainmob.client)//if thar be a brain inside... the brain.
to_chat(user, "You can feel the small spark of life still left in this one.")
. += "You can feel the small spark of life still left in this one."
else
to_chat(user, "This one seems particularly lifeless. Perhaps it will regain some of its luster later..")
. += "This one seems particularly lifeless. Perhaps it will regain some of its luster later..."
/obj/item/organ/internal/brain/removed(var/mob/living/user)

View File

@@ -158,9 +158,9 @@ var/list/organ_cache = list()
handle_germ_effects()
/obj/item/organ/examine(mob/user)
..(user)
. = ..()
if(status & ORGAN_DEAD)
to_chat(user, "<span class='notice'>The decay has set in.</span>")
. += "<span class='notice'>Decay appears to have set in.</span>"
//A little wonky: internal organs stop calling this (they return early in process) when dead, but external ones cause further damage when dead
/obj/item/organ/proc/handle_germ_effects()

View File

@@ -146,13 +146,12 @@
return ..()
/obj/item/organ/external/examine()
..()
. = ..()
if(in_range(usr, src) || istype(usr, /mob/observer/dead))
for(var/obj/item/I in contents)
if(istype(I, /obj/item/organ))
continue
to_chat(usr, "<span class='danger'>There is \a [I] sticking out of it.</span>")
return
. += "<span class='danger'>There is \a [I] sticking out of it.</span>"
/obj/item/organ/external/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
switch(stage)