Skip to content

Commit b1b49ba

Browse files
committed
Initial commit
0 parents  commit b1b49ba

38 files changed

+1504
-0
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/Library/KSP/
2+
/Library/NuGet/
3+
/Output/
4+
5+
AssemblyInfo.cs
6+
7+
*.suo
8+
*.user
9+
*.orig

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## Unreleased
2+
##### New
3+
- Replace thermal overlay gradient colors with more intuitive scheme.
4+
- Add display of temperature and max temperature values to part context menu.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
ENHANCED_THERMAL_DATA
2+
{
3+
CONTEXT_MENU
4+
{
5+
TEMPERATURE
6+
{
7+
enable = true
8+
unit = Kelvin
9+
}
10+
}
11+
12+
THERMAL_OVERLAY
13+
{
14+
enable = true
15+
16+
GRADIENT
17+
{
18+
STOP
19+
{
20+
name = AbsoluteZero
21+
at = 0K
22+
color = #5c3566
23+
alpha = 1.0
24+
}
25+
26+
STOP
27+
{
28+
name = Freezing
29+
at = 273.20K
30+
color = #204a87
31+
alpha = 1.0
32+
}
33+
34+
STOP
35+
{
36+
name = Standard
37+
at = 287.50K
38+
color = #ffffff
39+
alpha = 0.0
40+
}
41+
42+
STOP
43+
{
44+
name = Boiling
45+
at = 373.13K
46+
color = #fce94f
47+
alpha = 1.0
48+
}
49+
50+
STOP
51+
{
52+
name = 67Percent
53+
at = 67%
54+
color = #f57900
55+
}
56+
57+
STOP
58+
{
59+
name = 100Percent
60+
at = 100%
61+
color = #a40000
62+
alpha = 1.0
63+
}
64+
}
65+
}
66+
67+
DIAGNOSTICS
68+
{
69+
logLevel = Info
70+
}
71+
}

