From 33c23dcbe017e7510053ad021668ea6499dd89ac Mon Sep 17 00:00:00 2001 From: MarinaGryphon Date: Thu, 15 Jul 2021 07:37:08 -0500 Subject: [PATCH] Fixes #11081 --- code/modules/clothing/spacesuits/rig/rig.dm | 8 +++++--- code/modules/clothing/spacesuits/rig/rig_tgui.dm | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index cc7084341f2..baafedabe6f 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -611,7 +611,7 @@ wearer.update_inv_back() return -/obj/item/weapon/rig/proc/check_suit_access(var/mob/living/carbon/human/user) +/obj/item/weapon/rig/proc/check_suit_access(var/mob/living/carbon/human/user, var/do_message = TRUE) if(!security_check_enabled) return 1 @@ -624,11 +624,13 @@ if(user.back != src && user.belt != src) return 0 else if(!src.allowed(user)) - to_chat(user, "Unauthorized user. Access denied.") + if(do_message) + to_chat(user, "Unauthorized user. Access denied.") return 0 else if(!ai_override_enabled) - to_chat(user, "Synthetic access disabled. Please consult hardware provider.") + if(do_message) + to_chat(user, "Synthetic access disabled. Please consult hardware provider.") return 0 return 1 diff --git a/code/modules/clothing/spacesuits/rig/rig_tgui.dm b/code/modules/clothing/spacesuits/rig/rig_tgui.dm index 7f34fe11b84..0a493264e59 100644 --- a/code/modules/clothing/spacesuits/rig/rig_tgui.dm +++ b/code/modules/clothing/spacesuits/rig/rig_tgui.dm @@ -30,7 +30,7 @@ */ /obj/item/weapon/rig/tgui_status(mob/user, datum/tgui_state/state) . = ..() - if(!check_suit_access(user)) + if(!check_suit_access(user, FALSE)) // don't send a message to the user, this is a UI thing // Forces the UI to never go interactive, // but doesn't interfere with state saying to close. . = min(., STATUS_UPDATE)