Scaling down a crewed part makes the crew go M.I.A. and the crew capacity is not restored later!
Lisias opened this issue ยท 7 comments
Fellow Kerbonaut robi_243 found something on TweakScale and (probably) newer KSP releases.
If you downscale a Mark 1 Cockpit two notches, two things happens:
- If the part is crewed, the Kerbals go M.I.A.!!!!
- Once you scale back the part, the crew capacity is not restored!!
I'm absolutely sure I had tested the Item 2 when I first released this feature - but don't remember if I had tested the item 1.
Me and my memory. :P On KSP 1.7.3, the problem 1 does not happens, but the problem 2 does. So, and assuming I really tested the item 2 at that times (I still think I did), the item 2 is a new bug that is my fault - besides the bug 1 being not. :D
In a way or another, I need to handle this somehow.
The bug 1 is not my fault. On KSP 1.7.3, the Kerbal is recovered to the roster as expected.
But the bug 2 appears to be my fault, because it happened on KSP 1.7.3 - and I have the memory of testing this on it in the past.
Saving the craft and reloading is also a work around for bug 2.
This suggests I'm forgetting something silly on the part's life cycle - hopefully an easy fix.
KSP 1.11.2 also behave exactly as the above mentioned ones. I jumped over 1.10.1 and it appears obvious to me that it would behave the same.
The bug 1 is a new crap from KSP 1.12.x. "Thanks", Squad. :/
Oukey, it was totally my fault after all.
On commit 77ee667 I ended up short circuiting something that I should not, in special aborting the execution of the Crew Scaling if the current Crew Scale was equal or bigger than the prefab (as KSP is screwing with TweakScale on Crew since 1.8.0). But, obviously I should not had used the ">=" operator, as when you are scaling back a part from a smaller scale, you will need to rebuild the kraken damned crew roster of the part even if the new size is the same as the original size, damn it!
The reason the Crew is going to M.I.A. on KSp 1.12.x is also due that (and the reason I removed the "Not My Fault" label, as it ended up being my fault after all). That short circuit prevented the crew resizing code to run on some borderline situations (as this one) and so the crew was not being correctly removed form the part. On previous KSP versions this mishap was being tolerated, but on KSP 1.12.x some code change removed that tolerance and the Kerbal was declared M.I.A .
(sigh)
Anyway, properly fixed this time on commit 5368650