Skip to content

Commit 30c4064

Browse files
authored
Merge pull request #251 from DMagic1/release
Version 16.11
2 parents b147380 + 8a996dc commit 30c4064

File tree

11 files changed

+176
-93
lines changed

11 files changed

+176
-93
lines changed

SCANassets/MM_Parts/SCANsat_Resource_Scanner.cfg

Lines changed: 58 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -125,22 +125,12 @@
125125
}
126126
}
127127

128-
@PART[MKS_Antenna]:FOR[SCANsat]:NEEDS[KolonyTools]
128+
@PART[OrbitalScanner]:FOR[SCANsat]:NEEDS[KolonyTools]
129129
{
130-
MODULE
130+
@MODULE[ModuleSCANresourceScanner]
131131
{
132-
name = ModuleSCANresourceScanner
133-
sensorType = 32613504
134-
fov = 3
135-
min_alt = 10000
136-
max_alt = 500000
137-
best_alt = 150000
138-
scanName = Resource Scan
139-
RESOURCE
140-
{
141-
name = ElectricCharge
142-
rate = 0.4
143-
}
132+
@sensorType += 32613504
133+
@scanName = Resource Scan
144134
}
145135

146136
MODULE
@@ -214,7 +204,7 @@
214204
}
215205
}
216206

217-
@PART[MKS_ScanOMatic]:FOR[SCANsat]:NEEDS[KolonyTools]
207+
@PART[SurfaceScanner]:FOR[SCANsat]:NEEDS[KolonyTools]
218208
{
219209

220210
MODULE
@@ -314,11 +304,11 @@
314304
}
315305
}
316306

317-
@PART[OrbitalScanner]:FOR[SCANsat]:NEEDS[WarpPlugin]
307+
@PART[OrbitalScanner]:FOR[SCANsat]:NEEDS[WarpPlugin,!KolonyTools]
318308
{
319309
@MODULE[ModuleSCANresourceScanner]
320310
{
321-
@sensorType = 437272320
311+
@sensorType += 437272064
322312
@scanName = Resource Scan
323313
}
324314

@@ -376,7 +366,7 @@
376366
name = SCANresourceDisplay
377367
sensorType = 1024
378368
ResourceName = Uraninite
379-
}
369+
}
380370

381371
MODULE
382372
{
@@ -385,3 +375,53 @@
385375
ResourceName = Water
386376
}
387377
}
378+
379+
@PART[OrbitalScanner]:FOR[SCANsat]:NEEDS[WarpPlugin,KolonyTools]
380+
{
381+
@MODULE[ModuleSCANresourceScanner]
382+
{
383+
@sensorType += 436214272
384+
}
385+
386+
MODULE
387+
{
388+
name = SCANresourceDisplay
389+
sensorType = 4096
390+
ResourceName = Alumina
391+
}
392+
393+
MODULE
394+
{
395+
name = SCANresourceDisplay
396+
sensorType = 33554432
397+
ResourceName = Borate
398+
}
399+
400+
MODULE
401+
{
402+
name = SCANresourceDisplay
403+
sensorType = 2048
404+
ResourceName = Monazite
405+
}
406+
407+
MODULE
408+
{
409+
name = SCANresourceDisplay
410+
sensorType = 134217728
411+
ResourceName = SaltWater
412+
}
413+
414+
MODULE
415+
{
416+
name = SCANresourceDisplay
417+
sensorType = 268435456
418+
ResourceName = Silicates
419+
}
420+
421+
MODULE
422+
{
423+
name = SCANresourceDisplay
424+
sensorType = 512
425+
ResourceName = SolarWind
426+
}
427+
}

