Shuttle unit test + bugfix (#13578)

This commit is contained in:
mikomyazaki
2022-04-20 22:15:27 +02:00
committed by GitHub
parent e59589ec8a
commit 692bef4a37
10 changed files with 77 additions and 5 deletions
+9 -1
View File
@@ -99,6 +99,14 @@
fuel_to_consume -= fuel_available
FT.remove_air_by_flag(XGM_GAS_FUEL, fuel_available)
/datum/shuttle/autodock/overmap/on_move_interim()
..()
for(var/obj/machinery/computer/shuttle_control/explore/E in shuttle_computers)
var/obj/effect/overmap/visitable/ship/S = E.linked
if(S)
S.halt()
S.unhalt()
/obj/structure/fuel_port
name = "fuel port"
desc = "The fuel input port of the shuttle. Holds one fuel tank. Use a crowbar to open and close it."
@@ -156,4 +164,4 @@
/obj/structure/fuel_port/hide()
return
#undef waypoint_sector
#undef waypoint_sector
@@ -3,6 +3,17 @@
name = "general shuttle control console"
ui_template = "shuttle_control_console_exploration.tmpl"
/obj/machinery/computer/shuttle_control/explore/attempt_hook_up(obj/effect/overmap/visitable/ship/sector)
. = ..()
if(.)
LAZYSET(linked.consoles, src, TRUE)
/obj/machinery/computer/shuttle_control/explore/Destroy()
if(linked)
LAZYREMOVE(linked.consoles, src)
. = ..()
/obj/machinery/computer/shuttle_control/explore/get_ui_data(var/datum/shuttle/autodock/overmap/shuttle)
. = ..()
if(istype(shuttle))
+5
View File
@@ -49,6 +49,9 @@ var/const/OVERMAP_SPEED_CONSTANT = (1 SECOND)
for(var/obj/machinery/computer/ship/S in SSmachinery.all_machines)
if(S.linked == src)
S.linked = null
for(var/obj/machinery/computer/shuttle_control/explore/C in SSmachinery.all_machines)
if(C.linked == src)
C.linked = null
for(var/obj/machinery/hologram/holopad/H as anything in SSmachinery.all_holopads)
if(H.linked == src)
H.linked = null
@@ -241,6 +244,8 @@ var/const/OVERMAP_SPEED_CONSTANT = (1 SECOND)
..()
for(var/obj/machinery/computer/ship/S in SSmachinery.all_machines)
S.attempt_hook_up(src)
for(var/obj/machinery/computer/shuttle_control/explore/C in SSmachinery.all_machines)
C.attempt_hook_up(src)
for(var/obj/machinery/hologram/holopad/H as anything in SSmachinery.all_holopads)
H.attempt_hook_up(src)
for(var/datum/ship_engine/E in ship_engines)