net-lisias-ksp / KSP-Recall

Recall for KSP blunders, screw ups and borks.
GNU General Public License v2.0
25 stars 2 forks source link

Check about a missing use-case on AttachedOnEditor. #37

Closed Lisias closed 2 years ago

Lisias commented 2 years ago

I think I missed a use case on KSP-Recall, as I had to partially redo a small fraction of an older "gambiarra" I did there.

It can be something fishy on TweakScale's code, but yet it worths to check and recheck this use-case because the whole purpose of KSP-Recall is to allow the fix to work for everybody.

Lisias commented 2 years ago

Misbehaviour: when scaled parts are attached radially with symmetry, the original subtree ends up displaced.

Craft used (KSP 1.12.3) : 2464-2465 TS migration test.craft.zip

The problem is being worked around on TweakScale on this code:

https://github.com/net-lisias-ksp/TweakScale/blob/e64b0691e038644de422e8103ef4c69380ffabfb/Source/PartDB18x/PartDB/VariantPartScaler18x.cs#L33

            if (HighLogic.LoadedSceneIsEditor && HasKSP19bug)       // This is needed by (surprisingly!) KSP 1.9
                this.MoveSurfaceAttachment(true, true);
Lisias commented 2 years ago

Another misbehavour: during OnCopy, the original node sizes are rewritten over the current ones. : nope! This is also happening on KSP 1.7.3, it's a TweakScale issue!!

— note —

If 1.9.x Editor is resetting the attachment node positions, it's kinda obvious that it's also resetting the node's size! So my initial thought was correct, it only happens that the reason TweakScale also is suffering from this problem has another cause. See https://github.com/net-lisias-ksp/TweakScale/issues/238

DAMN Two different problems with the same symptom. Don't you love Software Development?? :D

Lisias commented 2 years ago

Preserving now the Attachment Node's Orientation, Size and Offset as well the Position.

Implemented on commits: