/// <summary> /// Initializes a new instance of the <see cref="LifeSupportCalculator"/> class. /// </summary> /// <param name="crewedVehicle">The crewed vehicle.</param> public LifeSupportCalculator(ICrewable crewedVehicle) { this.CrewedVehicle = crewedVehicle; const int defaultLength = BaseGameSettings.DefaultHoursInKerbinDay; var lengthMultiplier = crewedVehicle.LifeSupportSystem.BaseGameSettings.DayLengthMultiplier; this.DayLength = defaultLength * lengthMultiplier; }
/// <summary> /// Initializes a new instance of the <see cref="LifeSupportSystem" /> class. /// </summary> /// <param name="crewedVehicle">The crewed vehicle.</param> /// <param name="baseGameSettings">The base game settings.</param> /// <param name="lifeSupportSettings">The life support settings.</param> public LifeSupportSystem(ICrewable crewedVehicle, BaseGameSettings baseGameSettings, LifeSupportSettings lifeSupportSettings) { Vehicle = crewedVehicle; LifeSupportSettings = lifeSupportSettings; BaseGameSettings = baseGameSettings; ProvisionsStorage = new ProvisionsStorage(); WasteStorage = new WasteStorage(); LifeSupportCalculator = new LifeSupportCalculator(crewedVehicle); }