From 897d4fa7ee4026ec656c59b001d33e77f07d03c1 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Sat, 5 Dec 2015 01:48:02 -0800 Subject: [PATCH] You can now resist to escape an odysseus' sleeper There's a bit of snowflaking; though I hope the method can be extended to something more than just that single thing in the future --- code/game/mecha/equipment/tools/medical_tools.dm | 3 +++ code/modules/mob/living/living.dm | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index a32e32c1075..bf4568703ce 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -198,6 +198,9 @@ update_equip_info() return + proc/on_resist(var/mob/living/L) + go_out() + update_equip_info() if(..()) send_byjax(chassis.occupant,"msleeper.browser","lossinfo",get_occupant_dam()) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index dc23580c131..d4d3ca1fdb3 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -515,6 +515,10 @@ if(loc && (istype(loc, /obj/structure/morgue) || istype(loc, /obj/structure/crematorium))) resist_tray(L) + // The doctor left the odysseus unlocked again + if(src.loc && (istype(loc, /obj/item/mecha_parts/mecha_equipment/tool/sleeper))) + resist_mecha() + //unbuckling yourself if(L.buckled && (L.last_special <= world.time) ) resist_buckle(L) //this passes L because the proc requires a typecasted mob/living instead of just 'src' @@ -621,6 +625,17 @@ for(var/mob/O in viewers(usr, null)) O.show_message(text("\red [] resists!", L), 1) +/* +resist_mecha allows a mob to attempt to escape an exosuit's equipment +if the doctor let a graytide get in the odysseus, for example +*/ +/mob/living/proc/resist_mecha() + // I don't like anything so special-case as this, but I'll try to leave it as extensible as I can + // --Crazylemon + if(istype(src.loc, /obj/item/mecha_parts/mecha_equipment/tool/sleeper)) + var/obj/item/mecha_parts/mecha_equipment/tool/sleeper/prison = src.loc + prison.on_resist(src) + /* resist_buckle allows a mob that is bucklecuffed to break free of the chair/bed/whatever *///// /mob/living/proc/resist_buckle(var/mob/living/L)