From 6709483aecf5fb9b29076fc53819933bb9e01e60 Mon Sep 17 00:00:00 2001 From: Linzolle Date: Fri, 21 Jun 2019 23:06:53 -0500 Subject: [PATCH 1/2] allows quick maxing of suit sensors --- code/modules/clothing/clothing.dm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 746d5da60d..caaca3958a 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -216,6 +216,34 @@ BLIND // can't see anything ..() +/obj/item/clothing/under/CtrlClick(mob/user) + if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user))) + return + + var/mob/M = user + if (istype(M, /mob/dead/)) + return + if (!can_use(M)) + return + if(src.has_sensor == LOCKED_SENSORS) + to_chat(usr, "The controls are locked.") + return 0 + if(src.has_sensor == BROKEN_SENSORS) + to_chat(usr, "The sensors have shorted out!") + return 0 + if(src.has_sensor <= NO_SENSORS) + to_chat(usr, "This suit does not have any sensors.") + return 0 + + sensor_mode = 3 + + to_chat(usr, "Your suit will now report your exact vital lifesigns as well as your coordinate position.") + + if(ishuman(loc)) + var/mob/living/carbon/human/H = loc + if(H.w_uniform == src) + H.update_suit_sensors() + /obj/item/clothing/under/AltClick(mob/user) if(..()) return 1 From 846f6789da54d00011c1afbdc3e62cbe18f05cd9 Mon Sep 17 00:00:00 2001 From: Linzolle Date: Sat, 22 Jun 2019 11:05:34 -0500 Subject: [PATCH 2/2] suggested changes --- code/modules/clothing/clothing.dm | 34 +++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index caaca3958a..767b700051 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -217,30 +217,30 @@ BLIND // can't see anything ..() /obj/item/clothing/under/CtrlClick(mob/user) - if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user))) + . = ..() + + if (!(item_flags & IN_INVENTORY)) return - var/mob/M = user - if (istype(M, /mob/dead/)) + if(!isliving(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user))) return - if (!can_use(M)) + + if(has_sensor == LOCKED_SENSORS) + to_chat(user, "The controls are locked.") + return + if(has_sensor == BROKEN_SENSORS) + to_chat(user, "The sensors have shorted out!") + return + if(has_sensor <= NO_SENSORS) + to_chat(user, "This suit does not have any sensors.") return - if(src.has_sensor == LOCKED_SENSORS) - to_chat(usr, "The controls are locked.") - return 0 - if(src.has_sensor == BROKEN_SENSORS) - to_chat(usr, "The sensors have shorted out!") - return 0 - if(src.has_sensor <= NO_SENSORS) - to_chat(usr, "This suit does not have any sensors.") - return 0 - sensor_mode = 3 + sensor_mode = SENSOR_COORDS - to_chat(usr, "Your suit will now report your exact vital lifesigns as well as your coordinate position.") + to_chat(user, "Your suit will now report your exact vital lifesigns as well as your coordinate position.") - if(ishuman(loc)) - var/mob/living/carbon/human/H = loc + if(ishuman(user)) + var/mob/living/carbon/human/H = user if(H.w_uniform == src) H.update_suit_sensors()