diff --git a/GainStation13/code/machinery/doors/airlock_types.dm b/GainStation13/code/machinery/doors/airlock_types.dm new file mode 100644 index 0000000000..3f925583de --- /dev/null +++ b/GainStation13/code/machinery/doors/airlock_types.dm @@ -0,0 +1,41 @@ +//GS13 Port - stuckage code +/obj/machinery/door/airlock/Crossed(mob/living/carbon/L) + if(!istype(L)) + return ..() + + var/stuckage_weight = L?.client?.prefs?.stuckage + if(isnull(stuckage_weight) || (stuckage_weight < 10)) + return ..() // They aren't able to get stuck + + if(L.fatness > (stuckage_weight * 2)) + if(rand(1, 3) == 1) + L.doorstuck = 1 + 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) + sleep(100) + L.doorstuck = 0 + L.Knockdown(1) + return ..() + + else if(L.fatness > stuckage_weight) + if(rand(1, 5) == 1) + L.doorstuck = 1 + 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) + sleep(55) + L.doorstuck = 0 + L.Knockdown(1) + return ..() + if(rand(1, 5) == 5) + to_chat(L, "With great effort, you manage to squeeze your massive form through \the [src]. It's a tight fit, but you successfully navigate the narrow opening, barely avoiding getting stuck.") + return ..() + + else if(L.fatness > (stuckage_weight / 2)) + if(rand(1, 5) == 1) + L.visible_message("[L]'s hips brush against the doorway...") + to_chat(L, "As you pass through \the [src], you feel a slight brushing against your hips. The [src] frame accommodates your form, but it's a close fit..") + return ..() + + return ..() diff --git a/tgstation.dme b/tgstation.dme index 451ba7fbed..05eb38ec55 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3977,6 +3977,7 @@ #include "GainStation13\code\machinery\feeding_tube.dm" #include "GainStation13\code\machinery\feeding_tube_industrial.dm" #include "GainStation13\code\machinery\gym.dm" +#include "GainStation13\code\machinery\doors\airlock_types.dm" #include "GainStation13\code\machinery\powered_quantum_pad.dm" #include "GainStation13\code\machinery\supply_teleporter.dm" #include "GainStation13\code\mechanics\calorite.dm"