Fixes emergency pods not working (#69892)

* Fixes emergency pods not working

* ``get_control_console()`` currently doesn't work because it's runtiming instead of properly finding the shuttle computer, which would cause pod's request() to return and call parent, but parent handles sending the pods off, so I fixed it by not calling parent if they didn't have a console, and also fixed it finding its console.

* wtf emagged shuttles can just go?

* replaces || with &&
This commit is contained in:
John Willard
2022-09-15 08:32:09 -04:00
committed by GitHub
parent 63dbdc672e
commit 528ade4e12
2 changed files with 11 additions and 11 deletions
+6 -7
View File
@@ -579,14 +579,13 @@
/obj/docking_port/mobile/pod/request(obj/docking_port/stationary/S)
var/obj/machinery/computer/shuttle/connected_computer = get_control_console()
if(!istype(connected_computer, /obj/machinery/computer/shuttle/pod))
return ..()
if(SSsecurity_level.get_current_level_as_number() >= SEC_LEVEL_RED || (connected_computer && (connected_computer.obj_flags & EMAGGED)))
if(launch_status == UNLAUNCHED)
launch_status = EARLY_LAUNCHED
return ..()
else
return FALSE
if(!(SSsecurity_level.get_current_level_as_number() >= SEC_LEVEL_RED) && !(connected_computer.obj_flags & EMAGGED))
to_chat(usr, span_warning("Escape pods will only launch during \"Code Red\" security alert."))
return TRUE
return FALSE
if(launch_status == UNLAUNCHED)
launch_status = EARLY_LAUNCHED
return ..()
/obj/docking_port/mobile/pod/cancel()
return
+5 -4
View File
@@ -904,10 +904,11 @@
// attempts to locate /obj/machinery/computer/shuttle with matching ID inside the shuttle
/obj/docking_port/mobile/proc/get_control_console()
for(var/area/shuttle/shuttle_area as anything in shuttle_areas)
for(var/obj/machinery/computer/shuttle/shuttle_computers as anything in shuttle_area)
if(shuttle_computers.shuttleId != shuttle_id)
continue
return shuttle_computers
var/obj/machinery/computer/shuttle/shuttle_computer = locate(/obj/machinery/computer/shuttle) in shuttle_area
if(!shuttle_computer)
continue
if(shuttle_computer.shuttleId == shuttle_id)
return shuttle_computer
return null
/obj/docking_port/mobile/proc/hyperspace_sound(phase, list/areas)