Files
Bubberstation/code/game/objects/items/body_egg.dm
nemvar 8918a88612 Makes organ decay a lot nicer. (#45845)
* Gets rid of double processing memes.

* fixes the organ box thing

* Makes everything just a tad more performant

* even more performant

* Gets rid of the double processing on SSobj for body eggs

* forgot the brackets

* Also removes double processing memes from the shadowling armblade

* Removes the istype check for MMIs.
2019-08-15 21:52:07 -07:00

52 lines
1.2 KiB
Plaintext

/obj/item/organ/body_egg
name = "body egg"
desc = "All slimy and yuck."
icon_state = "innards"
zone = BODY_ZONE_CHEST
slot = ORGAN_SLOT_PARASITE_EGG
/obj/item/organ/body_egg/on_find(mob/living/finder)
..()
to_chat(finder, "<span class='warning'>You found an unknown alien organism in [owner]'s [zone]!</span>")
/obj/item/organ/body_egg/New(loc)
if(iscarbon(loc))
src.Insert(loc)
return ..()
/obj/item/organ/body_egg/Insert(var/mob/living/carbon/M, special = 0)
..()
ADD_TRAIT(owner, TRAIT_XENO_HOST, TRAIT_GENERIC)
owner.med_hud_set_status()
INVOKE_ASYNC(src, .proc/AddInfectionImages, owner)
/obj/item/organ/body_egg/Remove(var/mob/living/carbon/M, special = 0)
if(owner)
REMOVE_TRAIT(owner, TRAIT_XENO_HOST, TRAIT_GENERIC)
owner.med_hud_set_status()
INVOKE_ASYNC(src, .proc/RemoveInfectionImages, owner)
..()
/obj/item/organ/body_egg/on_death()
. = ..()
if(!owner)
return
egg_process()
/obj/item/organ/body_egg/on_life()
. = ..()
egg_process()
/obj/item/organ/body_egg/proc/egg_process()
return
/obj/item/organ/body_egg/proc/RefreshInfectionImage()
RemoveInfectionImages()
AddInfectionImages()
/obj/item/organ/body_egg/proc/AddInfectionImages()
return
/obj/item/organ/body_egg/proc/RemoveInfectionImages()
return