Skip to content

Commit

Permalink
Merge pull request #154 from DMagic1/release
Browse files Browse the repository at this point in the history
version 14.1
  • Loading branch information
DMagic1 committed Jul 15, 2015
2 parents 813d2eb + 7416afb commit b60b07e
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 54 deletions.
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":0
"BUILD":1
},
"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.0")]
[assembly: AssemblyFileVersion("1.4.0.0")]
[assembly: AssemblyInformationalVersion ("v14")]
[assembly: AssemblyVersion("1.4.0.1")]
[assembly: AssemblyFileVersion("1.4.0.1")]
[assembly: AssemblyInformationalVersion ("v14.1")]

[assembly: KSPAssembly ("SCANmechjeb", 0, 3)]
[assembly: KSPAssemblyDependency ("SCANsat", 1, 4)]
Expand Down
12 changes: 11 additions & 1 deletion SCANsat/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
Version 14.0 - 2014-7-5
Version 14.1 - 2015-7-15
------------------------

- Across the board performance improvement for map rendering

- Fixed a bug causing performance drop for greyscale maps

- Fixed a bug preventing landed resource scanners from working


Version 14.0 - 2015-7-5
------------------------

- Updated for KSP 1.0.4
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.0")]
[assembly: AssemblyFileVersion ("1.4.0.0")]
[assembly: AssemblyInformationalVersion ("v14")]
[assembly: AssemblyVersion ("1.4.0.1")]
[assembly: AssemblyFileVersion ("1.4.0.1")]
[assembly: AssemblyInformationalVersion ("v14.1")]

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

Expand Down
3 changes: 2 additions & 1 deletion SCANsat/SCAN_PartModules/SCANresourceDisplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,11 @@ private void FixedUpdate()
if (!activated)
{
abundanceValue = -1f;
tooHigh = false;
return;
}

if (ResourceUtilities.GetAltitude(vessel) > MaxAbundanceAltitude)
if (!vessel.Landed && ResourceUtilities.GetAltitude(vessel) > MaxAbundanceAltitude)
{
tooHigh = true;
return;
Expand Down
23 changes: 5 additions & 18 deletions SCANsat/SCANcontroller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,7 @@ public class SCANcontroller : ScenarioModule
{
public static SCANcontroller controller
{
get
{
Game g = HighLogic.CurrentGame;
if (g == null) return null;
try
{
var mod = g.scenarios.FirstOrDefault(m => m.moduleName == typeof(SCANcontroller).Name);
if (mod != null)
return (SCANcontroller)mod.moduleRef;
else
return null;
}
catch (Exception e)
{
SCANUtil.SCANlog("Could not find SCANsat Scenario Module: {0}", e);
return null;
}
}
get { return instance; }
}

private static int minScanAlt = 5000;
Expand Down Expand Up @@ -204,6 +187,8 @@ public static SCANcontroller controller
private bool bodyCoverage = false;
private bool heightMapsBuilt = false;

private static SCANcontroller instance;

#region Public Accessors

public SCANdata getData(string bodyName)
Expand Down Expand Up @@ -529,6 +514,8 @@ public SCANwaypoint LandingTarget

public override void OnLoad(ConfigNode node)
{
instance = this;

try
{
lowBiomeColor = ConfigNode.ParseColor(node.GetValue("lowBiomeColor"));
Expand Down
44 changes: 17 additions & 27 deletions SCANsat/SCANutil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,13 @@ public static bool isCovered(double lon, double lat, CelestialBody body, int SCA
int ilon = icLON(lon);
int ilat = icLAT(lat);
if (badLonLat (ilon, ilat)) return false;
if (SCANcontroller.controller != null)
{
SCANdata data = getData(body);
if (data != null)
return (data.Coverage[ilon, ilat] & SCANtype) != 0;
else
return false;
}
else

SCANdata data = getData(body.name);

if (data == null)
return false;

return (data.Coverage[ilon, ilat] & SCANtype) != 0;
}

/// <summary>
Expand All @@ -70,16 +67,13 @@ public static bool isCovered(double lon, double lat, CelestialBody body, int SCA
public static bool isCovered(int lon, int lat, CelestialBody body, int SCANtype)
{
if (badLonLat(lon, lat)) return false;
if (SCANcontroller.controller != null)
{
SCANdata data = getData(body);
if (data != null)
return (data.Coverage[lon, lat] & SCANtype) != 0;
else
return false;
}
else

SCANdata data = getData(body.name);

if (data == null)
return false;

return (data.Coverage[lon, lat] & SCANtype) != 0;
}

/// <summary>
Expand All @@ -90,16 +84,12 @@ public static bool isCovered(int lon, int lat, CelestialBody body, int SCANtype)
/// <returns>Scanning percentage as a double from 0-100</returns>
public static double GetCoverage(int SCANtype, CelestialBody Body)
{
if (SCANcontroller.controller != null)
{
SCANdata data = getData(Body);
if (data != null)
return getCoveragePercentage(data, (SCANtype)SCANtype);
else
return 0;
}
else
SCANdata data = getData(Body.name);

if (data == null)
return 0;

return getCoveragePercentage(data, (SCANtype)SCANtype);
}

/// <summary>
Expand Down

0 comments on commit b60b07e

Please sign in to comment.