Build a craft with a two-man command pod and a Hitchhiker (plus a lot of supplies and EC, or disable those). Put two (non-scout, if it matters) Kerbals in the pod and none in the Hitchhiker.
Put the craft in orbit and turn on the Hitchhiker's habitat module. Wait a decently long time (longer than the craft would be habitable without the module on, any more than 22 days should work).
Turn off the Hitchhiker's habitat module.
Expected result:
Each crew member's hab timer drops to ~22 days, the hab limit for the updated craft without the module active.
Actual result:
Only the first crew member's hab timer drops to that value, and everyone else instantly takes a homesickness effect when the craft's status refreshes.
This only updates TimeEnteredVessel for the first crew member in the for loop; after that, _isStatusRefreshRequired is false and nobody else's TimeEnteredVessel changes — meaning that each other crew member then looks at their timer and finds the second condition true:
Setup:
Expected result: Each crew member's hab timer drops to ~22 days, the hab limit for the updated craft without the module active.
Actual result: Only the first crew member's hab timer drops to that value, and everyone else instantly takes a homesickness effect when the craft's status refreshes.
Cause:
https://github.com/UmbraSpaceIndustries/USI-LS/blob/c842b8587e150875cc563c3aca541d618d5aadbb/Source/USILifeSupport/ModuleLifeSupportSystem.cs#L248-L253
This only updates
TimeEnteredVessel
for the first crew member in thefor
loop; after that,_isStatusRefreshRequired
is false and nobody else'sTimeEnteredVessel
changes — meaning that each other crew member then looks at their timer and finds the second condition true:https://github.com/UmbraSpaceIndustries/USI-LS/blob/c842b8587e150875cc563c3aca541d618d5aadbb/Source/USILifeSupport/ModuleLifeSupportSystem.cs#L717
Presumably
_isStatusRefreshRequired
should only be set to false after thefor
loop through the crew.