From 44d21140da90c28db3c682ac31220b18b1a2bf1e Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Sun, 2 Jun 2024 15:35:48 +0300 Subject: [PATCH] [MIRROR] Restrict AI floor bolt external manipulation (#2781) (#3584) * Restrict AI floor bolt external manipulation (#83463) ## About The Pull Request My delayed reaction to #68451 **When an AI is alive, on main power, and not SSD its bolts cannot be raised or lowered externally thus returning some small amount of autonomy to everyone's favorite brain in a box.** I tested to be sure this change does not interfere with (de)construction or other tool actions besides their "must be anchored" requirements. Should maintainers wish I can adjust the check to allow external lowering, but not raising, of the bolts anytime to satisfy those scenarios. I decided to include "is on backup power (incapacitated)" in the check as a middle ground so when moving an AI from a bombed sat or the like anyone who is now used to being able to wrench for a rescue is not caught off guard since AI gets a harsh penalty for moving bolts on backup power (most likely overlooked in the original PR). This also means if you really want to move an active AI Core against its will you still have a path forward aside from _convincing_ the AI to raise them voluntarily. ## Why It's Good For The Game IMO this sort of check should have been included in the original changes, or at least made to post the anchor status message to the AI's chat rather than a balloon they are likely to miss. An incapacitated AI is much more likely to be watching their core. In the grand scheme this changes very little for anyone out to get an AI since they will most likely just card or smash it to death anyway. It's mostly just good for a little silicon piece of mind. ## Changelog :cl: balance: When an AI is alive, on main power, and not SSD its bolts cannot be raised or lowered externally. /:cl: * Restrict AI floor bolt external manipulation --------- Co-authored-by: NovaBot <154629622+NovaBot13@users.noreply.github.com> Co-authored-by: Wayland-Smithy <64715958+Wayland-Smithy@users.noreply.github.com> Co-authored-by: NovaBot13 --- code/modules/mob/living/silicon/ai/ai_defense.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/mob/living/silicon/ai/ai_defense.dm b/code/modules/mob/living/silicon/ai/ai_defense.dm index a80b84b95aa..7dea684e569 100644 --- a/code/modules/mob/living/silicon/ai/ai_defense.dm +++ b/code/modules/mob/living/silicon/ai/ai_defense.dm @@ -64,6 +64,10 @@ . = ..() if(user.combat_mode) return + if(stat != DEAD && !incapacitated() && (client || deployed_shell?.client)) + // alive and well AIs control their floor bolts + balloon_alert(user, "the AI's bolt motors resist.") + return ITEM_INTERACT_SUCCESS balloon_alert(user, "[!is_anchored ? "tightening" : "loosening"] bolts...") balloon_alert(src, "bolts being [!is_anchored ? "tightened" : "loosened"]...") if(!tool.use_tool(src, user, 4 SECONDS))