mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 04:22:39 +01:00
Helm Control tgui - visual bearing and direction (#16892)
* a * b * c * d * e * f * g * h * data.locations * fixed * gui * red roll buttons * roll and turn switch positions * stuff * c * a * tgui lints --------- Co-authored-by: DreamySkrell <>
This commit is contained in:
co-authored by
DreamySkrell <>
parent
827db0bece
commit
516f920f1e
@@ -120,14 +120,15 @@
|
||||
data["sector"] = current_sector ? current_sector.name : "Deep Space"
|
||||
data["sector_info"] = current_sector ? current_sector.desc : "Not Available"
|
||||
data["landed"] = connected.get_landed_info()
|
||||
data["s_x"] = connected.x
|
||||
data["s_y"] = connected.y
|
||||
data["ship_coord_x"] = connected.x
|
||||
data["ship_coord_y"] = connected.y
|
||||
data["dest"] = dy && dx
|
||||
data["d_x"] = dx
|
||||
data["d_y"] = dy
|
||||
data["autopilot_x"] = dx
|
||||
data["autopilot_y"] = dy
|
||||
data["speedlimit"] = speedlimit ? speedlimit*1000 : "Halted"
|
||||
data["accel"] = get_acceleration()
|
||||
data["heading"] = connected.get_heading() ? dir2angle(connected.get_heading()) : 0
|
||||
data["direction"] = dir2angle(connected.dir)
|
||||
data["autopilot"] = autopilot
|
||||
data["manual_control"] = viewing_overmap(user)
|
||||
data["canburn"] = connected.can_burn()
|
||||
@@ -142,6 +143,9 @@
|
||||
data["speed_slow"] = TRUE
|
||||
if(connected.get_speed() > SHIP_SPEED_FAST)
|
||||
data["speed_fast"] = TRUE
|
||||
var/list/speed_xy = connected.get_speed_xy()
|
||||
data["ship_speed_x"] = speed_xy[1]
|
||||
data["ship_speed_y"] = speed_xy[2]
|
||||
|
||||
data["ETAnext"] = get_eta()
|
||||
|
||||
|
||||
@@ -125,6 +125,10 @@ var/const/OVERMAP_SPEED_CONSTANT = (1 SECOND)
|
||||
/obj/effect/overmap/visitable/ship/proc/get_speed()
|
||||
return round(sqrt(speed[1] ** 2 + speed[2] ** 2), SHIP_MOVE_RESOLUTION)
|
||||
|
||||
// returns a two-item list with the speed of the ship on x and y axes
|
||||
/obj/effect/overmap/visitable/ship/proc/get_speed_xy()
|
||||
return list(round(speed[1], SHIP_MOVE_RESOLUTION), round(speed[2], SHIP_MOVE_RESOLUTION))
|
||||
|
||||
/obj/effect/overmap/visitable/ship/proc/get_heading()
|
||||
var/res = 0
|
||||
if(MOVING(speed[1]))
|
||||
|
||||
Reference in New Issue
Block a user