From a67d684b010ca2f1d8f0da01be98c19d84762069 Mon Sep 17 00:00:00 2001 From: mochi Date: Tue, 9 Jun 2020 14:07:41 +0200 Subject: [PATCH] Fix entering pods and stuff while buckled You already can't drag and drop buckled people onto pods and stuff but they can still enter them by themselves. This commit fixes that --- code/game/dna/dna_modifier.dm | 2 +- code/game/machinery/Sleeper.dm | 2 +- code/game/machinery/cryo.dm | 2 +- code/game/machinery/cryopod.dm | 3 +++ code/game/machinery/suit_storage_unit.dm | 2 ++ 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index a6ec98e8866..eae6edd3bd4 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -144,7 +144,7 @@ set category = null set name = "Enter DNA Scanner" - if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other + if(usr.incapacitated() || usr.buckled) //are you cuffed, dying, lying, stunned or other return if(!ishuman(usr)) //Make sure they're a mob that has dna to_chat(usr, "Try as you might, you can not climb up into the [src].") diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 70d88e92b71..e4d0befa61e 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -526,7 +526,7 @@ if(panel_open) to_chat(usr, "Close the maintenance panel first.") return - if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other + if(usr.incapacitated() || usr.buckled) //are you cuffed, dying, lying, stunned or other return if(usr.has_buckled_mobs()) //mob attached to us to_chat(usr, "[usr] will not fit into [src] because [usr.p_they()] [usr.p_have()] a slime latched onto [usr.p_their()] head.") diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index c7dc139446a..ea0104e75bf 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -516,7 +516,7 @@ if(stat & (NOPOWER|BROKEN)) return - if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other + if(usr.incapacitated() || usr.buckled) //are you cuffed, dying, lying, stunned or other return put_mob(usr) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 49b75588468..36196ea4eca 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -671,6 +671,9 @@ to_chat(usr, "[usr] will not fit into [src] because [usr.p_they()] [usr.p_have()] a slime latched onto [usr.p_their()] head.") return + if(usr.incapacitated() || usr.buckled) //are you cuffed, dying, lying, stunned or other + return + visible_message("[usr] starts climbing into [src].") if(do_after(usr, 20, target = usr)) diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 3a6f3011747..da4df4f8382 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -772,6 +772,8 @@ if(usr.stat != 0) return + if(usr.incapacitated() || usr.buckled) //are you cuffed, dying, lying, stunned or other + return if(!state_open) to_chat(usr, "The unit's doors are shut.") return