From 03a10cf8e298b13cc97844d822672f18adfcb518 Mon Sep 17 00:00:00 2001 From: Poojawa Date: Mon, 5 Dec 2022 10:57:12 -0600 Subject: [PATCH] Fixes #14124 Resolves issues relating to a lazy Z-level check, which did not account for the fact that borgs in inventory are null spaced, thus, not a valid Z-level Closes #14124 --- .../mob/living/silicon/ai/ai_remote_control.dm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/silicon/ai/ai_remote_control.dm b/code/modules/mob/living/silicon/ai/ai_remote_control.dm index ac092ed693e..6fdbbbe4a93 100644 --- a/code/modules/mob/living/silicon/ai/ai_remote_control.dm +++ b/code/modules/mob/living/silicon/ai/ai_remote_control.dm @@ -24,10 +24,20 @@ return var/list/possible = list() - for(var/mob/living/silicon/robot/R as anything in GLOB.available_ai_shells) - if(R.shell && !R.deployed && (R.stat != DEAD) && (!R.connected_ai || (R.connected_ai == src) ) && !(using_map.ai_shell_restricted && !(R.z in using_map.ai_shell_allowed_levels)) ) //VOREStation Edit: shell restrictions - possible += R + if(R.shell && !R.deployed && (R.stat != DEAD) && (!R.connected_ai || (R.connected_ai == src) ) ) //VOREStation Edit: shell restrictions + if(istype(R.loc, /obj/machinery/recharge_station)) //Check Rechargers + var/obj/machinery/recharge_station/RS = R.loc + if(!(using_map.ai_shell_restricted && !(RS.z in using_map.ai_shell_allowed_levels))) //Allow station borgs to be redeployed from Chargers. + possible += R + + if(isbelly(R.loc)) //check belly space + var/obj/belly/B = R.loc + if(!(using_map.ai_shell_restricted && !(B.owner.z in using_map.ai_shell_allowed_levels))) //No smuggling in borgs + possible += R + + if(!(using_map.ai_shell_restricted && !(R.z in using_map.ai_shell_allowed_levels))) + possible += R if(!LAZYLEN(possible)) to_chat(src, span("warning", "No usable AI shell beacons detected."))