From d9e839c0835c67bfa085c2c05b1350c135b9d7f5 Mon Sep 17 00:00:00 2001 From: AlManiak Date: Mon, 2 Dec 2024 21:17:04 +0100 Subject: [PATCH] Added regular doors for stuckage --- .../code/machinery/doors/airlock_types.dm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/GainStation13/code/machinery/doors/airlock_types.dm b/GainStation13/code/machinery/doors/airlock_types.dm index 1b6c605ef7..7e2d83ab6c 100644 --- a/GainStation13/code/machinery/doors/airlock_types.dm +++ b/GainStation13/code/machinery/doors/airlock_types.dm @@ -13,7 +13,7 @@ L.visible_message("[L] gets stuck in the doorway!") to_chat(L, "As you attempt to pass through \the [src], your ample curves get wedged in the narrow opening. You find yourself stuck in the [src] frame, struggling to free yourself from the tight squeeze.") L.Stun(100, updating = TRUE, ignore_canstun = TRUE) - addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/machinery/door, AsyncDoorstuckCall), L), 100) + addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/machinery/door/airlock/, AsyncDoorstuckCall), L), 100) //sleep(100) return ..() @@ -23,7 +23,7 @@ L.visible_message("[L] gets stuck in the doorway!") to_chat(L, "As you attempt to pass through \the [src], your ample curves get wedged in the narrow opening. You find yourself stuck in the [src] frame, struggling to free yourself from the tight squeeze.") L.Stun(55, updating = TRUE, ignore_canstun = TRUE) - addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/machinery/door, AsyncDoorstuckCall), L), 55) + addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/machinery/door/airlock/, AsyncDoorstuckCall), L), 55) //sleep(55) return ..() if(rand(1, 5) == 5) @@ -52,7 +52,7 @@ L.visible_message("[L] gets stuck in the doorway!") to_chat(L, "As you attempt to pass through \the [src], your ample curves get wedged in the narrow opening. You find yourself stuck in the [src] frame, struggling to free yourself from the tight squeeze.") L.Stun(100, updating = TRUE, ignore_canstun = TRUE) - addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/machinery/door, AsyncDoorstuckCall), L), 100) + addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/structure/mineral_door/, AsyncDoorstuckCall), L), 100) //sleep(100) return ..() @@ -62,7 +62,7 @@ L.visible_message("[L] gets stuck in the doorway!") to_chat(L, "As you attempt to pass through \the [src], your ample curves get wedged in the narrow opening. You find yourself stuck in the [src] frame, struggling to free yourself from the tight squeeze.") L.Stun(55, updating = TRUE, ignore_canstun = TRUE) - addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/machinery/door, AsyncDoorstuckCall), L), 55) + addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/structure/mineral_door/, AsyncDoorstuckCall), L), 55) //sleep(55) return ..() if(rand(1, 5) == 5) @@ -78,6 +78,11 @@ return ..() // Callback proc to replace sleep function -/obj/machinery/door/proc/AsyncDoorstuckCall(mob/living/carbon/L) +/obj/machinery/door/airlock/proc/AsyncDoorstuckCall(mob/living/carbon/L) + L.doorstuck = 0 + L.Knockdown(1) + +// Callback proc to replace sleep function +/obj/structure/mineral_door/proc/AsyncDoorstuckCall(mob/living/carbon/L) L.doorstuck = 0 L.Knockdown(1)