AI/borgs cannot pilot ships. They can only look at the consoles.

This commit is contained in:
mikomyazaki
2022-04-07 19:19:55 +01:00
parent 835979172e
commit 027e14d30d
2 changed files with 24 additions and 13 deletions
+18 -13
View File
@@ -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()
@@ -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