From f94e65c971345e2cea8425bc699646dfbb36fbe2 Mon Sep 17 00:00:00 2001 From: Rhials Date: Thu, 12 Jan 2023 23:06:31 -0500 Subject: [PATCH] Fixes a runtime with BotKeeper and observers (#72631) ## About The Pull Request Viewing the botkeeper app on an open computer as an observer would cause a runtime. check_access runtimes when passed something that isn't a mob/living, so an observer who opens the UI would be passed into check_access for every bot on station, causing runtimes. ![image](https://user-images.githubusercontent.com/28870487/211671642-7461229d-16e0-42c4-a64f-35f8d95a65c7.png) ## Why It's Good For The Game This runtime fix was brought to you by [https://runtimes.moth.fans/runtime/](https://runtimes.moth.fans/runtime) ## Changelog :cl: fix: viewing the botkeeper app as an observer will no longer runtime. /:cl: --- code/modules/mob/living/simple_animal/bot/bot.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 41e2e61507b..dee375cf5ac 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -213,6 +213,8 @@ return TRUE if(!(bot_cover_flags & BOT_COVER_LOCKED)) // Unlocked. return TRUE + if(!istype(user)) // Non-living mobs shouldn't be manipulating bots (like observes using the botkeeper UI). + return FALSE var/obj/item/card/id/used_id = id || user.get_idcard(TRUE)