forked from GarwelGarwel/KerbalHealth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
KerbalHealthRadiationSettings.cs
94 lines (76 loc) · 5.94 KB
/
KerbalHealthRadiationSettings.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
namespace KerbalHealth
{
class KerbalHealthRadiationSettings : GameParameters.CustomParameterNode
{
public override string Title => "Radiation";
public override GameParameters.GameMode GameMode => GameParameters.GameMode.ANY;
public override bool HasPresets => true;
public override string Section => "Kerbal Health (2)";
public override string DisplaySection => Section;
public override int SectionOrder => 1;
public override void SetDifficultyPreset(GameParameters.Preset preset)
{
switch (preset)
{
case GameParameters.Preset.Easy:
RadiationEnabled = false;
RadiationEffect = 0.05f;
ShieldingEffect = 2;
EVAExposure = 1;
break;
case GameParameters.Preset.Normal:
RadiationEnabled = true;
RadiationEffect = 0.05f;
ShieldingEffect = 2;
EVAExposure = 1;
break;
case GameParameters.Preset.Moderate:
RadiationEnabled = true;
RadiationEffect = 0.05f;
ShieldingEffect = 1;
EVAExposure = 2;
break;
case GameParameters.Preset.Hard:
RadiationEnabled = true;
RadiationEffect = 0.1f;
ShieldingEffect = 1;
EVAExposure = 5;
break;
}
}
[GameParameters.CustomParameterUI("Radiation Enabled", toolTip = "Degrade max health based on accumulated dose")]
public bool RadiationEnabled = true;
[GameParameters.CustomFloatParameterUI("Radiation Effect", toolTip = "Percentage of max health drained by 1e7 (10M) doses. 0 to disable effect", minValue = 0, maxValue = 1, displayFormat = "N2", asPercentage = true, stepCount = 41)]
public float RadiationEffect = 0.1f;
[GameParameters.CustomFloatParameterUI("Shielding Multiplier", toolTip = "Efficiency of radiation shielding provided by parts and resources", minValue = 0, maxValue = 2, displayFormat = "N2", asPercentage = true, stepCount = 41)]
public float ShieldingEffect = 1;
[GameParameters.CustomFloatParameterUI("In Space High Coefficient", toolTip = "How much cosmic radiation reaches vessels in high planetary orbit or on moons", minValue = 0, maxValue = 1, displayFormat = "N2", asPercentage = true, stepCount = 21)]
public float InSpaceHighCoefficient = 0.30f;
[GameParameters.CustomFloatParameterUI("In Space Low Coefficient", toolTip = "How much cosmic radiation reaches vessels in low planetary orbits", minValue = 0, maxValue = 1, displayFormat = "N2", asPercentage = true, stepCount = 21)]
public float InSpaceLowCoefficient = 0.20f;
[GameParameters.CustomFloatParameterUI("Stratosphere Transparency", toolTip = "How much cosmic radiation reaches outer layers of the atmosphere from space", minValue = 0, maxValue = 1, displayFormat = "N2", asPercentage = true, stepCount = 21)]
public float StratoCoefficient = 0.2f;
[GameParameters.CustomFloatParameterUI("Troposphere Transparency", toolTip = "How much cosmic radiation reaches the ground and lower layers of the atmosphere from space", minValue = 0, maxValue = 0.05f, displayFormat = "N4", asPercentage = true, stepCount = 51)]
public float TroposphereCoefficient = 0.01f;
[GameParameters.CustomFloatParameterUI("EVA Exposure Multiplier", toolTip = "How much more radiaiton kerbals receive when on EVA", minValue = 0, maxValue = 10, displayFormat = "N0", stepCount = 21)]
public float EVAExposure = 5;
[GameParameters.CustomFloatParameterUI("Solar Radiation (Nominal)", toolTip = "Solar radiation in interplanetary space at 1 AU, banana doses/day", minValue = 0, maxValue = 10000, displayFormat = "N0", stepCount = 21)]
public float SolarRadiation = 5000;
[GameParameters.CustomFloatParameterUI("Galactic Radiation", toolTip = "Galactic cosmic radiation in interplanetary space, banana doses/day", minValue = 0, maxValue = 30000, displayFormat = "N0", stepCount = 31)]
public float GalacticRadiation = 15000;
[GameParameters.CustomFloatParameterUI("Decontamination Rate per Day", toolTip = "How much radiation is lost per day during decontamination", minValue = 1000, maxValue = 1000000, displayFormat = "N0", logBase = 10)]
public float DecontaminationRate = 100000;
[GameParameters.CustomFloatParameterUI("Decontamination Health Loss", toolTip = "How much health is lost while the kerbal is decontaminating", minValue = 0, maxValue = 1, displayFormat = "N2", asPercentage = true)]
public float DecontaminationHealthLoss = 0.75f;
[GameParameters.CustomFloatParameterUI("Decontamination Funds Cost", toolTip = "How much Funds each decontamination procedure costs (Career only)", minValue = 0, maxValue = 1000000, displayFormat = "N0")]
public float DecontaminationFundsCost = 100000;
[GameParameters.CustomFloatParameterUI("Decontamination Science Cost", toolTip = "How much Science each decontamination procedure costs (Career & Science modes)", minValue = 0, maxValue = 10000, displayFormat = "N0")]
public float DecontaminationScienceCost = 1000;
[GameParameters.CustomIntParameterUI("Astronaut Complex Level for Decon", toolTip = "Min level of the Astronaut Complex for Decontamination", minValue = 0, maxValue = 3)]
public int DecontaminationAstronautComplexLevel = 3;
[GameParameters.CustomIntParameterUI("R&D Level for Decon", toolTip = "Min level of the Research & Development Facility for Decontamination", minValue = 0, maxValue = 3)]
public int DecontaminationRNDLevel = 3;
//[GameParameters.CustomParameterUI("Decontamination Causes Level Loss", toolTip = "The decontaminated kerbal loses 1 experience level")]
public bool DecontaminationLevelLoss = false;
}
}