Skip to content

Commit

Permalink
Merge pull request #200 from DMagic1/release
Browse files Browse the repository at this point in the history
Version 14.9
  • Loading branch information
DMagic1 committed Mar 6, 2016
2 parents 65f7812 + e211ed1 commit e958a4e
Show file tree
Hide file tree
Showing 32 changed files with 882 additions and 214 deletions.
Binary file added SCANassets/Icons/SCAN_Zoom_Map_Icon.dds
Binary file not shown.
Binary file added SCANassets/Icons/SCANsat_OverlayToolbar_Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added SCANassets/Icons/SCANsat_ZoomToolbar_Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CONTRACT_GROUP
DATA
{
type = List<CelestialBody>

requiredValue = false
p1Bodies = AllBodies().Where(cb => ((cb.IsHomeWorld() || cb.Parent().IsHomeWorld()) && cb.HasSurface()))
p2Bodies = OrbitedBodies().Where(cb => cb.HasSurface())
p3Bodies = ReachedBodies().Where(cb => cb.HasSurface() && cb != HomeWorld() && cb.Parent() != HomeWorld())
Expand Down
149 changes: 149 additions & 0 deletions SCANassets/Resources/SCANcolors.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ SCAN_Color_Config
biomeTransparency = 40
stockBiomeMap = False
biomeBorder = True
slopeCutoff = 1
bottomLowSlopeColor = 0.004705883,0.6,0.3788235,1
bottemHighSlopeColor = 0.9764706,1,0.4627451,1
topLowSlopeColor = 0.9764706,1,0.4627451,1
Expand Down Expand Up @@ -2295,5 +2296,153 @@ SCAN_Color_Config
}
}
}
Item
{
name = GeoEnergy
lowResourceColor = 0,0.79,0.4925883,1
highResourceColor = 1,0.7254902,0,1
resourceTransparency = 20
defaultMinValue = 1
defaultMaxValue = 6.5
Resource_Planetary_Config
{
Item
{
resourceName = GeoEnergy
bodyName = Sun
index = 0
lowResourceCutoff = 1
highResourceCutoff = 6.5
}
Item
{
resourceName = GeoEnergy
bodyName = Kerbin
index = 1
lowResourceCutoff = 10
highResourceCutoff = 35
}
Item
{
resourceName = GeoEnergy
bodyName = Mun
index = 2
lowResourceCutoff = 1
highResourceCutoff = 35
}
Item
{
resourceName = GeoEnergy
bodyName = Minmus
index = 3
lowResourceCutoff = 1
highResourceCutoff = 6.5
}
Item
{
resourceName = GeoEnergy
bodyName = Moho
index = 4
lowResourceCutoff = 1
highResourceCutoff = 6.5
}
Item
{
resourceName = GeoEnergy
bodyName = Eve
index = 5
lowResourceCutoff = 1
highResourceCutoff = 35
}
Item
{
resourceName = GeoEnergy
bodyName = Duna
index = 6
lowResourceCutoff = 1
highResourceCutoff = 6.5
}
Item
{
resourceName = GeoEnergy
bodyName = Ike
index = 7
lowResourceCutoff = 1
highResourceCutoff = 6.5
}
Item
{
resourceName = GeoEnergy
bodyName = Jool
index = 8
lowResourceCutoff = 1
highResourceCutoff = 6.5
}
Item
{
resourceName = GeoEnergy
bodyName = Laythe
index = 9
lowResourceCutoff = 1
highResourceCutoff = 35
}
Item
{
resourceName = GeoEnergy
bodyName = Vall
index = 10
lowResourceCutoff = 1
highResourceCutoff = 6.5
}
Item
{
resourceName = GeoEnergy
bodyName = Bop
index = 11
lowResourceCutoff = 1
highResourceCutoff = 6.5
}
Item
{
resourceName = GeoEnergy
bodyName = Tylo
index = 12
lowResourceCutoff = 1
highResourceCutoff = 6.5
}
Item
{
resourceName = GeoEnergy
bodyName = Gilly
index = 13
lowResourceCutoff = 1
highResourceCutoff = 6.5
}
Item
{
resourceName = GeoEnergy
bodyName = Pol
index = 14
lowResourceCutoff = 1
highResourceCutoff = 6.5
}
Item
{
resourceName = GeoEnergy
bodyName = Dres
index = 15
lowResourceCutoff = 1
highResourceCutoff = 6.5
}
Item
{
resourceName = GeoEnergy
bodyName = Eeloo
index = 16
lowResourceCutoff = 1
highResourceCutoff = 35
}
}
}
}
}
1 change: 1 addition & 0 deletions SCANassets/Resources/SCANlocalization.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ SCAN_Localization
colorResourceHelpDefault = Reverts to the default values for the selected resource and celestial body only.
colorResourceHelpDefaultAll = Reverts to the default values for the selected resource for all celestial bodies.
colorHelpSaveToConfig = Save all color configuration values to the config file found in your SCANsat/Resources folder. These values serve as the defaults for new saves and for all Revert To Default buttons. Values do not need to be saved to the config file to be applied for this save file.
colorSlopeHelpCutoff = Adjust the cutoff level between the two selected slope color pairs.
}
}
}
5 changes: 5 additions & 0 deletions SCANassets/Resources/SCANresource.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,8 @@ SCANSAT_SENSOR
name = Dirt
SCANtype = 16777216 //2^24
}
SCANSAT_SENSOR
{
name = GeoEnergy
SCANtype = 67108864 //2^26
}
2 changes: 1 addition & 1 deletion SCANassets/SCANsat.version
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"MAJOR":1,
"MINOR":1,
"PATCH":4,
"BUILD":8
"BUILD":9
},
"KSP_VERSION":{
"MAJOR":1,
Expand Down
6 changes: 3 additions & 3 deletions SCANmechjeb/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.4.0.8")]
[assembly: AssemblyFileVersion("1.4.0.8")]
[assembly: AssemblyInformationalVersion ("v14.8")]
[assembly: AssemblyVersion("1.4.0.9")]
[assembly: AssemblyFileVersion("1.4.0.9")]
[assembly: AssemblyInformationalVersion ("v14.9")]

[assembly: KSPAssembly ("SCANmechjeb", 0, 3)]
[assembly: KSPAssemblyDependency ("SCANsat", 1, 4)]
Expand Down
23 changes: 23 additions & 0 deletions SCANsat/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
Version 14.9 - 2016-3-6
------------------------

- Add new zoom map buttons to small map, big map and toolbar
- Improved zoom map functionality
- When zoom map is first opened it targets the active vessel
- Added re-sync to vessel button in the top-right corner

- Added slope cutoff slider to color management window
- Adjusts the cutoff between the two color pairs
- Lower cutoff to make slope map better in the zoom map

- Color Management window button removed from small map and big map in flight scene
- Added Color Management window button to the top of the settings menu

- Added GeoEnergy resource support for PathFinder
- When a new planet is detected SCANsat tries to determine its highest elevation point
- Used for planets that don't have a terrain config defined in the SCANcolors.cfg file; ie Kopernicus planets
- Max elevation point used to set the max height used for SCANsat maps
- Max elevation sometimes returns values too high; adjust values in the color management window
- Some changes in how data is loaded from the save file; no end-user effect
- Fixed error that prevented SCANsat contracts from generating before the player left the Kerbin system

Version 14.8 - 2016-2-10
------------------------

Expand Down
6 changes: 3 additions & 3 deletions SCANsat/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion ("1.4.0.8")]
[assembly: AssemblyFileVersion ("1.4.0.8")]
[assembly: AssemblyInformationalVersion ("v14.8")]
[assembly: AssemblyVersion ("1.4.0.9")]
[assembly: AssemblyFileVersion ("1.4.0.9")]
[assembly: AssemblyInformationalVersion ("v14.9")]

