From 8e63fe05c1d80d9f423ef6712f679b0b870400f6 Mon Sep 17 00:00:00 2001 From: kingofkosmos Date: Sun, 5 Apr 2015 22:03:24 +0300 Subject: [PATCH 1/4] Breath mask autotoggle Now if you have a breath mask on your face, but lowered, and decide to start running on internals, you will automatically adjust the mask back on your face! --- code/_onclick/hud/screen_objects.dm | 9 ++++++--- code/modules/clothing/clothing.dm | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 856dce11be8..b077c5183f2 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -126,13 +126,16 @@ if(!C.incapacitated()) if(C.internal) C.internal = null - C << "No longer running on internals." + C << "You are no longer running on internals." icon_state = "internal0" else if(!istype(C.wear_mask, /obj/item/clothing/mask)) - C << "You are not wearing a mask." + C << "You are not wearing a mask!" return 1 else + var/obj/item/clothing/mask/M = C.wear_mask + if(M.mask_adjusted) // if mask on face but pushed down + M.adjustmask(usr) // automatically adjust it back if(istype(C.l_hand, /obj/item/weapon/tank)) C << "You are now running on internals from the [C.l_hand] on your left hand." C.internal = C.l_hand @@ -162,7 +165,7 @@ if(C.internal) icon_state = "internal1" else - C << "You don't have an oxygen tank." + C << "You don't have an oxygen tank!" /obj/screen/mov_intent name = "run/walk toggle" diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 65205405358..4878387b59e 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -106,7 +106,7 @@ BLIND // can't see anything //Proc that moves gas/breath masks out of the way, disabling them and allowing pill/food consumption /obj/item/clothing/mask/proc/adjustmask(var/mob/user) if(!ignore_maskadjust) - if(!user.canmove || user.stat || user.restrained()) + if(user.incapacitated()) return if(src.mask_adjusted == 1) src.icon_state = initial(icon_state) @@ -131,6 +131,7 @@ BLIND // can't see anything + //Shoes /obj/item/clothing/shoes name = "shoes" From 97cbc65d6dee33b5dd8333493fc93059e8126667 Mon Sep 17 00:00:00 2001 From: kingofkosmos Date: Mon, 6 Apr 2015 10:38:51 +0300 Subject: [PATCH 2/4] usr -> C --- code/_onclick/hud/screen_objects.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index b077c5183f2..9ecc138da5f 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -135,7 +135,7 @@ else var/obj/item/clothing/mask/M = C.wear_mask if(M.mask_adjusted) // if mask on face but pushed down - M.adjustmask(usr) // automatically adjust it back + M.adjustmask(C) // automatically adjust it back if(istype(C.l_hand, /obj/item/weapon/tank)) C << "You are now running on internals from the [C.l_hand] on your left hand." C.internal = C.l_hand From f114768c1df70f18577677625def738cdbc88dda Mon Sep 17 00:00:00 2001 From: kingofkosmos Date: Wed, 8 Apr 2015 19:17:18 +0300 Subject: [PATCH 3/4] it broke --- code/_onclick/hud/screen_objects.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 9ecc138da5f..be980432f7b 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -134,6 +134,9 @@ return 1 else var/obj/item/clothing/mask/M = C.wear_mask + if( !(M.flags & MASKINTERNALS) ) + C << "You need an internals mask blahblahblah !" + return if(M.mask_adjusted) // if mask on face but pushed down M.adjustmask(C) // automatically adjust it back if(istype(C.l_hand, /obj/item/weapon/tank)) From c8931f4cfc5e7e91fedd067e5723c5bd8adb005d Mon Sep 17 00:00:00 2001 From: kingofkosmos Date: Wed, 8 Apr 2015 21:08:16 +0300 Subject: [PATCH 4/4] Only actual internals masks work now for internals. --- code/_onclick/hud/screen_objects.dm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index be980432f7b..69d9dfe534a 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -130,15 +130,15 @@ icon_state = "internal0" else if(!istype(C.wear_mask, /obj/item/clothing/mask)) - C << "You are not wearing a mask!" + C << "You are not wearing an internals mask!" return 1 else var/obj/item/clothing/mask/M = C.wear_mask - if( !(M.flags & MASKINTERNALS) ) - C << "You need an internals mask blahblahblah !" - return if(M.mask_adjusted) // if mask on face but pushed down - M.adjustmask(C) // automatically adjust it back + M.adjustmask(C) // adjust it back + if( !(M.flags & MASKINTERNALS) ) + C << "You are not wearing an internals mask!" + return if(istype(C.l_hand, /obj/item/weapon/tank)) C << "You are now running on internals from the [C.l_hand] on your left hand." C.internal = C.l_hand