From c2d3ad40e26fd3dfe323233a5500b0e0ecec1abb Mon Sep 17 00:00:00 2001 From: Drulikar Date: Wed, 30 Oct 2024 22:32:02 -0500 Subject: [PATCH 1/2] Fix ovi timer restriction not actually preventing core placement --- .../mob/living/carbon/xenomorph/abilities/general_powers.dm | 2 ++ 1 file changed, 2 insertions(+) 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 a783e92272e1..a7ef592d8fe1 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm @@ -667,6 +667,8 @@ 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) From 567ae79f76919e2d51e3b1e1a1a0d50ef42bfccd Mon Sep 17 00:00:00 2001 From: Drulikar Date: Wed, 30 Oct 2024 22:32:25 -0500 Subject: [PATCH 2/2] Fix some cleanup of template for construction failure --- .../mob/living/carbon/xenomorph/abilities/general_powers.dm | 4 ++++ 1 file changed, 4 insertions(+) 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 a7ef592d8fe1..6e710ecf2d53 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm @@ -652,6 +652,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) @@ -663,6 +664,7 @@ 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) @@ -673,8 +675,10 @@ 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))