Refractors the alien embryo into a proper parasite organ (#5577)

What it says in the title, it might as well slowdown the burst stage a bit.
This commit is contained in:
Alberyk
2018-11-17 00:08:49 +02:00
committed by Erki
parent b7467c9864
commit 9a075a1103
3 changed files with 49 additions and 45 deletions
@@ -1,4 +1,4 @@
/obj/item/organ/xenos/alien_embryo
/obj/item/organ/parasite/alien_embryo
name = "alien embryo"
desc = "All slimy and yuck."
icon = 'icons/mob/alien.dmi'
@@ -6,72 +6,72 @@
parent_organ = "chest"
organ_tag = "alien embryo"
origin_tech = list(TECH_BIO = 5)
var/stage = 0
stage_interval = 200
/obj/item/organ/xenos/alien_embryo/Destroy()
/obj/item/organ/parasite/alien_embryo/Destroy()
if(owner)
owner.status_flags &= ~(XENO_HOST)
RemoveInfectionImages(owner)
return ..()
/obj/item/organ/xenos/alien_embryo/replaced(var/mob/living/carbon/human/target,var/obj/item/organ/external/affected)
/obj/item/organ/parasite/alien_embryo/replaced(var/mob/living/carbon/human/target,var/obj/item/organ/external/affected)
..(target, affected)
if(owner && ishuman(owner))
START_PROCESSING(SSprocessing, src)
AddInfectionImages(owner)
/obj/item/organ/xenos/alien_embryo/removed(var/mob/living/user)
/obj/item/organ/parasite/alien_embryo/removed(var/mob/living/user)
if(owner)
owner.status_flags &= ~(XENO_HOST)
RemoveInfectionImages(owner)
..(user)
/obj/item/organ/parasite/alien_embryo/stage_effect()
RefreshInfectionImage(owner)
return
/obj/item/organ/xenos/alien_embryo/process()
/obj/item/organ/parasite/alien_embryo/process()
..()
if(!owner)
return
if(stage < 5 && prob(3))
stage++
RefreshInfectionImage(owner)
if(stage >= 2)
if(prob(1))
owner.emote("sneeze")
if(prob(1))
owner.emote("cough")
if(prob(1))
owner << "<span class='danger'>Your throat feels sore.</span>"
if(prob(1))
owner << "<span class='danger'>Mucous runs down the back of your throat.</span>"
switch(stage)
if(2, 3)
if(prob(1))
owner.emote("sneeze")
if(prob(1))
owner.emote("cough")
if(prob(1))
owner << "<span class='danger'>Your throat feels sore.</span>"
if(prob(1))
owner << "<span class='danger'>Mucous runs down the back of your throat.</span>"
if(4)
if(prob(1))
owner.emote("sneeze")
if(prob(1))
owner.emote("cough")
if(prob(2))
owner << "<span class='danger'>Your muscles ache.</span>"
if(prob(20))
owner.take_organ_damage(1)
if(prob(2))
owner << "<span class='danger'>Your stomach hurts.</span>"
if(prob(20))
owner.adjustToxLoss(1)
owner.updatehealth()
if(5)
owner << "<span class='danger'>You feel something tearing its way out of your stomach!</span>"
owner.adjustToxLoss(10)
owner.updatehealth()
if(prob(50))
AttemptGrow()
if(stage >= 3)
if(prob(1))
owner.emote("sneeze")
if(prob(1))
owner.emote("cough")
if(prob(2))
owner << "<span class='danger'>Your muscles ache.</span>"
if(prob(20))
owner.take_organ_damage(1)
if(prob(2))
owner << "<span class='danger'>Your stomach hurts.</span>"
if(prob(20))
owner.adjustToxLoss(1)
owner.updatehealth()
/obj/item/organ/xenos/alien_embryo/proc/AttemptGrow()
if(stage >= 4)
owner << "<span class='danger'>You feel something tearing its way out of your stomach!</span>"
owner.adjustToxLoss(10)
owner.updatehealth()
if(prob(50))
AttemptGrow()
/obj/item/organ/parasite/alien_embryo/proc/AttemptGrow()
var/list/candidates = get_alien_candidates()
var/picked = null
@@ -99,7 +99,7 @@
Proc: RefreshInfectionImage()
Des: Removes all infection images from aliens and places an infection image on all infected mobs for aliens.
----------------------------------------*/
/obj/item/organ/xenos/alien_embryo/proc/RefreshInfectionImage()
/obj/item/organ/parasite/alien_embryo/proc/RefreshInfectionImage()
for(var/mob/living/carbon/alien in player_list)
@@ -120,7 +120,7 @@ Des: Removes all infection images from aliens and places an infection image on a
Proc: AddInfectionImages(C)
Des: Checks if the passed mob (C) is infected with the alien egg, then gives each alien client an infected image at C.
----------------------------------------*/
/obj/item/organ/xenos/alien_embryo/proc/AddInfectionImages(var/mob/living/C)
/obj/item/organ/parasite/alien_embryo/proc/AddInfectionImages(var/mob/living/C)
if(C)
for(var/mob/living/carbon/alien in player_list)
@@ -138,7 +138,7 @@ Proc: RemoveInfectionImage(C)
Des: Removes the alien infection image from all aliens in the world located in passed mob (C).
----------------------------------------*/
/obj/item/organ/xenos/alien_embryo/proc/RemoveInfectionImages(var/mob/living/C)
/obj/item/organ/parasite/alien_embryo/proc/RemoveInfectionImages(var/mob/living/C)
if(C)
@@ -117,7 +117,7 @@ var/const/MAX_ACTIVE_TIME = 400
return
var/mob/living/carbon/human/C = M
if(istype(C) && locate(/obj/item/organ/xenos/alien_embryo) in C.internal_organs)
if(istype(C) && locate(/obj/item/organ/parasite/alien_embryo) in C.internal_organs)
return
if(locate(/obj/item/organ/xenos/hivenode) in C.internal_organs)
@@ -177,7 +177,7 @@ var/const/MAX_ACTIVE_TIME = 400
if(!sterile)
//target.contract_disease(new /datum/disease/alien_embryo(0)) //so infection chance is same as virus infection chance
var/obj/item/organ/affecting = target.get_organ("chest")
var/obj/item/organ/xenos/alien_embryo/kid = new(affecting)
var/obj/item/organ/parasite/alien_embryo/kid = new(affecting)
kid.replaced(target,affecting)
target.status_flags |= XENO_HOST
+4
View File
@@ -22,6 +22,7 @@
if(stage_ticker >= stage*stage_interval)
stage = min(stage+1,max_stage)
stage_effect()
/obj/item/organ/parasite/handle_rejection()
if(subtle)
@@ -31,6 +32,9 @@
rejecting = 0
return
/obj/item/organ/parasite/proc/stage_effect()
return
///////////////////
///K'ois Mycosis///
///////////////////