Files
Bubberstation/code/game/objects/items/body_egg.dm
SkyratBot 6e029611ac [MIRROR] Implements AddTraits and RemoveTraits procs for adding/removing multiple traits + swag unit test [MDB IGNORE] (#19959)
* Implements AddTraits and RemoveTraits procs for adding/removing multiple traits + swag unit test

* MISSED MIRROR https://github.com/tgstation/tgstation/pull/71606

* Update modules_supply.dm

* Update tgstation.dme

---------

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-03-27 03:26:52 +01:00

54 lines
1.6 KiB
Plaintext

/obj/item/organ/internal/body_egg
name = "body egg"
desc = "All slimy and yuck."
icon_state = "innards"
visual = TRUE
zone = BODY_ZONE_CHEST
slot = ORGAN_SLOT_PARASITE_EGG
/obj/item/organ/internal/body_egg/on_find(mob/living/finder)
..()
to_chat(finder, span_warning("You found an unknown alien organism in [owner]'s [zone]!"))
/obj/item/organ/internal/body_egg/Initialize(mapload)
. = ..()
if(iscarbon(loc))
Insert(loc)
/obj/item/organ/internal/body_egg/Insert(mob/living/carbon/egg_owner, special = FALSE, drop_if_replaced = TRUE)
. = ..()
if(!.)
return
egg_owner.add_traits(list(TRAIT_XENO_HOST, TRAIT_XENO_IMMUNE), ORGAN_TRAIT)
egg_owner.med_hud_set_status()
INVOKE_ASYNC(src, PROC_REF(AddInfectionImages), egg_owner)
/obj/item/organ/internal/body_egg/Remove(mob/living/carbon/egg_owner, special = FALSE)
. = ..()
egg_owner.remove_traits(list(TRAIT_XENO_HOST, TRAIT_XENO_IMMUNE), ORGAN_TRAIT)
egg_owner.med_hud_set_status()
INVOKE_ASYNC(src, PROC_REF(RemoveInfectionImages), egg_owner)
/obj/item/organ/internal/body_egg/on_death(delta_time, times_fired)
. = ..()
if(!owner)
return
egg_process(delta_time, times_fired)
/obj/item/organ/internal/body_egg/on_life(delta_time, times_fired)
. = ..()
egg_process(delta_time, times_fired)
/obj/item/organ/internal/body_egg/proc/egg_process(delta_time, times_fired)
return
/obj/item/organ/internal/body_egg/proc/RefreshInfectionImage()
RemoveInfectionImages()
AddInfectionImages()
/obj/item/organ/internal/body_egg/proc/AddInfectionImages()
return
/obj/item/organ/internal/body_egg/proc/RemoveInfectionImages()
return