Skip to content

Commit c2ee59b

Browse files
committed
Merge 3.9.0.0 to master
2 parents 3995d43 + 6e7e2ad commit c2ee59b

File tree

10 files changed

+229
-78
lines changed

10 files changed

+229
-78
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
*.user
77
*.sln.docstates
88

9+
.vs/
10+
911
# Build results
1012

1113
[Dd]ebug/

KerbalAlarmClock/KerbalAlarmClock.cs

Lines changed: 50 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,11 +1845,12 @@ private void ParseAlarmsAndAffectWarpAndPause(double SecondsTillNextUpdate)
18451845

18461846
// Delete the do nothing/delete alarms - One loop to find the ones to delete - cant delete inside the foreach or it breaks the iterator
18471847
List<KACAlarm> ToDelete = new List<KACAlarm>();
1848-
//foreach (KACAlarm tmpAlarm in alarms.Where(a => (a.AlarmActionConvert == KACAlarm.AlarmActionEnum.DoNothingDeleteWhenPassed) || (a.ActionDeleteWhenDone)))
1849-
foreach (KACAlarm tmpAlarm in alarms.Where(a => a.Actions.Warp == AlarmActions.WarpEnum.DoNothing && a.Actions.DeleteWhenDone ))
1850-
{
1851-
if (tmpAlarm.Triggered && tmpAlarm.Actioned)
1852-
ToDelete.Add(tmpAlarm);
1848+
//foreach (KACAlarm tmpAlarm in alarms.Where(a => (a.AlarmActionConvert == KACAlarm.AlarmActionEnum.DoNothingDeleteWhenPassed) || (a.ActionDeleteWhenDone)))
1849+
//foreach (KACAlarm tmpAlarm in alarms.Where(a => a.Actions.Warp == AlarmActions.WarpEnum.DoNothing && a.Actions.DeleteWhenDone))
1850+
foreach (KACAlarm tmpAlarm in alarms.Where(a => (!a.ShowMessage || a.Actions.Warp == AlarmActions.WarpEnum.DoNothing) && a.Actions.DeleteWhenDone))
1851+
{
1852+
if (tmpAlarm.Triggered && tmpAlarm.Actioned)
1853+
ToDelete.Add(tmpAlarm);
18531854
}
18541855
foreach (KACAlarm a in ToDelete)
18551856
{
@@ -1977,49 +1978,49 @@ public void RestoreManeuverNode(ManeuverNode newManNode)
19771978

19781979

19791980
#if DEBUG
1980-
//This will kick us into the save called default and set the first vessel active
1981-
[KSPAddon(KSPAddon.Startup.MainMenu, false)]
1982-
public class Debug_AutoLoadPersistentSaveOnStartup : MonoBehaviour
1983-
{
1984-
//use this variable for first run to avoid the issue with when this is true and multiple addons use it
1985-
public static bool first = true;
1986-
public void Start()
1987-
{
1988-
//only do it on the first entry to the menu
1989-
if (first)
1990-
{
1991-
first = false;
1992-
HighLogic.SaveFolder = "default";
1993-
// HighLogic.SaveFolder = "Career";
1994-
Game game = GamePersistence.LoadGame("persistent", HighLogic.SaveFolder, true, false);
1995-
1996-
if (game != null && game.flightState != null && game.compatible)
1997-
{
1998-
//straight to spacecenter
1999-
HighLogic.CurrentGame = game;
2000-
//HighLogic.LoadScene(GameScenes.SPACECENTER);
2001-
HighLogic.LoadScene(GameScenes.TRACKSTATION);
2002-
return;
2003-
2004-
Int32 FirstVessel;
2005-
Boolean blnFoundVessel = false;
2006-
for (FirstVessel = 0; FirstVessel < game.flightState.protoVessels.Count; FirstVessel++)
2007-
{
2008-
if (game.flightState.protoVessels[FirstVessel].vesselType != VesselType.SpaceObject &&
2009-
game.flightState.protoVessels[FirstVessel].vesselType != VesselType.Unknown)
2010-
{
2011-
blnFoundVessel = true;
2012-
break;
2013-
}
2014-
}
2015-
if (!blnFoundVessel)
2016-
FirstVessel = 0;
2017-
FlightDriver.StartAndFocusVessel(game, FirstVessel);
2018-
}
2019-
2020-
//CheatOptions.InfiniteFuel = true;
2021-
}
2022-
}
2023-
}
1981+
// //This will kick us into the save called default and set the first vessel active
1982+
// [KSPAddon(KSPAddon.Startup.MainMenu, false)]
1983+
// public class Debug_AutoLoadPersistentSaveOnStartup : MonoBehaviour
1984+
// {
1985+
// //use this variable for first run to avoid the issue with when this is true and multiple addons use it
1986+
// public static bool first = true;
1987+
// public void Start()
1988+
// {
1989+
// //only do it on the first entry to the menu
1990+
// if (first)
1991+
// {
1992+
// first = false;
1993+
// HighLogic.SaveFolder = "default";
1994+
//// HighLogic.SaveFolder = "Career";
1995+
// Game game = GamePersistence.LoadGame("persistent", HighLogic.SaveFolder, true, false);
1996+
1997+
// if (game != null && game.flightState != null && game.compatible)
1998+
// {
1999+
// //straight to spacecenter
2000+
// HighLogic.CurrentGame = game;
2001+
// //HighLogic.LoadScene(GameScenes.SPACECENTER);
2002+
// HighLogic.LoadScene(GameScenes.TRACKSTATION);
2003+
// return;
2004+
2005+
// Int32 FirstVessel;
2006+
// Boolean blnFoundVessel = false;
2007+
// for (FirstVessel = 0; FirstVessel < game.flightState.protoVessels.Count; FirstVessel++)
2008+
// {
2009+
// if (game.flightState.protoVessels[FirstVessel].vesselType != VesselType.SpaceObject &&
2010+
// game.flightState.protoVessels[FirstVessel].vesselType != VesselType.Unknown)
2011+
// {
2012+
// blnFoundVessel = true;
2013+
// break;
2014+
// }
2015+
// }
2016+
// if (!blnFoundVessel)
2017+
// FirstVessel = 0;
2018+
// FlightDriver.StartAndFocusVessel(game, FirstVessel);
2019+
// }
2020+
2021+
// //CheatOptions.InfiniteFuel = true;
2022+
// }
2023+
// }
2024+
// }
20242025
#endif
20252026
}

KerbalAlarmClock/KerbalAlarmClock.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@
3838
<Prefer32Bit>false</Prefer32Bit>
3939
</PropertyGroup>
4040
<ItemGroup>
41-
<Reference Include="Assembly-CSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
41+
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
4242
<SpecificVersion>False</SpecificVersion>
43-
<HintPath>C:\Squad\KSP\KSP\Library\ScriptAssemblies\Assembly-CSharp.dll</HintPath>
43+
<HintPath>..\..\_Versions\KSP_win_PluginTest\KSP_Data\Managed\Assembly-CSharp.dll</HintPath>
4444
</Reference>
4545
<Reference Include="System" />
4646
<Reference Include="System.Data" />
4747
<Reference Include="System.Xml" />
4848
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
4949
<SpecificVersion>False</SpecificVersion>
50-
<HintPath>C:\Squad\KSP\KSP\Library\UnityAssemblies\UnityEngine.dll</HintPath>
50+
<HintPath>..\..\_Versions\KSP_win_PluginTest\KSP_Data\Managed\UnityEngine.dll</HintPath>
5151
</Reference>
5252
</ItemGroup>
5353
<ItemGroup>

KerbalAlarmClock/KerbalAlarmClock.version

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@
44
"DOWNLOAD" : "https://github.com/TriggerAu/KerbalAlarmClock/releases",
55
"VERSION": {
66
"MAJOR": 3,
7-
"MINOR": 8,
8-
"PATCH": 5,
7+
"MINOR": 9,
8+
"PATCH": 0,
99
"BUILD": 0
1010
},
1111
"KSP_VERSION": {
1212
"MAJOR": 1,
13-
"MINOR": 3,
14-
"PATCH": 0
13+
"MINOR": 4,
14+
"PATCH": 1
1515
},
1616
"KSP_VERSION_MIN": {
1717
"MAJOR": 1,
18-
"MINOR": 3,
18+
"MINOR": 4,
1919
"PATCH": 0
2020
},
2121
"KSP_VERSION_MAX": {
2222
"MAJOR": 1,
23-
"MINOR": 3,
23+
"MINOR": 4,
2424
"PATCH": 99
2525
}
2626
}

