diff --git a/code/modules/shuttle/navigation_computer.dm b/code/modules/shuttle/navigation_computer.dm index 68e2e58dd59..70a1457c8be 100644 --- a/code/modules/shuttle/navigation_computer.dm +++ b/code/modules/shuttle/navigation_computer.dm @@ -135,6 +135,13 @@ to_chat(current_user, "Unknown object detected in landing zone. Please designate another location.") return + ///Make one use port that deleted after fly off, to don't lose info that need on to properly fly off. + if(my_port && my_port.get_docked()) + my_port.delete_after = TRUE + my_port.id = null + my_port.name = "Old [my_port.name]" + my_port = null + if(!my_port) my_port = new() my_port.name = shuttlePortName diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index 02df514908e..5be23f5a9d0 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -23,6 +23,8 @@ var/area_type var/hidden = FALSE //are we invisible to shuttle navigation computers? + var/delete_after = FALSE ///Delete this port after ship fly off. + //these objects are indestructible /obj/docking_port/Destroy(force) // unless you assert that you know what you're doing. Horrible things @@ -432,7 +434,10 @@ if(initiate_docking(S1) != DOCKING_SUCCESS) WARNING("shuttle \"[id]\" could not enter transit space. Docked at [S0 ? S0.id : "null"]. Transit dock [S1 ? S1.id : "null"].") else - previous = S0 + if(S0.delete_after) + qdel(S0, TRUE) + else + previous = S0 else WARNING("shuttle \"[id]\" could not enter transit space. S0=[S0 ? S0.id : "null"] S1=[S1 ? S1.id : "null"]")