EnhancedThermalData.sln

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.22823.1
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Source", "Source", "{3C3EA3B3-B34C-4C92-AC7B-031810073BAB}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{FE967A1B-0E46-46D0-B7A2-097B02012880}"
9+
EndProject
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EnhancedThermalData", "Source\EnhancedThermalData\EnhancedThermalData.csproj", "{26BDAE1E-3F27-4A7B-81A1-C461F96A3064}"
11+
EndProject
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EnhancedThermalDataTests", "Tests\EnhancedThermalDataTests\EnhancedThermalDataTests.csproj", "{277D410A-9E8C-41DA-8235-FB7A9940681B}"
13+
EndProject
14+
Global
15+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
16+
Debug|Any CPU = Debug|Any CPU
17+
Release|Any CPU = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
20+
{26BDAE1E-3F27-4A7B-81A1-C461F96A3064}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{26BDAE1E-3F27-4A7B-81A1-C461F96A3064}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{26BDAE1E-3F27-4A7B-81A1-C461F96A3064}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{26BDAE1E-3F27-4A7B-81A1-C461F96A3064}.Release|Any CPU.Build.0 = Release|Any CPU
24+
{277D410A-9E8C-41DA-8235-FB7A9940681B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25+
{277D410A-9E8C-41DA-8235-FB7A9940681B}.Debug|Any CPU.Build.0 = Debug|Any CPU
26+
{277D410A-9E8C-41DA-8235-FB7A9940681B}.Release|Any CPU.ActiveCfg = Release|Any CPU
27+
{277D410A-9E8C-41DA-8235-FB7A9940681B}.Release|Any CPU.Build.0 = Release|Any CPU
28+
EndGlobalSection
29+
GlobalSection(SolutionProperties) = preSolution
30+
HideSolutionNode = FALSE
31+
EndGlobalSection
32+
GlobalSection(NestedProjects) = preSolution
33+
{26BDAE1E-3F27-4A7B-81A1-C461F96A3064} = {3C3EA3B3-B34C-4C92-AC7B-031810073BAB}
34+
{277D410A-9E8C-41DA-8235-FB7A9940681B} = {FE967A1B-0E46-46D0-B7A2-097B02012880}
35+
EndGlobalSection
36+
EndGlobal

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
This software is distributed under the MIT license.
2+
3+
Copyright (c) 2015 Dwayne Bent
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@PART:FOR[EnhancedThermalData]
2+
{
3+
%MODULE[EnhancedThermalDataModule] {}
4+
}

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Enhanced Thermal Data
2+
3+
**Enhanced Thermal Data** is a Kerbal Space Program mod that displays better thermal data to the user. It currently
4+
supports the following features:
5+
6+
### Improved Thermal Overlay Colors
7+
Replaces the color gradient used for thermal overlays to be more intuitive.
8+
9+
- -273.15°C (Purple) to 0.00°C (Blue)
10+
- 0.00°C (Blue) to 14.40°C (White)
11+
- 14.40°C (White) to 100.00°C (Yellow)
12+
- 100.00°C (Yellow) to 67% of Maximum (Orange)
13+
- 67% of Maximum (Orange) to Maximum (Red)
14+
15+
### Part Temperature in Context Menu
16+
Adds the current and maximum temperature to the context menu of all parts.
17+
18+
## Usage
19+
To install, extract the contents of the archive to your KSP directory. This should create an `EnhancedThermalData`
20+
directory under the `<KSP>/GameData` directory. Enhanced Thermal Data requires [Module Manager][module-manager] to be
21+
installed.
22+
23+
Once installed press the `TOGGLE_TEMP_OVERLAY` key (`F11` by default) to enable temperature overlays. Right clicking
24+
on parts will also display their current and maximum temperatures.
25+
26+
## Configuration
27+
Enhanced Thermal Data can be configured by creating Module Manager patches against the default settings stored in
28+
`<KSP>/GameData/EnhancedThermalData/Configuration/EnhancedThermalData.cfg`. How to use Module Manager is outside the
29+
scope of this README, please see the Module Manager documentation for more information.
30+
31+
[module-manager]: http://forum.kerbalspaceprogram.com/threads/55219
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
namespace EnhancedThermalData.Configuration
2+
{
3+
internal struct At
4+
{
5+
public readonly float Value;
6+
public readonly AtUnit Unit;
7+
8+
public At(float value, AtUnit unit)
9+
{
10+
Value = value;
11+
Unit = unit;
12+
}
13+
14+
public override string ToString()
15+
{
16+
var unitStr = string.Empty;
17+
switch (Unit)
18+
{
19+
case AtUnit.Percentage:
20+
unitStr = "%";
21+
break;
22+
case AtUnit.Kelvin:
23+
unitStr = "K";
24+
break;
25+
}
26+
27+
return $"{Value}{unitStr}";
28+
}
29+
}
30+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace EnhancedThermalData.Configuration
2+
{
3+
internal enum AtUnit
4+
{
5+
Percentage,
6+
Kelvin,
7+
}
8+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
namespace EnhancedThermalData.Configuration
2+
{
3+
internal static class Config
4+
{
5+
private static readonly object InstanceLock = new object();
6+
private static EnhancedThermalDataNode _instance;
7+
8+
public static EnhancedThermalDataNode Instance
9+
{
10+
get
11+
{
12+
if (_instance == null)
13+
{
14+
lock (InstanceLock)
15+
{
16+
if (_instance == null)
17+
{
18+
var enhancedThermalDataNode = new EnhancedThermalDataNode();
19+
enhancedThermalDataNode.Load(
20+
GameDatabase.Instance.GetConfigNode("ENHANCED_THERMAL_DATA")
21+
);
22+
23+
_instance = enhancedThermalDataNode;
24+
}
25+
}
26+
}
27+
28+
return _instance;
29+
}
30+
}
31+
}
32+
}

0 commit comments

Comments
 (0)