diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm index b0ffe33d52ed..d293716dc5f6 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm @@ -654,6 +654,7 @@ var/datum/construction_template/xenomorph/structure_template = new structure_type() if(!spacecheck(X, T, structure_template)) + // spacecheck already cleans up the template return FALSE if((choice == XENO_STRUCTURE_EGGMORPH) && locate(/obj/structure/flora/grass/tallgrass) in T) @@ -665,16 +666,21 @@ return FALSE if(!spacecheck(X, T, structure_template)) //doublechecking + // spacecheck already cleans up the template return FALSE if(choice == XENO_STRUCTURE_CORE && AR.unoviable_timer) to_chat(X, SPAN_WARNING("This area does not feel right for you to build this in.")) + qdel(structure_template) + return FALSE if((choice == XENO_STRUCTURE_CORE) && isqueen(X) && X.hive.has_structure(XENO_STRUCTURE_CORE)) if(X.hive.hive_location.hardcore || world.time > XENOMORPH_PRE_SETUP_CUTOFF) to_chat(X, SPAN_WARNING("We can't rebuild this structure!")) + qdel(structure_template) return FALSE if(alert(X, "Are we sure that we want to move the hive and destroy the old hive core?", , "Yes", "No") != "Yes") + qdel(structure_template) return FALSE qdel(X.hive.hive_location) else if(!X.hive.can_build_structure(choice))