From 027e14d30d2c200b9e2d0090696adf1da7b0e4b7 Mon Sep 17 00:00:00 2001 From: mikomyazaki Date: Thu, 7 Apr 2022 19:19:55 +0100 Subject: [PATCH] AI/borgs cannot pilot ships. They can only look at the consoles. --- code/modules/overmap/ships/computers/helm.dm | 31 ++++++++++++-------- code/modules/overmap/ships/computers/ship.dm | 6 ++++ 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/code/modules/overmap/ships/computers/helm.dm b/code/modules/overmap/ships/computers/helm.dm index 7f694a011d1..8ea48799416 100644 --- a/code/modules/overmap/ships/computers/helm.dm +++ b/code/modules/overmap/ships/computers/helm.dm @@ -217,30 +217,35 @@ dx = 0 dy = 0 + if (href_list["manual"]) + viewing_overmap(usr) ? unlook(usr) : look(usr) + if (href_list["speedlimit"]) var/newlimit = input("Input new speed limit for autopilot (0 to brake)", "Autopilot speed limit", speedlimit*1000) as num|null if(newlimit) speedlimit = Clamp(newlimit/1000, 0, 100) + if (href_list["accellimit"]) var/newlimit = input("Input new acceleration limit", "Acceleration limit", accellimit*1000) as num|null if(newlimit) accellimit = max(newlimit/1000, 0) - if (href_list["move"]) - var/ndir = text2num(href_list["move"]) - linked.relaymove(usr, ndir, accellimit) - addtimer(CALLBACK(src, .proc/updateUsrDialog), linked.burn_delay + 1) // remove when turning into vueui + if(!issilicon(usr)) // AI and robots aren't allowed to pilot + if (href_list["move"]) + var/ndir = text2num(href_list["move"]) + linked.relaymove(usr, ndir, accellimit) + addtimer(CALLBACK(src, .proc/updateUsrDialog), linked.burn_delay + 1) // remove when turning into vueui - if (href_list["brake"]) - linked.decelerate() - addtimer(CALLBACK(src, .proc/updateUsrDialog), linked.burn_delay + 1) // remove when turning into vueui + if (href_list["brake"]) + linked.decelerate() + addtimer(CALLBACK(src, .proc/updateUsrDialog), linked.burn_delay + 1) // remove when turning into vueui - if (href_list["apilot"]) - autopilot = !autopilot - check_processing() - - if (href_list["manual"]) - viewing_overmap(usr) ? unlook(usr) : look(usr) + if (href_list["apilot"]) + autopilot = !autopilot + check_processing() + else + to_chat(usr, SPAN_WARNING("Your software does not allow you to interact with the piloting controls.")) + return TOPIC_HANDLED add_fingerprint(usr) updateUsrDialog() diff --git a/code/modules/overmap/ships/computers/ship.dm b/code/modules/overmap/ships/computers/ship.dm index 24dfd05769e..9530ff25241 100644 --- a/code/modules/overmap/ships/computers/ship.dm +++ b/code/modules/overmap/ships/computers/ship.dm @@ -19,6 +19,12 @@ somewhere on that shuttle. Subtypes of these can be then used to perform ship ov user.set_machine(src) ui_interact(user) +/obj/machinery/computer/ship/attack_ai(mob/user) + if(!ai_can_interact(user)) + return + src.add_hiddenprint(user) + ui_interact(user) + /obj/machinery/computer/ship/Topic(href, href_list) if(..()) return TOPIC_HANDLED