I found an issue on a local fork during testing that some weird behaviour can occur when calling initiate docking outside of the shuttle subsystem. initiate_docking can sleep, which means the shuttle subsystem can run while initiate docking is in the process of happening. This means that in rare occassions, the transit port attached to a shuttle can be deleted while it is halfway through docking with the other shuttle.
When this occurs, non deterministic behaviour arrises which either:
Fully deletes the shuttle (The shuttle seems to be outside of the transit zone for some reason?)
Half of the shuttle gets deleted (I have no idea why this happens, in theory the shuttle should be fully contained with in the dock)
Doesn't delete the shuttle at all (SSshuttle transit reset doens't fire during docking, or CHECK_TICK doesnt fire)
I should mention that I fixed this by creating a new variable on the mobile port called is_moving, and if the port is moving don't allow its transit port to be cleared. This fixed the issue.
I found an issue on a local fork during testing that some weird behaviour can occur when calling initiate docking outside of the shuttle subsystem. initiate_docking can sleep, which means the shuttle subsystem can run while initiate docking is in the process of happening. This means that in rare occassions, the transit port attached to a shuttle can be deleted while it is halfway through docking with the other shuttle. When this occurs, non deterministic behaviour arrises which either: