static void Render_habitat(Panel p, Vessel v, VesselData vd) { // if habitat feature is disabled, do not show the panel if (!Features.Habitat) { return; } // if vessel is unmanned, do not show the panel if (vd.CrewCount == 0) { return; } // render panel, add some content based on enabled features p.AddSection("HABITAT"); if (Features.Poisoning) { p.AddContent("co2 level", Lib.Color(vd.Poisoning > Settings.PoisoningThreshold, Lib.HumanReadablePerc(vd.Poisoning, "F2"), Lib.Kolor.Yellow)); } if (Features.Radiation && v.isEVA) { p.AddContent("radiation", Lib.HumanReadableRadiation(vd.EnvHabitatRadiation)); } if (!v.isEVA) { if (Features.Pressure) { p.AddContent("pressure", Lib.HumanReadablePressure(vd.Pressure * Sim.PressureAtSeaLevel())); } if (Features.Shielding) { p.AddContent("shielding", Habitat.Shielding_to_string(vd.Shielding)); } if (Features.LivingSpace) { p.AddContent("living space", Habitat.Living_space_to_string(vd.LivingSpace)); } if (Features.Comfort) { p.AddContent("comfort", vd.Comforts.Summary(), vd.Comforts.Tooltip()); } if (Features.Pressure) { p.AddContent("EVA's available", vd.EnvBreathable ? "infinite" : Lib.HumanReadableInteger(vd.Evas), vd.EnvBreathable ? "breathable atmosphere" : "approx (derived from stored N2)"); } } }
static void Render_habitat(Panel p, Vessel v, Vessel_info vi) { // if habitat feature is disabled, do not show the panel if (!Features.Habitat) { return; } // if vessel is unmanned, do not show the panel if (vi.crew_count == 0) { return; } // render panel, add some content based on enabled features p.AddSection("HABITAT"); if (Features.Poisoning) { p.AddContent("co2 level", Lib.Color(Lib.HumanReadablePerc(vi.poisoning, "F2"), vi.poisoning > Settings.PoisoningThreshold, "yellow")); } if (!v.isEVA) { if (Features.Humidity) { p.AddContent("humidity", Lib.Color(Lib.HumanReadablePerc(vi.humidity, "F2"), vi.humidity > Settings.HumidityThreshold, "yellow")); } if (Features.Pressure) { p.AddContent("pressure", Lib.HumanReadablePressure(vi.pressure * Sim.PressureAtSeaLevel())); } if (Features.Shielding) { p.AddContent("shielding", Habitat.Shielding_to_string(vi.shielding)); } if (Features.LivingSpace) { p.AddContent("living space", Habitat.Living_space_to_string(vi.living_space)); } if (Features.Comfort) { p.AddContent("comfort", vi.comforts.Summary(), vi.comforts.Tooltip()); } if (Features.Pressure) { p.AddContent("EVA's available", vi.breathable ? "infinite" : Lib.HumanReadableInteger(vi.evas), vi.breathable ? "breathable atmosphere" : "approx (derived from stored N2)"); } } }