From e88d474fc0636326204ebaab1a5a2345abe359f9 Mon Sep 17 00:00:00 2001 From: Shadowlight213 Date: Thu, 25 Aug 2016 12:58:00 -0700 Subject: [PATCH] Improves the handling of unlimited silicon privileges for admin ai interact a bit. --- code/modules/admin/admin_verbs.dm | 15 +++++++++------ code/modules/mob/dead/observer/login.dm | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 7a9918b9cdc..3b64aa6a72c 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -675,10 +675,13 @@ var/list/admin_verbs_hideable = list( while (!area && --j > 0) /client/proc/toggle_AI_interact() - set name = "Toggle Admin AI Interact" - set category = "Admin" - set desc = "Allows you to interact with most machines as an AI would as a ghost" + set name = "Toggle Admin AI Interact" + set category = "Admin" + set desc = "Allows you to interact with most machines as an AI would as a ghost" - AI_Interact = !AI_Interact - log_admin("[key_name(usr)] has [AI_Interact ? "activated" : "deactivated"] Admin AI Interact") - message_admins("[key_name_admin(usr)] has [AI_Interact ? "activated" : "deactivated"] their AI interaction") + AI_Interact = !AI_Interact + if(mob && IsAdminGhost(mob)) + mob.has_unlimited_silicon_privilege = AI_Interact + + log_admin("[key_name(usr)] has [AI_Interact ? "activated" : "deactivated"] Admin AI Interact") + message_admins("[key_name_admin(usr)] has [AI_Interact ? "activated" : "deactivated"] their AI interaction") diff --git a/code/modules/mob/dead/observer/login.dm b/code/modules/mob/dead/observer/login.dm index bd9bd81d748..1ada14b84be 100644 --- a/code/modules/mob/dead/observer/login.dm +++ b/code/modules/mob/dead/observer/login.dm @@ -5,7 +5,7 @@ ghost_others = client.prefs.ghost_others var/preferred_form = null - if(check_rights(R_ADMIN, 0)) + if(IsAdminGhost(src)) has_unlimited_silicon_privilege = 1 if(client.prefs.unlock_content)