mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-01 04:21:42 +00:00
Replaces like 70-80% of 0 and such, as a side effect cleaned up a bunch of returns Edit: Most left out ones are in mecha which should be done in mecha refactor already Oh my look how clean it is Co-authored-by: TiviPlus <TiviPlus> Co-authored-by: Couls <coul422@gmail.com> Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com> Co-authored-by: Couls <coul422@gmail.com>
54 lines
1.3 KiB
Plaintext
54 lines
1.3 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/Initialize()
|
|
. = ..()
|
|
if(iscarbon(loc))
|
|
Insert(loc)
|
|
|
|
/obj/item/organ/body_egg/Insert(mob/living/carbon/M, special = FALSE)
|
|
..()
|
|
ADD_TRAIT(owner, TRAIT_XENO_HOST, TRAIT_GENERIC)
|
|
ADD_TRAIT(owner, TRAIT_XENO_IMMUNE, "xeno immune")
|
|
owner.med_hud_set_status()
|
|
INVOKE_ASYNC(src, .proc/AddInfectionImages, owner)
|
|
|
|
/obj/item/organ/body_egg/Remove(mob/living/carbon/M, special = FALSE)
|
|
if(owner)
|
|
REMOVE_TRAIT(owner, TRAIT_XENO_HOST, TRAIT_GENERIC)
|
|
REMOVE_TRAIT(owner, TRAIT_XENO_IMMUNE, "xeno immune")
|
|
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
|