Closed severedsolo closed 6 years ago
It may also be helpful to look at how USI-LS implements kerbal homesickness, since that involves keeping track of how long each kerbal has been away from home (independent of vessel changes). There's a scenario (LifeSupportScenario) with a data block for each kerbal, and one of the properties in that block is a "LastAtHome" UT. (Sounds like EarnYourStripes does something similar.)
From the forum thread:
It looks like you are using the vessels MET on recovery to determine the vacation time.
However, if the vessel was docked to a station, and then undocked and returned, the MET gets reset to 0 on undocking. This results in Kerbals who have been away for over a year only getting the minimum 7 day vacation time.
FYI EarnYourStripes suffered from the same problem - I worked around it by recording the actual UT the Kerbal launched at in OnVesselRollout and then comparing it to the UT the recovery was requested at.
It's pretty minor, but thought you might like to know (happy to provide logs if needed, but it's easily reproducable). I suspect it would also happen if that kerbal went on EVA.