[assembly: KSPAssembly ("SCANsat", 1, 4)]

Expand Down
8 changes: 8 additions & 0 deletions SCANsat/SCAN_Color_Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public class SCAN_Color_Config : SCAN_ConfigNodeStorage
[Persistent]
private bool biomeBorder = true;
[Persistent]
private float slopeCutoff = 1f;
[Persistent]
private Color bottomLowSlopeColor = palette.xkcd_PukeGreen;
[Persistent]
private Color bottemHighSlopeColor = palette.xkcd_Lemon;
Expand Down Expand Up @@ -87,6 +89,7 @@ public override void OnEncodeToConfigNode()
biomeTransparency = SCANcontroller.controller.biomeTransparency;
stockBiomeMap = SCANcontroller.controller.useStockBiomes;
biomeBorder = SCANcontroller.controller.biomeBorder;
slopeCutoff = SCANcontroller.controller.slopeCutoff;
bottomLowSlopeColor = SCANcontroller.controller.lowSlopeColorOne;
bottemHighSlopeColor = SCANcontroller.controller.highSlopeColorOne;
topLowSlopeColor = SCANcontroller.controller.lowSlopeColorTwo;
Expand Down Expand Up @@ -144,6 +147,11 @@ public bool BiomeBorder
get { return biomeBorder; }
}

public float SlopeCutoff
{
get { return slopeCutoff; }
}

