Surface-attached parts disallow transfer after breaking symmetry
mwerle opened this issue ยท 2 comments
A forum user reported problems with surface-attached parts from the SSPX mod.
Further investigation seemed to indicate that breaking symmetry (eg, by re-rooting) broke CLS. Needs further investigation.
Follow the thread for several posts here:
https://forum.kerbalspaceprogram.com/index.php?/topic/192130-191-connected-living-spaces-adopted-2005-2020-06-15/&do=findComment&comment=3790717
Did some investigation.
If a surface-attached part which does not itself allow surface-attached parts to pass becomes the vessel root part, then it will form its own Living Space.
Trivial test: surface-attach a docking port to another part, make it the root, then add another part to the vessel to force CLS to recalculate the living spaces.
The fix might be to check all surface-attached parts of the current part to see if they allow surface-attached parts to pass.
Further investigation:
Surface-attach a docking port to a structural tube, add another docking port to it, and a crew cabin. Now re-root the vessel to the new crew-cabin.
ie : original:
cabin1(root) -> structural tube -(surface)-> DockingPort1 -> DockingPort2 -> cabin2
after re-root:
cabin2(root) -> DockingPort2 -> DockingPort1 -(surface)-> structural tube -> cabin1.
DockingPort1 now has an empty srfAttachNode node, which means when traversing the vessel, p.FindAttachNodeByPart() returns null.
This seems to be a bug in KSP itself as there is no valid attach-node from the parent part to the child part. There is a valid attachNode (type "srfAttach") from the child-part to the parent part.
NB: to force recalculation of the vessel, simply add/remove a part.
TODO: add a recalculate button to the UI?