From a1c52dcb22684cf3c67b98cbfe0034f73819be8d Mon Sep 17 00:00:00 2001 From: TDSSS <32099540+TDSSS@users.noreply.github.com> Date: Sat, 6 Apr 2019 00:07:13 +0200 Subject: [PATCH] More helpful error message when uploading laws --- code/game/machinery/computer/law.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/game/machinery/computer/law.dm b/code/game/machinery/computer/law.dm index e0969555ce9..20825711b54 100644 --- a/code/game/machinery/computer/law.dm +++ b/code/game/machinery/computer/law.dm @@ -28,6 +28,9 @@ attackby(obj/item/O as obj, mob/user as mob, params) if(istype(O, /obj/item/aiModule)) + if(!current)//no AI selected + to_chat(user, "No AI selected. Please chose a target before proceeding with upload.") + return var/turf/T = get_turf(current) if(!atoms_share_level(T, src)) to_chat(user, "Unable to establish a connection: You're too far away from the target silicon!") @@ -73,6 +76,9 @@ attackby(obj/item/aiModule/module as obj, mob/user as mob, params) if(istype(module, /obj/item/aiModule)) + if(!current)//no borg selected + to_chat(user, "No borg selected. Please chose a target before proceeding with upload.") + return var/turf/T = get_turf(current) if(!atoms_share_level(T, src)) to_chat(user, "Unable to establish a connection: You're too far away from the target silicon!")