Fixes multiple embryos in single host

Added checks so you can’t have multiple embryos in a single host.
Checks are included in both facehugger.dm and alien_embryo.dm, because
there might be ways to implant embryos without facehuggers in the
future, but we also want to avoid creating and instantly deleting
objects.
Also changes chest augmentation surgery to remove any embryos. Before
you could remove the whole chest without finding the embryo inside.
This commit is contained in:
Perakp
2013-12-01 08:52:34 +02:00
parent 42a0530292
commit 4e05048524
4 changed files with 18 additions and 8 deletions
@@ -61,6 +61,8 @@
if("head")
H.organs += new /obj/item/organ/limb/robot/head(src)
if("chest")
var/datum/surgery_step/xenomorph_removal/xeno_removal = new
xeno_removal.remove_xeno(user, target) // remove an alien if there is one
H.organs += new /obj/item/organ/limb/robot/chest(src)
for(var/datum/disease/appendicitis/A in H.viruses) //If they already have Appendicitis, Remove it
A.cure(1)
+9 -4
View File
@@ -16,6 +16,13 @@
user.visible_message("<span class='notice'>[user] begins to search in [target]'s chest for a xenomorph.</span>")
/datum/surgery_step/xenomorph_removal/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(remove_xeno(user, target))
user.visible_message("<span class='notice'>[user] successfully extracts the xenomorph from [target]!</span>")
else
user.visible_message("<span class='notice'>[user] can't find anything in [target]'s chest!</span>")
return 1
/datum/surgery_step/xenomorph_removal/proc/remove_xeno(mob/user, mob/living/carbon/target)
var/obj/item/alien_embryo/A = locate() in target.contents
if(A)
user << "<span class='notice'>You found an unknown alien organism in [target]'s chest!</span>"
@@ -27,10 +34,8 @@
A.AttemptGrow()
A.loc = get_turf(target)
user.visible_message("<span class='notice'>[user] successfully extracts the xenomorph from [target]!</span>")
else
user.visible_message("<span class='notice'>[user] can't find anything in [target]'s chest!</span>")
return 1
return 1
/datum/surgery_step/xenomorph_removal/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
var/obj/item/alien_embryo/A = locate() in target.contents