Skip to content

Commit 86a510f

Browse files
committed
Merge pull request #211 from DMagic1/dev
Version 15.3
2 parents fe83fac + babefc8 commit 86a510f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+245
-109
lines changed
1.25 MB
846 KB
2.74 MB
510 KB
731 KB
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.
-16 Bytes
Binary file not shown.
Binary file not shown.
21.5 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1.5 MB
1.02 MB
2.96 MB
Binary file not shown.

SCANassets/Resources/SCANcolors.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ SCAN_Color_Config
1111
stockBiomeMap = False
1212
biomeBorder = True
1313
slopeCutoff = 1
14+
windowScale = 1
1415
bottomLowSlopeColor = 0.004705883,0.6,0.3788235,1
1516
bottemHighSlopeColor = 0.9764706,1,0.4627451,1
1617
topLowSlopeColor = 0.9764706,1,0.4627451,1

SCANassets/Resources/SCANlocalization.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ SCAN_Localization
1515
settingsHelpWindowTooltips = Display tooltips on some map window buttons. These are primarily used to identify icon buttons.
1616
settingsHelpStockToolbar = Use the stock toolbar.\nOnly one stock button is available. Can be used concurrently with the Blizzy78 Toolbar.
1717
settingsHelpMechJeb = The SCANsat zoom map target selection mode can be used to select a MechJeb landing site.
18-
settingsHelpResetWindows = Reset all window positions. Use this in case a window has been dragged completely off screen or if any windows are not visible.
18+
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.
1919
settingsHelpResetPlanetData = Resets all SCANsat data for the current celestial body.\nA confirmation window will open before activating.\nCannot be reversed.
2020
settingsHelpResetAllData = Resets all SCANsat data for all celestial bodies. \nA confirmation window will open before activating.\nCannot be reversed.
2121
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.
2222
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.
2323
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.
2424
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.
25+
settingsHelpWindowScale = Adjust all SCANsat window scales; buttons adjust scale in increments of 5%.
2526
resourceSettingsHelpOverlayWindow = Open the planetary overlay map control window.
2627
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.
2728
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.

SCANassets/SCANsat.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"MAJOR":1,
1212
"MINOR":1,
1313
"PATCH":5,
14-
"BUILD":2
14+
"BUILD":3
1515
},
1616
"KSP_VERSION":{
1717
"MAJOR":1,

SCANsat/CHANGELOG.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
Version 15.3 - 2016-4-15
2+
------------------------
3+
4+
- Additional KSPedia pages
5+
- Add window scaling function
6+
- Adjust scale in the Settings window
7+
- Window reset button will now reset all window positions and scale
8+
- Fix bug in instruments window resource readout
9+
- Make sure new save files apply all SCANsat default values and options
10+
11+
112
Version 15.2 - 2016-4-5
213
------------------------
314

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.5.0.2")]
18-
[assembly: AssemblyFileVersion ("1.5.0.2")]
19-
[assembly: AssemblyInformationalVersion ("v15.2")]
17+
[assembly: AssemblyVersion ("1.5.0.3")]
18+
[assembly: AssemblyFileVersion ("1.5.0.3")]
19+
[assembly: AssemblyInformationalVersion ("v15.3")]
2020

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

SCANsat/SCAN_Color_Config.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ public class SCAN_Color_Config : SCAN_ConfigNodeStorage
5656
[Persistent]
5757
private Color topHighSlopeColor = palette.xkcd_OrangeRed;
5858
[Persistent]
59+
private float windowScale = 1f;
60+
[Persistent]
5961
private List<SCANterrainConfig> SCANsat_Altimetry = new List<SCANterrainConfig>();
6062
[Persistent]
6163
private List<SCANresourceGlobal> SCANsat_Resources = new List<SCANresourceGlobal>();
@@ -94,6 +96,7 @@ public override void OnEncodeToConfigNode()
9496
bottemHighSlopeColor = SCANcontroller.controller.highSlopeColorOne;
9597
topLowSlopeColor = SCANcontroller.controller.lowSlopeColorTwo;
9698
topHighSlopeColor = SCANcontroller.controller.highSlopeColorTwo;
99+
windowScale = SCANcontroller.controller.windowScale;
97100
}
98101
}
99102

@@ -171,5 +174,10 @@ public Color TopHighSlopeColor
171174
{
172175
get { return topHighSlopeColor; }
173176
}
177+
178+
public float WindowScale
179+
{
180+
get { return windowScale; }
181+
}
174182
}
175183
}

SCANsat/SCAN_Platform/SCAN_MBW.cs

