mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 13:39:16 +01:00
Fixes #11081
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user