Purrbation toggle and organ insert code refactor (#68738)

This PR improves the purrbation toggle code. Admins can now put any human species on purrbation.
This commit is contained in:
Riggle
2022-07-30 20:57:10 +02:00
committed by GitHub
parent ec6ca62125
commit 8a680eb9ec
17 changed files with 113 additions and 108 deletions

View File

@@ -15,14 +15,14 @@
if(iscarbon(loc))
Insert(loc)
/obj/item/organ/internal/body_egg/Insert(mob/living/carbon/M, special = FALSE)
/obj/item/organ/internal/body_egg/Insert(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
..()
ADD_TRAIT(owner, TRAIT_XENO_HOST, ORGAN_TRAIT)
ADD_TRAIT(owner, TRAIT_XENO_IMMUNE, ORGAN_TRAIT)
owner.med_hud_set_status()
INVOKE_ASYNC(src, .proc/AddInfectionImages, owner)
/obj/item/organ/internal/body_egg/Remove(mob/living/carbon/M, special = FALSE)
/obj/item/organ/internal/body_egg/Remove(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
if(owner)
REMOVE_TRAIT(owner, TRAIT_XENO_HOST, ORGAN_TRAIT)
REMOVE_TRAIT(owner, TRAIT_XENO_IMMUNE, ORGAN_TRAIT)