Makes shuttle docks keep track of their position to ensure that shuttle catastrophe does not cause a random crashlanding (#92492)

## About The Pull Request

- Closes #92444

## Changelog
🆑
fix: Shuttle catastrophe should no longer cause random unintended
crashlandings
/🆑
This commit is contained in:
SmArtKar
2025-08-11 20:32:05 +02:00
committed by GitHub
parent 94f8f8feea
commit 703fdcc51c
2 changed files with 16 additions and 1 deletions
@@ -54,6 +54,13 @@
return
SSshuttle.shuttle_purchased = SHUTTLEPURCHASE_FORCED
SSshuttle.unload_preview()
// We need to move our docking port back in case a crashlanding shuttle has been purchased previously
for(var/obj/docking_port/stationary/port as anything in SSshuttle.stationary_docking_ports)
if(port.shuttle_id != "emergency_home")
continue
var/turf/initial_loc = locate(port.initial_x, port.initial_y, port.initial_z)
port.forceMove(initial_loc)
break
SSshuttle.existing_shuttle = SSshuttle.emergency
SSshuttle.action_load(new_shuttle, replace = TRUE)
log_shuttle("Shuttle Catastrophe set a new shuttle, [new_shuttle.name].")