From e5f8a566bdc7b95fd99d96e1d36e8d6658c58a9f Mon Sep 17 00:00:00 2001 From: Bloop <13398309+vinylspiders@users.noreply.github.com> Date: Mon, 7 Apr 2025 05:02:28 -0400 Subject: [PATCH] Fixes AI detector runtiming when it finds machine-users (#90448) ## About The Pull Request Fixes this runtime ![image](https://github.com/user-attachments/assets/eef1887e-52ae-4db6-8742-ccb66a791482) That list can contain non-AI cameras which I don't think was the intention at all. So we add typechecking to ensure we aren't trying to check a var that doesn't exist. ## Why It's Good For The Game More reliable AI detection tools hopefully ## Changelog :cl: fix: fixes the AI detector breaking if there is a machinery-camera operating user nearby (like xenobio console or camera console for instance) /:cl: --- code/game/objects/items/devices/multitool.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index bc3a12a4fe5..bede2c3328b 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -205,7 +205,7 @@ var/turf/our_turf = get_turf(src) detect_state = PROXIMITY_NONE - for(var/mob/eye/camera/ai/AI_eye as anything in GLOB.camera_eyes) + for(var/mob/eye/camera/ai/AI_eye in GLOB.camera_eyes) if(!AI_eye.ai_detector_visible) continue