public Color BottomLowSlopeColor
{
get { return bottomLowSlopeColor; }
Expand Down
17 changes: 16 additions & 1 deletion SCANsat/SCAN_Data/SCANdata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
using FinePrint;
using FinePrint.Contracts;
using FinePrint.Contracts.Parameters;
using FinePrint.Utilities;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using SCANsat.SCAN_Platform;
Expand Down Expand Up @@ -61,7 +62,19 @@ internal SCANdata(CelestialBody b)
if (b.ocean)
clamp = 0;

terrainConfig = new SCANterrainConfig(SCANconfigLoader.SCANNode.DefaultMinHeightRange, SCANconfigLoader.SCANNode.DefaultMaxHeightRange, clamp, SCANUtil.paletteLoader(SCANconfigLoader.SCANNode.DefaultPalette, 7), 7, false, false, body);
float newMax;

try
{
newMax = ((float)CelestialUtilities.GetHighestPeak(b)).Mathf_Round(-2);
}
catch (Exception e)
{
SCANUtil.SCANlog("Error in calculating Max Height for {0}; using default value\n{1}", b.theName, e);
newMax = SCANconfigLoader.SCANNode.DefaultMaxHeightRange;
}

terrainConfig = new SCANterrainConfig(SCANconfigLoader.SCANNode.DefaultMinHeightRange, newMax, clamp, SCANUtil.paletteLoader(SCANconfigLoader.SCANNode.DefaultPalette, 7), 7, false, false, body);
SCANcontroller.addToTerrainConfigData(body.name, terrainConfig);
}
}
Expand Down Expand Up @@ -414,6 +427,8 @@ internal int getCoverage(SCANtype type)
uncov += coverage_count[24];
if ((type & SCANtype.CRP_Reserved) != SCANtype.Nothing)
uncov += coverage_count[25];
if ((type & SCANtype.GeoEnergy) != SCANtype.Nothing)
uncov += coverage_count[26];

return uncov;
}
Expand Down
1 change: 1 addition & 0 deletions SCANsat/SCAN_Data/SCANtype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public enum SCANtype : int
ExoticMinerals = 1 << 23, // Dirt - CRP
Dirt = 1 << 24, // Rare Metals - CRP
CRP_Reserved = 1 << 25,
GeoEnergy = 1 << 26,

Everything_SCAN = (1 << 6) - 1, // All default SCANsat scanners
AllResources = 2147483584, // All resource types
Expand Down
6 changes: 3 additions & 3 deletions SCANsat/SCAN_Map/SCANmap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -785,13 +785,13 @@ internal Texture2D getPartialMap()
}
else
{
if (v < 1)
if (v < SCANcontroller.controller.slopeCutoff)
{
baseColor = palette.lerp(SCANcontroller.controller.lowSlopeColorOne, SCANcontroller.controller.highSlopeColorOne, v);
baseColor = palette.lerp(SCANcontroller.controller.lowSlopeColorOne, SCANcontroller.controller.highSlopeColorOne, v / SCANcontroller.controller.slopeCutoff);
}
else
{
baseColor = palette.lerp(SCANcontroller.controller.lowSlopeColorTwo, SCANcontroller.controller.highSlopeColorTwo, v - 1);
baseColor = palette.lerp(SCANcontroller.controller.lowSlopeColorTwo, SCANcontroller.controller.highSlopeColorTwo, (v - SCANcontroller.controller.slopeCutoff) / (2 -SCANcontroller.controller.slopeCutoff));
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions SCANsat/SCAN_PartModules/SCANhiDefCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void toggleSCANHiDef()

if (!SCANcontroller.controller.hiDefMap.Visible)
{
SCANcontroller.controller.hiDefMap.setMapCenter(SCANUtil.fixLatShift(vessel.latitude), SCANUtil.fixLonShift(vessel.longitude), hiDetailOnly || SCANcontroller.controller.hiDetailZoomMap, null, this);
SCANcontroller.controller.hiDefMap.setMapCenter(SCANUtil.fixLatShift(vessel.latitude), SCANUtil.fixLonShift(vessel.longitude), hiDetailOnly || SCANcontroller.controller.hiDetailZoomMap, null, false, this);
}
else
SCANcontroller.controller.hiDefMap.closeMap();
Expand All @@ -121,7 +121,7 @@ public void resetCenter()
if (SCANcontroller.controller.hiDefMap == null)
return;

SCANcontroller.controller.hiDefMap.setMapCenter(SCANUtil.fixLatShift(vessel.latitude), SCANUtil.fixLonShift(vessel.longitude), hiDetailOnly || SCANcontroller.controller.hiDetailZoomMap, null, this);
SCANcontroller.controller.hiDefMap.setMapCenter(SCANUtil.fixLatShift(vessel.latitude), SCANUtil.fixLonShift(vessel.longitude), hiDetailOnly || SCANcontroller.controller.hiDetailZoomMap, null, false, this);
}

private void enableConnectedModules()
Expand Down
Loading

0 comments on commit e958a4e

Please sign in to comment.