[MIRROR] Fixes Build Your Own Shuttle kit [MDB IGNORE] (#16401)

* Fixes Build Your Own Shuttle kit

* Update code/modules/shuttle/shuttle.dm

Co-authored-by: VexingRaven <msgerbs@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-09-25 03:43:04 +02:00
committed by GitHub
parent 93c4d8476e
commit 25c911c3cc
3 changed files with 18 additions and 1 deletions

View File

@@ -825,6 +825,8 @@ SUBSYSTEM_DEF(shuttle)
preview_shuttle.timer = timer preview_shuttle.timer = timer
preview_shuttle.mode = mode preview_shuttle.mode = mode
preview_shuttle.postregister(replace)
// TODO indicate to the user that success happened, rather than just // TODO indicate to the user that success happened, rather than just
// blanking the modification tab // blanking the modification tab
preview_shuttle = null preview_shuttle = null

View File

@@ -762,7 +762,7 @@
SSshuttle.backup_shuttle = null SSshuttle.backup_shuttle = null
return ..() return ..()
/obj/docking_port/mobile/emergency/shuttle_build/register() /obj/docking_port/mobile/emergency/shuttle_build/postregister()
. = ..() . = ..()
initiate_docking(SSshuttle.getDock("emergency_home")) initiate_docking(SSshuttle.getDock("emergency_home"))

View File

@@ -434,6 +434,12 @@
var/admin_forced = FALSE //SKYRAT EDIT ADDITION var/admin_forced = FALSE //SKYRAT EDIT ADDITION
/**
* Actions to be taken after shuttle is loaded but before it has been moved out of transit z-level to its final location
*
* Arguments:
* * replace - TRUE if this shuttle is replacing an existing one. FALSE by default.
*/
/obj/docking_port/mobile/register(replace = FALSE) /obj/docking_port/mobile/register(replace = FALSE)
. = ..() . = ..()
if(!shuttle_id) if(!shuttle_id)
@@ -456,6 +462,15 @@
SSshuttle.mobile_docking_ports += src SSshuttle.mobile_docking_ports += src
/**
* Actions to be taken after shuttle is loaded and has been moved to its final location
*
* Arguments:
* * replace - TRUE if this shuttle is replacing an existing one. FALSE by default.
*/
/obj/docking_port/mobile/proc/postregister(replace = FALSE)
return
/obj/docking_port/mobile/unregister() /obj/docking_port/mobile/unregister()
. = ..() . = ..()
SSshuttle.mobile_docking_ports -= src SSshuttle.mobile_docking_ports -= src