Added regular doors for stuckage

This commit is contained in:
AlManiak
2024-12-02 21:17:04 +01:00
parent 95ef6f6942
commit d9e839c083
@@ -13,7 +13,7 @@
L.visible_message("<span class'danger'>[L] gets stuck in the doorway!</span>")
to_chat(L, "<span class='danger'>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.</span>")
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("<span class'danger'>[L] gets stuck in the doorway!</span>")
to_chat(L, "<span class='danger'>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.</span>")
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("<span class'danger'>[L] gets stuck in the doorway!</span>")
to_chat(L, "<span class='danger'>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.</span>")
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("<span class'danger'>[L] gets stuck in the doorway!</span>")
to_chat(L, "<span class='danger'>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.</span>")
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)