Skip to content

Commit

Permalink
Merge pull request #213 from S-C-A-N/dev
Browse files Browse the repository at this point in the history
Version 16.0
  • Loading branch information
DMagic1 committed Apr 19, 2016
2 parents e958a4e + 0462332 commit 8d1116f
Show file tree
Hide file tree
Showing 72 changed files with 855 additions and 287 deletions.
9 changes: 1 addition & 8 deletions SCANassets/MM_Parts/RPMMapTraq.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
{
MODULE
{
name = SCANsat
sensorType = 0
fov = 0
min_alt = 0
max_alt = 0
best_alt = 0
scanName = Eyeball Scan
power = 0.05
name = SCANRPMStorage
}
}
Binary file added SCANassets/Resources/KSPedia/Advanced image.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/Resources/KSPedia/Basic image_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/Resources/KSPedia/Colors Image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/Resources/KSPedia/Parts Image_4.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/Resources/KSPedia/RPM Image_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added SCANassets/Resources/KSPedia/SCANsat_Basic.prefab
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added SCANassets/Resources/KSPedia/SCANsat_Intro.prefab
Binary file not shown.
Binary file added SCANassets/Resources/KSPedia/SCANsat_Parts.prefab
Binary file not shown.
Binary file added SCANassets/Resources/KSPedia/SCANsat_RPM.prefab
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/Resources/KSPedia/header image.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/Resources/KSPedia/intro image.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/Resources/KSPedia/scansat.ksp
Binary file not shown.
1 change: 1 addition & 0 deletions SCANassets/Resources/SCANcolors.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ SCAN_Color_Config
stockBiomeMap = False
biomeBorder = True
slopeCutoff = 1
windowScale = 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
3 changes: 2 additions & 1 deletion SCANassets/Resources/SCANlocalization.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ SCAN_Localization
settingsHelpWindowTooltips = Display tooltips on some map window buttons. These are primarily used to identify icon buttons.
settingsHelpStockToolbar = Use the stock toolbar.\nOnly one stock button is available. Can be used concurrently with the Blizzy78 Toolbar.
settingsHelpMechJeb = The SCANsat zoom map target selection mode can be used to select a MechJeb landing site.
settingsHelpResetWindows = Reset all window positions. Use this in case a window has been dragged completely off screen or if any windows are not visible.
settingsHelpResetWindows = Reset all window positions and scale. Use this in case a window has been dragged completely off screen or if any windows are not visible.
settingsHelpResetPlanetData = Resets all SCANsat data for the current celestial body.\nA confirmation window will open before activating.\nCannot be reversed.
settingsHelpResetAllData = Resets all SCANsat data for all celestial bodies. \nA confirmation window will open before activating.\nCannot be reversed.
settingsHelpVesselsSensorsPasses = Information about the currently active SCANsat sensors. Vessels indicates the number of vessels with active sensors. Sensors indicates the total number of sensors; instruments with multiple sensor types count each individual sensor. Passes indicates the number of sensor updates performed per second.\nThis value is affected by the\nTimeWarp Resolution setting.
settingsHelpGreyScale = Use a true grey-scale color spectrum for black-and-white SCANsat maps. Pixels on the altitude map will interpolate between black and white; the min and max terrain heights for each celestial body\ndefine the limits.
settingsHelpExportCSV = Export a .csv file along with map texture when using the Export button on the big map. The file contains coordinates and the terrain height for each pixel. Pixels are labeled from left to right\nand from top to bottom.
settingsHelpSetMapWidth = Enter an exact value for the SCANsat big map texture width. Values are limited to 550 - 8192 pixels wide. Press the Set button to apply the value.
settingsHelpWindowScale = Adjust all SCANsat window scales; buttons adjust scale in increments of 5%.
resourceSettingsHelpOverlayWindow = Open the planetary overlay map control window.
resourceSettingsHelpBiomeLock = Circumvents the requirement for stock surface biome scans. SCANsat displays will show the full accuracy for resource abundance with or without any surface biome scans.
resourceSettingsHelpInstant = By default, the stock M700 resource scanner's orbital survey will fill in all SCANsat resource maps. This can be disabled, requiring standard SCANsat methods for all resource scanning. Disabled automatically when stock resource scanning is disabled.
Expand Down
47 changes: 41 additions & 6 deletions SCANassets/Resources/ScienceDefs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ EXPERIMENT_DEFINITION
{
id = SCANsatAltimetryLoRes
title = Low Resolution Altimetry Scan
baseValue = 20
scienceCap = 20
baseValue = 10
scienceCap = 10
dataScale = 2

requireAtmosphere = False
Expand Down Expand Up @@ -39,7 +39,7 @@ EXPERIMENT_DEFINITION
title = High Resolution Altimetry Scan
baseValue = 20
scienceCap = 20
dataScale = 3
dataScale = 4
requireAtmosphere = False
situationMask = 0
Expand Down Expand Up @@ -72,9 +72,9 @@ EXPERIMENT_DEFINITION
{
id = SCANsatBiomeAnomaly
title = Multispectral Analysis
baseValue = 20
scienceCap = 20
dataScale = 4
baseValue = 15
scienceCap = 15
dataScale = 3
requireAtmosphere = False
situationMask = 0
Expand Down Expand Up @@ -104,4 +104,39 @@ EXPERIMENT_DEFINITION
Pol = As you take in the biome data coming from Pol you begin to contemplate the possibility that pollen grains have biomes too. Then you quickly squash the thought, knowing what the activists would be like if they got a hold of that idea.
Eeloo = It is astounding to have such detailed biome data on a planet so far from Kerbin. You gaze in awe at the report as the data comes in.
}
}
EXPERIMENT_DEFINITION
{
id = SCANsatResources
title = Resources Scan
baseValue = 10
scienceCap = 10
dataScale = 2
requireAtmosphere = False
situationMask = 0
biomeMask = 0
RESULTS
{
default = Analyzed low resolution resource data.
default = "We are receiving resource sensor data now; this information looks way better than what we were getting from that other group..."
Sun = Perhaps the sun is not the best place to find surface resources.
Moho = We finally have some information about resources on Moho's surface, now we just need to figure out why anyone would want to land there.
Eve = We're getting lots of good data on Eve's surface resources, this will be great when we need to figure out how to get off of the planet.
Gilly = Initial resource scans of Gilly look interesting; it's almost like asteroid mining.
Kerbin = We finally have some data about resources on Kerbin, because, as everyone knows, if you want basic information about your own planet nothing beats sending an expensive, complicated satellite into orbit.
Mun = This resource data gives us our first good look at how suitable the Mun may be for mining purposes.
Minmus = At last, we have some resource data on Minmus, every Kerbonaut's first choice for a starter mining facility.
Duna = This resource data brings us one step closer to reliving all of our favorite lines from that recent hit Kerbal movie.
Ike = Ike may not be the solar system's most interesting celestial body, but that doesn't make this resource data any less useful.
Dres = We might as well just search some of the nearby asteroids for resources; who would ever want to bother with Dres.
Jool = Hmm, maybe a gas giant isn't the best place to go looking for surface resources...
Laythe = Well, there's lots of good data here, but precious little area on the surface where we might actually be able to land and take advantage of the resources.
Vall = Resource scans of icy Vall provide lots of interesting data.
Tylo = We'll take any resource information we can get on scary looking Tylo.
Bop = Bop may not be anyone's first choice for deciding where to look for resources, but this data may still come in handy some day.
Pol = In addition to pollen grains and strange lumpy things, Pol appears to have some interesting resource deposits.
Eeloo = Now that we've made it all the way out to Eeloo, we might as strip mine the place and move on to whatever is beyond.
}
}
18 changes: 9 additions & 9 deletions SCANassets/SCANsat.version
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"NAME":"SCANsat",
"URL":"https://raw.githubusercontent.com/S-C-A-N/SCANsat/release/SCANassets/SCANsat.version",
"URL":"https://raw.githubusercontent.com/S-C-A-N/SCANsat/dev/SCANassets/SCANsat.version",
"DOWNLOAD":"https://github.com/S-C-A-N/SCANsat/releases",
"GITHUB":{
"USERNAME":"S-C-A-N",
Expand All @@ -10,22 +10,22 @@
"VERSION":{
"MAJOR":1,
"MINOR":1,
"PATCH":4,
"BUILD":9
"PATCH":6,
"BUILD":0
},
"KSP_VERSION":{
"MAJOR":1,
"MINOR":0,
"PATCH":5
"MINOR":1,
"PATCH":0
},
"KSP_VERSION_MIN":{
"MAJOR":1,
"MINOR":0,
"PATCH":5
"MINOR":1,
"PATCH":0
},
"KSP_VERSION_MAX":{
"MAJOR":1,
"MINOR":0,
"PATCH":5
"MINOR":1,
"PATCH":0
}
}
10 changes: 5 additions & 5 deletions SCANmechjeb/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
// 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.9")]
[assembly: AssemblyFileVersion("1.4.0.9")]
[assembly: AssemblyInformationalVersion ("v14.9")]
[assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
[assembly: AssemblyInformationalVersion ("v16.0")]

[assembly: KSPAssembly ("SCANmechjeb", 0, 3)]
[assembly: KSPAssemblyDependency ("SCANsat", 1, 4)]
[assembly: KSPAssembly ("SCANmechjeb", 0, 4)]
[assembly: KSPAssemblyDependency ("SCANsat", 1, 6)]
[assembly: KSPAssemblyDependency("MechJeb2", 2, 5)]
31 changes: 22 additions & 9 deletions SCANmechjeb/SCANmechjeb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class SCANmechjeb : SCAN_MBE
{
private const string siteName = "MechJeb Landing Target";
private Vessel v;
private MechJebCore core;
private MechJebCore mjCore;
private MechJebModuleTargetController target;
private DisplayModule guidanceModule;
private SCANwaypoint way;
Expand Down Expand Up @@ -82,9 +82,9 @@ protected override void LateUpdate()
return;
}

core = v.GetMasterMechJeb();
mjCore = v.GetMasterMechJeb();

if (core == null)
if (mjCore == null)
{
SCANcontroller.controller.MechJebLoaded = false;
way = null;
Expand All @@ -94,7 +94,7 @@ protected override void LateUpdate()
if (HighLogic.CurrentGame.Mode != Game.Modes.SANDBOX)
{
if (guidanceModule == null)
guidanceModule = (DisplayModule)core.GetComputerModule("MechJebModuleLandingGuidance");
guidanceModule = (DisplayModule)mjCore.GetComputerModule("MechJebModuleLandingGuidance");

if (guidanceModule == null)
{
Expand All @@ -115,7 +115,7 @@ protected override void LateUpdate()
}
}

target = core.target;
target = mjCore.target;

if (target == null)
{
Expand All @@ -127,7 +127,6 @@ protected override void LateUpdate()
if (!SCANcontroller.controller.MechJebLoaded)
{
SCANcontroller.controller.MechJebLoaded = true;
RenderingManager.AddToPostDrawQueue(1, drawTarget);
}

if (SCANcontroller.controller.LandingTarget != null)
Expand Down Expand Up @@ -173,7 +172,7 @@ protected override void LateUpdate()
return;
}

if (!(target.Target is PositionTarget))
if ((target.Target is DirectionTarget))
{
way = null;
return;
Expand All @@ -199,6 +198,20 @@ protected override void LateUpdate()
}
}

protected override void OnGUIEvery()
{
if (SCANcontroller.controller == null)
return;

if (!SCANcontroller.controller.MechJebLoaded)
return;

if (!selectingInMap)
return;

drawTarget();
}

//Draw the mapview MechJeb target arrows
private void drawTarget()
{
Expand All @@ -209,10 +222,10 @@ private void drawTarget()

if (!MapView.MapIsEnabled)
return;
if (!v.isActiveVessel || v.GetMasterMechJeb() != core)
if (!v.isActiveVessel || v.GetMasterMechJeb() != mjCore)
return;

GLUtils.DrawMapViewGroundMarker(SCANcontroller.controller.LandingTargetBody, coords.y, coords.x, palette.mechjebYellow);
GLUtils.DrawGroundMarker(SCANcontroller.controller.LandingTargetBody, coords.y, coords.x, palette.mechjebYellow, true);
}
}
}
12 changes: 10 additions & 2 deletions SCANmechjeb/SCANmechjeb.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>..\..\KSP Dev\Kerbal Space Program\KSP_Data\Managed\Assembly-CSharp.dll</HintPath>
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="KSPUtil">
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\KSPUtil.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="MechJeb2, Version=2.5.1.0, Culture=neutral, processorArchitecture=MSIL">
Expand All @@ -49,7 +53,11 @@
</Reference>
<Reference Include="System" />
<Reference Include="UnityEngine">
<HintPath>..\..\KSP Dev\Kerbal Space Program\KSP_Data\Managed\UnityEngine.dll</HintPath>
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\UnityEngine.UI.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
Expand Down
27 changes: 27 additions & 0 deletions SCANsat/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
Versoin 16.0 - 2016-4-29
------------------------