KerbalAlarmClock/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
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("3.8.5.0")]
36-
[assembly: AssemblyFileVersion("3.8.5.0")]
35+
[assembly: AssemblyVersion("3.9.0.0")]
36+
[assembly: AssemblyFileVersion("3.9.0.0")]

KerbalAlarmClock_APITester/Framework/ConfigNodeStorage.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,19 @@ public Boolean Save()
156156
public Boolean Save(String fileFullName)
157157
{
158158
Boolean blnReturn = false;
159+
try
160+
{
161+
if (!System.IO.Directory.Exists(System.IO.Path.GetDirectoryName(fileFullName)))
162+
{
163+
System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(fileFullName));
164+
}
165+
}
166+
catch (Exception ex)
167+
{
168+
LogFormatted("Unable to create directory for ConfigNode file({0})-Error:{1}", fileFullName, ex.Message);
169+
blnReturn = false;
170+
}
171+
159172
try
160173
{
161174
//Encode the current object

KerbalAlarmClock_APITester/Framework/MonoBehaviourExtended.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,20 @@ internal virtual void FixedUpdate()
298298
internal virtual void LateUpdate()
299299
{ }
300300

301+
/// <summary>
302+
/// <summary>
303+
/// Unity: OnPreCull is called before a camera culls the scene. This function is called only if the script is attached to the camera and is enabled.
304+
///
305+
/// Trigger: This function is one of the first in the Scene Rendering part of the update loop. When the plugin sees thi function all the background logic is completed
306+
/// At this point in the loop all the positions for onscreen elements are set and using this section can lead to nolag updates on graphic objects
307+
///
308+
/// NOTE: The class must be attached to a camera object to have this get called - obj = MapView.MapCamera.gameObject.AddComponent<MBExtended>();
309+
///
310+
/// See this for info on order of execuction: http://docs.unity3d.com/Documentation/Manual/ExecutionOrder.html
311+
/// </summary>
312+
internal virtual void OnPreCull()
313+
{ }
314+
301315
/// <summary>
302316
/// Unity: Update is called every frame, if the MonoBehaviour is enabled.
303317
///

0 commit comments

Comments
 (0)