SCANassets/SCANsat.version

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111
"MAJOR":1,
1212
"MINOR":1,
1313
"PATCH":6,
14-
"BUILD":10
14+
"BUILD":11
1515
},
1616
"KSP_VERSION":{
1717
"MAJOR":1,
1818
"MINOR":2,
19-
"PATCH":0
19+
"PATCH":1
2020
},
2121
"KSP_VERSION_MIN":{
2222
"MAJOR":1,
2323
"MINOR":2,
24-
"PATCH":0
24+
"PATCH":1
2525
},
2626
"KSP_VERSION_MAX":{
2727
"MAJOR":1,
2828
"MINOR":2,
29-
"PATCH":0
29+
"PATCH":1
3030
}
3131
}

SCANmechjeb/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.6.0.10")]
36-
[assembly: AssemblyFileVersion("1.6.0.10")]
37-
[assembly: AssemblyInformationalVersion ("v16.10")]
35+
[assembly: AssemblyVersion("1.6.0.11")]
36+
[assembly: AssemblyFileVersion("1.6.0.11")]
37+
[assembly: AssemblyInformationalVersion ("v16.11")]
3838

3939
[assembly: KSPAssembly ("SCANmechjeb", 0, 4)]
4040
[assembly: KSPAssemblyDependency ("SCANsat", 1, 6)]

SCANmechjeb/SCANmechjeb.csproj

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,11 @@
3737
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\Assembly-CSharp.dll</HintPath>
3838
<Private>False</Private>
3939
</Reference>
40-
<Reference Include="KSPUtil">
41-
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\KSPUtil.dll</HintPath>
42-
<Private>False</Private>
43-
</Reference>
4440
<Reference Include="MechJeb2, Version=2.5.1.0, Culture=neutral, processorArchitecture=MSIL">
4541
<SpecificVersion>False</SpecificVersion>
4642
<HintPath>..\GameData\SCANsat\MechJeb2.dll</HintPath>
4743
<Private>False</Private>
4844
</Reference>
49-
<Reference Include="SCANsat, Version=1.1.3.0, Culture=neutral, processorArchitecture=MSIL">
50-
<SpecificVersion>False</SpecificVersion>
51-
<HintPath>..\GameData\SCANsat\SCANsat.dll</HintPath>
52-
<Private>False</Private>
53-
</Reference>
5445
<Reference Include="System" />
5546
<Reference Include="UnityEngine">
5647
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\UnityEngine.dll</HintPath>
@@ -67,6 +58,13 @@
6758
<Compile Include="SCANmechjebMainMenu.cs" />
6859
<Compile Include="SCANmechStarter.cs" />
6960
</ItemGroup>
61+
<ItemGroup>
62+
<ProjectReference Include="..\SCANsat\SCANsat.csproj">
63+
<Project>{3ae13948-477d-4375-8ab4-b45664966d9e}</Project>
64+
<Name>SCANsat</Name>
65+
<Private>False</Private>
66+
</ProjectReference>
67+
</ItemGroup>
7068
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
7169
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
7270
Other similar extension points exist, see Microsoft.Common.targets.

SCANsat/CHANGELOG.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
Version 16.11 - 2016-11-4
2+
-----------------------
3+
4+
- Update for KSP 1.2.1
5+
6+
- Disable window dragging for big map and zoom map when in IVA
7+
- Most resource scanners now use the stock Narrow-Band for high resolution scanning
8+
- The "Require Narrow-Band" option in the resource settings is slightly broken by this
9+
- Disable that option if using lots of CRP resources
10+
111
Version 16.10 - 2016-10-24
212
-----------------------
313

SCANsat/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
1515
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
1616
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
17-
[assembly: AssemblyVersion ("1.6.0.10")]
18-
[assembly: AssemblyFileVersion ("1.6.0.10")]
19-
[assembly: AssemblyInformationalVersion ("v16.10")]
17+
[assembly: AssemblyVersion ("1.6.0.11")]
18+
[assembly: AssemblyFileVersion ("1.6.0.11")]
19+
[assembly: AssemblyInformationalVersion ("v16.11")]
2020

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

