diff --git a/code/WorkInProgress/Chinsky/overmap/helm.dm b/code/WorkInProgress/Chinsky/overmap/helm.dm
index a441f57f6dd..b5306b3f366 100644
--- a/code/WorkInProgress/Chinsky/overmap/helm.dm
+++ b/code/WorkInProgress/Chinsky/overmap/helm.dm
@@ -1,7 +1,12 @@
/obj/machinery/computer/helm
name = "helm control console"
icon_state = "id"
- var/obj/effect/mapinfo/linked //connected overmap object
+ var/obj/effect/map/ship/linked //connected overmap object
+ var/autopilot = 0
+ var/manual_control = 0
+ var/dx //desitnation
+ var/dy //coordinates
+
/obj/machinery/computer/helm/initialize()
linked = map_sectors["[z]"]
@@ -11,30 +16,104 @@
testing("Helm console at level [z] found a corresponding overmap object '[linked.name]'.")
/obj/machinery/computer/helm/relaymove(var/mob/user, direction)
- if(linked)
+ if(manual_control && linked)
linked.relaymove(user,direction)
return 1
/obj/machinery/computer/helm/check_eye(var/mob/user as mob)
- if (get_dist(user, src) > 1 || user.blinded || !linked )
+ if (!manual_control)
+ return null
+ if (!get_dist(user, src) > 1 || user.blinded || !linked )
return null
user.reset_view(linked)
return 1
/obj/machinery/computer/helm/attack_hand(var/mob/user as mob)
- if(!linked)
- user << "Could not get navigation data!"
- return
-
- if(stat & (NOPOWER|BROKEN))
+ if(..())
user.unset_machine()
+ manual_control = 0
return
if(!isAI(user))
user.set_machine(src)
+ var/dat = ""
+ if(!linked)
+ dat = "
Could not get navigation data!"
+ else
+ dat += ""
+ dat += "| Current sector: | [linked.current_sector ? linked.current_sector.name : "Deep Space"]"
+ dat += " |
| Sector information: | [linked.current_sector ? linked.current_sector.desc : "Not Available"]"
+ dat += " |
| Current coordinates: | \[[linked.x], [linked.y]\]"
+ dat += " |
| Current destination: | "
+ if (dx && dy)
+ dat += "\[[dx], "
+ dat += "[dy]\]"
+ else
+ dat += "None"
+ dat += " |
"
+
+ dat += "
"
+
+ dat += "Known locations:
"
+ dat += ""
+ for (var/lvl in map_sectors)
+ var/obj/effect/map/sector/S = map_sectors[lvl]
+ if (istype(S))
+ dat += "| [S.name]: | \[[S.x], [S.y]\] | Plot course |
"
+ dat += "
"
+
+ dat += "
"
+
+ dat += ""
+ user << browse("Helm Control[dat]", "window=helm")
+ onclose(user, "helm")
return
+
+/obj/machinery/computer/helm/Topic(href, href_list)
+ if(..())
+ return
+
+ if (!linked)
+ return
+
+ if (href_list["setx"])
+ var/newx = input("Input new destiniation x coordinate", "Coordinate input", dx) as num|null
+ if (newx)
+ dx = Clamp(newx, 1, world.maxx)
+
+ if (href_list["sety"])
+ var/newy = input("Input new destiniation y coordinate", "Coordinate input", dy) as num|null
+ if (newy)
+ dy = Clamp(newy, 1, world.maxy)
+
+ if (href_list["x"] && href_list["y"])
+ dx = text2num(href_list["x"])
+ dy = text2num(href_list["y"])
+
+ if (href_list["reset"])
+ dx = 0
+ dy = 0
+
+ if (href_list["apilot"])
+ autopilot = !autopilot
+ manual_control = 0
+
+ if (href_list["manual"])
+ manual_control = !manual_control
+ autopilot = 0
+
+ add_fingerprint(usr)
+ updateUsrDialog()
+
+/obj/machinery/computer/helm/process()
+ ..()
+ if (autopilot && dx && dy)
+ return
//Shuttle controller computer for shuttles going from ship to sectors
/obj/machinery/computer/shuttle_control/explore
diff --git a/code/WorkInProgress/Chinsky/overmap/sectors.dm b/code/WorkInProgress/Chinsky/overmap/sectors.dm
index bb24851affd..9c80cfc2ac2 100644
--- a/code/WorkInProgress/Chinsky/overmap/sectors.dm
+++ b/code/WorkInProgress/Chinsky/overmap/sectors.dm
@@ -99,7 +99,7 @@ var/global/list/map_sectors = list()
desc = "Space faring vessel."
icon_state = "sheet-sandstone"
density = 1
- var/current_sector
+ var/obj/effect/map/current_sector
/obj/effect/map/ship/relaymove(mob/user, direction)
step(src,direction)