Lines changed: 14 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -122,51 +122,7 @@ protected SCAN_MBW()
122122
}
123123
}
124124
#endregion
125-
126-
protected override void Start()
127-
{
128-
base.Start();
129-
130-
GameEvents.onShowUI.Add(UIOn);
131-
GameEvents.onHideUI.Add(UIOff);
132-
GameEvents.onGUIMissionControlSpawn.Add(UIOff);
133-
GameEvents.onGUIMissionControlDespawn.Add(UIOff);
134-
GameEvents.onGUIRnDComplexSpawn.Add(UIOff);
135-
GameEvents.onGUIRnDComplexDespawn.Add(UIOn);
136-
GameEvents.onGUIAdministrationFacilitySpawn.Add(UIOff);
137-
GameEvents.onGUIAdministrationFacilityDespawn.Add(UIOn);
138-
GameEvents.onGUIAstronautComplexSpawn.Add(UIOff);
139-
GameEvents.onGUIAstronautComplexDespawn.Add(UIOn);
140-
}
141-
142-
protected override void OnDestroy()
143-
{
144-
base.OnDestroy();
145-
146-
GameEvents.onShowUI.Remove(UIOn);
147-
GameEvents.onHideUI.Remove(UIOff);
148-
GameEvents.onGUIMissionControlSpawn.Remove(UIOff);
149-
GameEvents.onGUIMissionControlDespawn.Remove(UIOff);
150-
GameEvents.onGUIRnDComplexSpawn.Remove(UIOff);
151-
GameEvents.onGUIRnDComplexDespawn.Remove(UIOn);
152-
GameEvents.onGUIAdministrationFacilitySpawn.Remove(UIOff);
153-
GameEvents.onGUIAdministrationFacilityDespawn.Remove(UIOn);
154-
GameEvents.onGUIAstronautComplexSpawn.Remove(UIOff);
155-
GameEvents.onGUIAstronautComplexDespawn.Remove(UIOn);
156-
}
157-
158-
private void UIOn()
159-
{
160-
showUI = true;
161-
}
162-
163-
private void UIOff()
164-
{
165-
showUI = false;
166-
}
167-
168-
private bool showUI = true;
169-
125+
170126
internal Int32 WindowID { get; private set; }
171127
internal TimeSpan DrawWindowInternalDuration { get; private set; }
172128
private bool _Visible;
@@ -271,32 +227,23 @@ public bool Visible
271227
get { return _Visible; }
272228
set
273229
{
274-
//if (_Visible != value)
275-
//{
276-
// if (value)
277-
// {
278-
// Log.Debug("Adding Window to PostDrawQueue-{0}", WindowID); RenderingManager.AddToPostDrawQueue(5, this.DrawGUI);
279-
// }
280-
// else
281-
// {
282-
// Log.Debug("Removing Window from PostDrawQueue", WindowID); RenderingManager.RemoveFromPostDrawQueue(5, this.DrawGUI);
283-
// }
284-
//}
230+
if (_Visible != value)
231+
{
232+
if (value)
233+
{
234+
Log.Debug("Adding Window to PostDrawQueue-{0}", WindowID);
235+
SCANcontroller.controller.addToDrawQueue(WindowID, this.DrawGUI);
236+
}
237+
else
238+
{
239+
Log.Debug("Removing Window from PostDrawQueue", WindowID);
240+
SCANcontroller.controller.removeFromDrawQueue(WindowID);
241+
}
242+
}
285243
_Visible = value;
286244
}
287245
}
288-
protected override void OnGUIEvery()
289-
{
290-
base.OnGUIEvery();
291-
292-
if (!showUI)
293-
return;
294246

295-
if (!_Visible)
296-
return;
297-
298-
this.DrawGUI();
299-
}
300247
protected void DrawGUI()
301248
{
302249
string cc = "";

SCANsat/SCAN_UI/SCANbigMap.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ protected override void Awake()
7070

7171
protected override void Start()
7272
{
73-
base.Start();
74-
7573
//Initialize the map object
7674
Visible = SCANcontroller.controller.bigMapVisible;
7775
WindowRect.x = SCANcontroller.controller.map_x;
@@ -118,8 +116,6 @@ private void initializeMap()
118116

119117
protected override void OnDestroy()
120118
{
121-
base.OnDestroy();
122-
123119
SCANcontroller.controller.unloadPQS(bigmap.Body, mapSource.BigMap);
124120
}
125121

SCANsat/SCAN_UI/SCANcolorSelection.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,6 @@ protected override void Awake()
112112

113113
protected override void Start()
114114
{
115-
base.Start();
116-
117115
TooltipsEnabled = false;
118116

119117
if (SCANconfigLoader.languagePack != null)
@@ -221,8 +219,6 @@ private void loadStrings()
221219

222220
protected override void OnDestroy()
223221
{
224-
base.OnDestroy();
225-
226222
removeControlLocks();
227223
TooltipsEnabled = false;
228224
}

SCANsat/SCAN_UI/SCANinstrumentUI.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ protected override void Awake()
6666

6767
protected override void Start()
6868
{
69-
base.Start();
70-
7169
GameEvents.onVesselSOIChanged.Add(soiChange);
7270
GameEvents.onVesselChange.Add(vesselChange);
7371
GameEvents.onVesselWasModified.Add(vesselChange);
@@ -86,8 +84,6 @@ protected override void Start()
8684

8785
protected override void OnDestroy()
8886
{
89-
base.OnDestroy();
90-
9187
GameEvents.onVesselSOIChanged.Remove(soiChange);
9288
GameEvents.onVesselChange.Remove(vesselChange);
9389
GameEvents.onVesselWasModified.Remove(vesselChange);
@@ -331,7 +327,7 @@ private void resourceInfo(int id)
331327
}
332328
else
333329
{
334-
resourceLabel(resources[currentResource], false, false);
330+
resourceLabel(resources[currentResource], false, true);
335331
}
336332
}
337333

SCANsat/SCAN_UI/SCANkscMap.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ protected override void Awake()
6666

6767
protected override void Start()
6868
{
69-
base.Start();
70-
7169
Visible = SCANcontroller.controller.kscMapVisible;
7270
if (b == null)
7371
b = Planetarium.fetch.Home;
@@ -97,8 +95,6 @@ protected override void Start()
9795

9896
protected override void OnDestroy()
9997
{
100-
base.OnDestroy();
101-
10298
removeControlLocks();
10399
if (spotMap != null)
104100
Destroy(spotMap);

SCANsat/SCAN_UI/SCANoverlayController.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace SCANsat.SCAN_UI
2626
{
2727
class SCANoverlayController : SCAN_MBW
2828
{
29-
internal readonly static Rect defaultRect = new Rect(Screen.width - 280, 200, 175, 100);
29+
internal static Rect defaultRect = new Rect(Screen.width - 320, 200, 175, 100);
3030
private static Rect sessionRect = defaultRect;
3131
private CelestialBody body;
3232
private SCANdata data;
@@ -61,6 +61,8 @@ protected override void Awake()
6161
{
6262
WindowCaption = " S.C.A.N. Overlay";
6363
WindowRect = sessionRect;
64+
if ((WindowRect.x * SCANcontroller.controller.windowScale) > (Screen.width - 100))
65+
WindowRect.x /= SCANcontroller.controller.windowScale;
6466
WindowStyle = SCANskins.SCAN_window;
6567
WindowOptions = new GUILayoutOption[2] { GUILayout.Width(175), GUILayout.Height(100) };
6668
Visible = false;
@@ -72,8 +74,6 @@ protected override void Awake()
7274

7375
protected override void Start()
7476
{
75-
base.Start();
76-
7777
GameEvents.onShowUI.Add(showUI);
7878
GameEvents.onHideUI.Add(hideUI);
7979
GameEvents.onGameSceneSwitchRequested.Add(switchScene);
@@ -109,8 +109,6 @@ private void switchScene(GameEvents.FromToAction<GameScenes, GameScenes> FT)
109109

110110
protected override void OnDestroy()
111111
{
112-
base.OnDestroy();
113-
114112
GameEvents.onShowUI.Remove(showUI);
115113
GameEvents.onHideUI.Remove(hideUI);
116114
GameEvents.onGameSceneSwitchRequested.Remove(switchScene);
@@ -154,8 +152,6 @@ protected override void DrawWindowPost(int id)
154152

155153
protected override void OnGUIEvery()
156154
{
157-
base.OnGUIEvery();
158-
159155
if (enableUI)
160156
mouseOverToolTip();
161157
}

SCANsat/SCAN_UI/SCANresourceSettings.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ protected override void Awake()
6565

6666
protected override void Start()
6767
{
68-
base.Start();
69-
7068
oldNarrowBand = SCANcontroller.controller.needsNarrowBand;
7169
oldStockScanThreshold = SCANcontroller.controller.useScanThreshold;
7270
oldInstantScan = SCANcontroller.controller.easyModeScanning;

0 commit comments

Comments
 (0)