SCANsat/SCAN_UI/SCANbigMap.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ protected override void Start()
9191
TooltipsEnabled = SCANcontroller.controller.toolTips;
9292

9393
initializeMap();
94+
95+
GameEvents.OnCameraChange.Add(onCameraChange);
9496
}
9597

9698
private void initializeMap()
@@ -126,6 +128,7 @@ private void initializeMap()
126128

127129
protected override void OnDestroy()
128130
{
131+
GameEvents.OnCameraChange.Remove(onCameraChange);
129132
SCANcontroller.controller.unloadPQS(bigmap.Body, mapSource.BigMap);
130133
}
131134

@@ -135,6 +138,14 @@ protected override void Update()
135138
v = FlightGlobals.ActiveVessel;
136139
}
137140

141+
private void onCameraChange(CameraManager.CameraMode cam)
142+
{
143+
if (cam == CameraManager.CameraMode.IVA)
144+
DragEnabled = false;
145+
else
146+
DragEnabled = true;
147+
}
148+
138149
//Properties used to sync with color selection window
139150
public static SCANmap BigMap
140151
{

SCANsat/SCAN_UI/SCANresourceSettings.cs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,22 @@ protected override void DrawWindowPost(int id)
187187
warningMMLoaded = !warningMMLoaded;
188188
}
189189
}
190+
else
191+
{
192+
if (oldInstantScan != SCANcontroller.controller.easyModeScanning)
193+
{
194+
oldInstantScan = SCANcontroller.controller.easyModeScanning;
195+
if (oldInstantScan)
196+
{
197+
for (int i = FlightGlobals.Bodies.Count - 1; i >= 0; i--)
198+
{
199+
CelestialBody b = FlightGlobals.Bodies[i];
200+
201+
SCANcontroller.controller.checkStockResourceScanStatus(b);
202+
}
203+
}
204+
}
205+
}
190206

191207
if (oldNarrowBand != SCANcontroller.controller.needsNarrowBand)
192208
{
@@ -200,7 +216,7 @@ protected override void DrawWindowPost(int id)
200216
oldStockScanThreshold = SCANcontroller.controller.useScanThreshold;
201217
if (oldStockScanThreshold)
202218
{
203-
for (int i = 0; i < FlightGlobals.Bodies.Count; i++)
219+
for (int i = FlightGlobals.Bodies.Count - 1; i >= 0; i--)
204220
{
205221
CelestialBody b = FlightGlobals.Bodies[i];
206222

SCANsat/SCAN_UI/SCANsettingsUI.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,10 @@ protected override void DrawWindowPost(int id)
217217
if (stockToolbar)
218218
SCANcontroller.controller.appLauncher = gameObject.AddComponent<SCANappLauncher>();
219219
else
220+
{
220221
Destroy(SCANcontroller.controller.appLauncher);
222+
SCANcontroller.controller.appLauncher = null;
223+
}
221224
}
222225
}
223226

SCANsat/SCAN_UI/SCANzoomWindow.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ protected override void Awake()
8787
infoString2 = new StringBuilder();
8888

8989
Startup();
90+
91+
GameEvents.OnCameraChange.Add(onCameraChange);
9092
}
9193

9294
protected virtual void Startup()
@@ -140,9 +142,18 @@ protected override void OnDestroy()
140142
{
141143
removeControlLocks();
142144

145+
GameEvents.OnCameraChange.Remove(onCameraChange);
143146
SCANcontroller.controller.unloadPQS(spotmap.Body, mapSource.ZoomMap);
144147
}
145148

149+
private void onCameraChange(CameraManager.CameraMode cam)
150+
{
151+
if (cam == CameraManager.CameraMode.IVA)
152+
DragEnabled = false;
153+
else
154+
DragEnabled = true;
155+
}
156+
146157
internal void removeControlLocks()
147158
{
148159
InputLockManager.RemoveControlLock(lockID);

0 commit comments

Comments
 (0)