Skip to content

Commit 7081999

Browse files
committed
Disable startup popup, it's been long enough
1 parent 37f5f25 commit 7081999

1 file changed

Lines changed: 38 additions & 38 deletions

File tree

Source/StartupPopup.cs

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,47 +6,47 @@
66

77
namespace RealSolarSystem
88
{
9-
[KSPAddon(KSPAddon.Startup.Instantly, true)]
10-
public class StartupPopup : MonoBehaviour
11-
{
12-
private const string PreferenceFileName = "RSSFinalizeOrbitWarning";
13-
private static string PreferenceFilePath => Path.Combine(
14-
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
15-
"PluginData",
16-
PreferenceFileName);
9+
//[KSPAddon(KSPAddon.Startup.Instantly, true)]
10+
//public class StartupPopup : MonoBehaviour
11+
//{
12+
// private const string PreferenceFileName = "RSSFinalizeOrbitWarning";
13+
// private static string PreferenceFilePath => Path.Combine(
14+
// Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
15+
// "PluginData",
16+
// PreferenceFileName);
1717

18-
public void Start()
19-
{
20-
if (AssemblyLoader.loadedAssemblies.Any(a => string.Equals(a.name, "ksp_plugin_adapter", StringComparison.OrdinalIgnoreCase)))
21-
return;
18+
// public void Start()
19+
// {
20+
// if (AssemblyLoader.loadedAssemblies.Any(a => string.Equals(a.name, "ksp_plugin_adapter", StringComparison.OrdinalIgnoreCase)))
21+
// return;
2222

23-
if (File.Exists(PreferenceFilePath)) return;
23+
// if (File.Exists(PreferenceFilePath)) return;
2424

25-
PopupDialog.SpawnPopupDialog(
26-
new Vector2(0, 0),
27-
new Vector2(0, 0),
28-
new MultiOptionDialog(
29-
"RSSStartupDialog",
30-
"Warning: This version contains breaking changes for non-Principia users. Significant and necessary fixes have been implemented, which may result in planets changing positions in their orbits. Existing maneuvers and vessels in flight may have dramatically altered future encounters. For existing saves, it is recommended to revert to the prior CKAN version and upgrading is not recommended. Please create backups before attempting to update existing saves.",
31-
"Real Solar System",
32-
HighLogic.UISkin,
33-
new DialogGUIVerticalLayout(
34-
new DialogGUIButton("Don't show again", RememberPreference, true),
35-
new DialogGUIButton("Ok", () => { }, true)
36-
)
37-
),
38-
true,
39-
HighLogic.UISkin);
40-
}
25+
// PopupDialog.SpawnPopupDialog(
26+
// new Vector2(0, 0),
27+
// new Vector2(0, 0),
28+
// new MultiOptionDialog(
29+
// "RSSStartupDialog",
30+
// "Warning: This version contains breaking changes for non-Principia users. Significant and necessary fixes have been implemented, which may result in planets changing positions in their orbits. Existing maneuvers and vessels in flight may have dramatically altered future encounters. For existing saves, it is recommended to revert to the prior CKAN version and upgrading is not recommended. Please create backups before attempting to update existing saves.",
31+
// "Real Solar System",
32+
// HighLogic.UISkin,
33+
// new DialogGUIVerticalLayout(
34+
// new DialogGUIButton("Don't show again", RememberPreference, true),
35+
// new DialogGUIButton("Ok", () => { }, true)
36+
// )
37+
// ),
38+
// true,
39+
// HighLogic.UISkin);
40+
// }
4141

42-
private static void RememberPreference()
43-
{
44-
FileInfo fi = new FileInfo(PreferenceFilePath);
45-
if (!Directory.Exists(fi.Directory.FullName))
46-
Directory.CreateDirectory(fi.Directory.FullName);
42+
// private static void RememberPreference()
43+
// {
44+
// FileInfo fi = new FileInfo(PreferenceFilePath);
45+
// if (!Directory.Exists(fi.Directory.FullName))
46+
// Directory.CreateDirectory(fi.Directory.FullName);
4747

48-
// create empty file
49-
File.Create(PreferenceFilePath).Close();
50-
}
51-
}
48+
// // create empty file
49+
// File.Create(PreferenceFilePath).Close();
50+
// }
51+
//}
5252
}

0 commit comments

Comments
 (0)