Interstellar Flight Inc. - Kerbal Life Support Mod

Interstellar Flight Inc. - Kerbal Life Support Mod

26.8k Downloads

Rescue POD gets emptied of resources

Will565 opened this issue ยท 4 comments

commented

Rescue contracts empty resources from pod causing LS system to kill kerbal

commented

See similar code in TACLS: taraniselsu/TacLifeSupport@e5a1e40
The main idea is to store list of known vessels and add some resources into new found.

commented

taraniselsu's solution looks quite simple - this might be added in IFILifeSupport/LifeSupportTracking.cs#L258

I might be wrong here - and ignore me if I am - but it appears to be that the problem with applying this directly would make the vessel recover all of its LS after it has depleted. So the check for if the vessel is a rescue mission or not (via tac's method) would have to be placed in a more general (when loaded) part of code rather than when the resource gets used.

basically inject into IFILifeSupport/LifeSupportTracking.cs#L111 then check for if it is a known crew member and immediately reload the LS amount in IFILifeSupport/LifeSupportTracking.cs#L115 and add that crew to the known crew

Disclaimer: First time looking at this code! - just my two cents :)
(I'll gladly help with anything if you ask! - this particular problem was making me wonder how the whole addon stuff works on ksp though)

Edit: typo

commented

Thanks for help, testing right now, and with a few tweaks this looks like it will work

commented

fixed with 2.7 release