- Update for KSP 1.1 final release
- Update for MechJeb 2.5.7

- KSPedia Entry
- 17 New KSPedia pages covering SCANsat basics and features

- Add science experiment for low resolution resource scan (M700 scanner)
- Adjust other science reward amounts

- Add window scaling function
- Adjust scale in the Settings window

- Misc and Bug Fixes
- Add target selection button to big map
- Add new RPM storage module; Module Manager config edited to add this module to any part with an internal space
- Make scanners easier to turn off when they run out of power
- Fix error that prevented orbit lines from crossing the East/West border in zoom maps
- Window reset button will now reset all window positions and scale
- Fix bug in instruments window resource readout
- Make sure new save files apply all SCANsat default values and options
- Fixed potential error with ground tracks
- Fixed potential error with .csv exporter


Version 14.9 - 2016-3-6
------------------------

Expand Down
8 changes: 4 additions & 4 deletions SCANsat/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
// 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.9")]
[assembly: AssemblyFileVersion ("1.4.0.9")]
[assembly: AssemblyInformationalVersion ("v14.9")]
[assembly: AssemblyVersion ("1.6.0.0")]
[assembly: AssemblyFileVersion ("1.6.0.6")]
[assembly: AssemblyInformationalVersion ("v16.0")]

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


8 changes: 8 additions & 0 deletions SCANsat/SCAN_Color_Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public class SCAN_Color_Config : SCAN_ConfigNodeStorage
[Persistent]
private Color topHighSlopeColor = palette.xkcd_OrangeRed;
[Persistent]
private float windowScale = 1f;
[Persistent]
private List<SCANterrainConfig> SCANsat_Altimetry = new List<SCANterrainConfig>();
[Persistent]
private List<SCANresourceGlobal> SCANsat_Resources = new List<SCANresourceGlobal>();
Expand Down Expand Up @@ -94,6 +96,7 @@ public override void OnEncodeToConfigNode()
bottemHighSlopeColor = SCANcontroller.controller.highSlopeColorOne;
topLowSlopeColor = SCANcontroller.controller.lowSlopeColorTwo;
topHighSlopeColor = SCANcontroller.controller.highSlopeColorTwo;
windowScale = SCANcontroller.controller.windowScale;
}
}

Expand Down Expand Up @@ -171,5 +174,10 @@ public Color TopHighSlopeColor
{
get { return topHighSlopeColor; }
}

public float WindowScale
{
get { return windowScale; }
}
}
}
2 changes: 1 addition & 1 deletion SCANsat/SCAN_Data/SCANdata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public List<SCANwaypoint> Waypoints

if (WaypointManager.Instance() != null)
{
var remaining = WaypointManager.Instance().AllWaypoints();
var remaining = WaypointManager.Instance().Waypoints;
for (int i = 0; i < remaining.Count; i++)
{
Waypoint p = remaining[i];
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 @@ -48,6 +48,7 @@ public enum SCANtype : int
GeoEnergy = 1 << 26,

Everything_SCAN = (1 << 6) - 1, // All default SCANsat scanners
Science = 524299, // All science collection types
AllResources = 2147483584, // All resource types
DefinedResources = 66584448, // All defined resource types
MKSResources = 32613504, // All standard MKS/USI resources
Expand Down
Loading

0 comments on commit 8d1116f

Please sign in to comment.