From 06e07de7b4dda7906b18dd7c52e698cf3d118fe4 Mon Sep 17 00:00:00 2001 From: Watermelon914 <37270891+Watermelon914@users.noreply.github.com> Date: Mon, 13 Mar 2023 02:07:51 +0000 Subject: [PATCH] Fixes admins having access to admin functions within normal integrated circuits whilst spawned in as a player. (#73904) ## About The Pull Request Admins can currently save circuits and spawn components in whilst adminned in integrated circuits that are not considered admin only. This has been changed so that they can only access these functions when in admin AI mode or when the integrated circuit is admin only. Closes #71173 ## Why It's Good For The Game Playmins shouldn't have access to admin functions when playing the game normally. ## Changelog :cl: fix: Fixed playmins having access to admin functions within normal integrated circuits. /:cl: --- code/modules/wiremod/core/integrated_circuit.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/wiremod/core/integrated_circuit.dm b/code/modules/wiremod/core/integrated_circuit.dm index 6abd1985899..94ab49cd0f0 100644 --- a/code/modules/wiremod/core/integrated_circuit.dm +++ b/code/modules/wiremod/core/integrated_circuit.dm @@ -398,7 +398,7 @@ GLOBAL_LIST_EMPTY_TYPED(integrated_circuits, /obj/item/integrated_circuit) .["examined_rel_x"] = examined_rel_x .["examined_rel_y"] = examined_rel_y - .["is_admin"] = check_rights_for(user.client, R_VAREDIT) + .["is_admin"] = (admin_only || isAdminGhostAI(user)) && check_rights_for(user.client, R_VAREDIT) /obj/item/integrated_circuit/ui_host(mob/user) if(shell) @@ -648,7 +648,7 @@ GLOBAL_LIST_EMPTY_TYPED(integrated_circuits, /obj/item/integrated_circuit) if("print_component") var/component_path = text2path(params["component_to_print"]) var/obj/item/circuit_component/component - if(!check_rights_for(ui.user.client, R_SPAWN)) + if((!admin_only && !isAdminGhostAI(ui.user)) || !check_rights_for(ui.user.client, R_SPAWN)) var/obj/machinery/component_printer/printer = linked_component_printer?.resolve() if(!printer) balloon_alert(ui.user, "linked printer not found!")