This commit is contained in:
MarinaGryphon
2021-07-15 07:37:08 -05:00
parent 58e27b70ec
commit 33c23dcbe0
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -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, "<span class='danger'>Unauthorized user. Access denied.</span>")
if(do_message)
to_chat(user, "<span class='danger'>Unauthorized user. Access denied.</span>")
return 0
else if(!ai_override_enabled)
to_chat(user, "<span class='danger'>Synthetic access disabled. Please consult hardware provider.</span>")
if(do_message)
to_chat(user, "<span class='danger'>Synthetic access disabled. Please consult hardware provider.</span>")
return 0
return 1
@@ -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)