diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 6b546345398..e1abd1fb8d1 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -297,18 +297,6 @@ Turf and target are seperate in case you want to teleport some distance from a t . += A return . -/proc/active_ais_samezlevel(/mob/M) - . = list() - for(var/mob/living/silicon/ai/A in living_mob_list) - if(A.stat == DEAD) - continue - if(A.control_disabled == 1) - continue - if(A.z != M.z) - continue - . += A - return . - //Find an active ai with the least borgs. VERBOSE PROCNAME HUH! /proc/select_active_ai_with_fewest_borgs() var/mob/living/silicon/ai/selected @@ -320,7 +308,7 @@ Turf and target are seperate in case you want to teleport some distance from a t return selected /proc/select_active_ai(var/mob/user) - var/list/ais = active_ais_samezlevel(user) + var/list/ais = active_ais(user) if(ais.len) if(user) . = input(usr,"AI signals detected:", "AI selection") in ais else . = pick(ais) diff --git a/code/game/machinery/computer/law.dm b/code/game/machinery/computer/law.dm index 125a5fc06ad..c592ea401de 100644 --- a/code/game/machinery/computer/law.dm +++ b/code/game/machinery/computer/law.dm @@ -29,10 +29,11 @@ attackby(obj/item/weapon/O as obj, mob/user as mob, params) - if(is_away_level(user.z)) - to_chat(user, "Unable to establish a connection: You're too far away from the station!") - return if(istype(O, /obj/item/weapon/aiModule)) + var/turf/T = get_turf(current) + if(T.z != z) + to_chat(user, "Unable to establish a connection: You're too far away from the target silicon!") + return var/datum/game_mode/nations/mode = get_nations_mode() if(!mode) var/obj/item/weapon/aiModule/M = O @@ -74,6 +75,10 @@ attackby(obj/item/weapon/aiModule/module as obj, mob/user as mob, params) if(istype(module, /obj/item/weapon/aiModule)) + var/turf/T = get_turf(current) + if(T.z != z) + to_chat(user, "Unable to establish a connection: You're too far away from the target silicon!") + return var/datum/game_mode/nations/mode = get_nations_mode() if(!mode) module.install(src) diff --git a/code/modules/computer3/computers/law.dm b/code/modules/computer3/computers/law.dm index 534efe3a9eb..f76158d86e5 100644 --- a/code/modules/computer3/computers/law.dm +++ b/code/modules/computer3/computers/law.dm @@ -24,10 +24,11 @@ attackby(obj/item/weapon/aiModule/module as obj, mob/user as mob, params) - if(is_away_level(user.z)) - to_chat(user, "Unable to establish a connection: You're too far away from the station!") - return if(istype(module, /obj/item/weapon/aiModule)) + var/turf/T = get_turf(current) + if(T.z != z) + to_chat(user, "Unable to establish a connection: You're too far away from the target silicon!") + return module.install(src) else return ..() @@ -60,8 +61,9 @@ attackby(obj/item/weapon/aiModule/module as obj, mob/user as mob, params) if(istype(module, /obj/item/weapon/aiModule)) - if(is_away_level(user.z)) - to_chat(user, "Unable to establish a connection: You're too far away from the station!") + var/turf/T = get_turf(current) + if(T.z != z) + to_chat(user, "Unable to establish a connection: You're too far away from the target silicon!") return module.install(src) else