diff --git a/code/__DEFINES/xeno_ai.dm b/code/__DEFINES/xeno_ai.dm index 9095f56ad9..d7cbe1bf22 100644 --- a/code/__DEFINES/xeno_ai.dm +++ b/code/__DEFINES/xeno_ai.dm @@ -13,6 +13,7 @@ #define FIRE_PENALTY 25 #define SENTRY_PENALTY 25 #define VEHICLE_PENALTY 25 +#define LOCKED_DOOR_PENALTY 25 #define WINDOW_FRAME_PENALTY 25 #define BARRICADE_PENALTY 50 #define WALL_PENALTY 100 diff --git a/code/game/machinery/doors/shutters.dm b/code/game/machinery/doors/shutters.dm index da904f255c..4c9b7beb21 100644 --- a/code/game/machinery/doors/shutters.dm +++ b/code/game/machinery/doors/shutters.dm @@ -72,6 +72,13 @@ /obj/structure/machinery/door/poddoor/shutters/finish_close() operating = FALSE +/obj/structure/machinery/door/poddoor/shutters/attack_alien(mob/living/carbon/xenomorph/M) + if(density && !operating) + INVOKE_ASYNC(src, PROC_REF(pry_open), M) + return XENO_ATTACK_ACTION + else + . = ..(M) + /obj/structure/machinery/door/poddoor/shutters/almayer icon = 'icons/obj/structures/doors/blastdoors_shutters.dmi' openspeed = 4 //shorter open animation. @@ -101,13 +108,6 @@ /obj/structure/machinery/door/poddoor/shutters/almayer/containment unacidable = TRUE -/obj/structure/machinery/door/poddoor/shutters/almayer/containment/attack_alien(mob/living/carbon/xenomorph/M) - if(isqueen(M) && density && !operating) - INVOKE_ASYNC(src, PROC_REF(pry_open), M) - return XENO_ATTACK_ACTION - else - . = ..(M) - /obj/structure/machinery/door/poddoor/shutters/almayer/containment/pry_open(mob/living/carbon/xenomorph/X, time = 4 SECONDS) . = ..() if(. && !(stat & BROKEN)) diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_ai_interaction.dm b/code/modules/mob/living/carbon/xenomorph/xeno_ai_interaction.dm index 177cd07433..40e20fc06f 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_ai_interaction.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_ai_interaction.dm @@ -76,21 +76,32 @@ At bare minimum, make sure the relevant checks from parent types gets copied in ///////////////////////////// -// Poddoors/shutters // +// PODDDOORS // ///////////////////////////// /obj/structure/machinery/door/poddoor/xeno_ai_obstacle(mob/living/carbon/xenomorph/X, direction, turf/target) . = ..() if(!.) - return + return INFINITY + + if(unacidable) + return INFINITY if(!(stat & NOPOWER)) - return + return INFINITY + + return DOOR_PENALTY - if(operating) - return + +///////////////////////////// +// SHUTTERS // +///////////////////////////// +/obj/structure/machinery/door/poddoor/shutters/xeno_ai_obstacle(mob/living/carbon/xenomorph/X, direction, turf/target) + . = ..() + if(!.) + return INFINITY if(unacidable) - return + return INFINITY return DOOR_PENALTY @@ -104,7 +115,7 @@ At bare minimum, make sure the relevant checks from parent types gets copied in return if(locked || welded || isElectrified()) - return INFINITY + return LOCKED_DOOR_PENALTY if(isfacehugger(X)) return -1 // We LOVE going under doors!