Skip to content

Commit 5c09155

Browse files
committed
debugging
1 parent 410b2ef commit 5c09155

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

GalacticScale2/Scripts/Bootstrap.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ internal void Awake()
4141
Logger = new ManualLogSource("GS2");
4242
BepInEx.Logging.Logger.Sources.Add(Logger);
4343
GS2.ConsoleSplash();
44-
Environment.SetEnvironmentVariable("MONOMOD_DMD_TYPE", "cecil");
45-
Environment.SetEnvironmentVariable("MONOMOD_DMD_DUMP", "./mmdump");
44+
//Environment.SetEnvironmentVariable("MONOMOD_DMD_TYPE", "cecil");
45+
//Environment.SetEnvironmentVariable("MONOMOD_DMD_DUMP", "./mmdump");
4646
Harmony.CreateAndPatchAll(typeof(PatchOnWhatever));
4747
Harmony.CreateAndPatchAll(typeof(PatchOnBlueprintUtils));
4848
Harmony.CreateAndPatchAll(typeof(PatchOnBuildingGizmo));

GalacticScale2/Scripts/GalacticScale2.0/Init.cs

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,29 +117,35 @@ public static void UpdateNebulaSettings()
117117
public static void Init()
118118

119119
{
120+
Warn("Start");
120121
if (File.Exists(Path.Combine(AssemblyPath, "icon.png")))
121122
{
122123
updateMessage += "Update Detected. Please do not save over existing saves \r\nuntil you are sure you can load saves saved with this version!\r\nPlease Click GS2 Help and click the link to join our community on discord for preview builds and to help shape the mod going forward".Translate();
123124
File.Delete(Path.Combine(AssemblyPath, "icon.png"));
124125
updateMessage += "The latest DSP update has added additional planet themes which are yet to be included in GS2. \r\nI'm working on getting them added to the GS2 themeset, as well as implementing their new subtheme system";
125126
}
126127

127-
// Warn("Start");
128+
Warn("Step2");
128129
if (Directory.Exists(OldDataDir) && !Directory.Exists(DataDir))
129130
{
130131
Warn($"Moving Configs from {OldDataDir} to {DataDir}");
131132
Directory.Move(OldDataDir, DataDir);
132133
updateMessage += "Galactic Scale config Directory has changed to \r\n ...\\BepInEx\\config\\GalacticScale \r\nThis is to prevent data being lost when updating using the mod manager.\r\n".Translate();
133134
}
134-
135+
Warn("Step3");
135136
if (!Directory.Exists(DataDir)) Directory.CreateDirectory(DataDir);
137+
Warn("Step4");
136138
Config.Init();
139+
Warn("Step5");
137140
LoadPreferences(true);
141+
Warn("Step6");
138142
var themes = GSSettings.ThemeLibrary.Select(t => t.Value).ToList();
143+
Warn("Step7");
139144
foreach (var t in themes) t.Process();
145+
Warn("Step8");
140146
LoadGenerators();
147+
Warn("Step9");
141148
LoadPreferences();
142-
143149
Log("End");
144150
}
145151

@@ -150,16 +156,22 @@ public static void ShowMessage(string message, string title = "Galactic Scale",
150156

151157
public static void OnMenuLoaded()
152158
{
159+
Warn("Start");
153160
if (MenuHasLoaded) return;
154161
MenuHasLoaded = true;
155162
Log("Loading External Themes");
156163
LoadExternalThemes(Path.Combine(DataDir, "CustomThemes"));
164+
Warn("Step1");
157165
ExternalThemeProcessor.LoadEnabledThemes();
166+
Warn("Step2");
158167
Config.InitThemePanel();
168+
Warn("Step3");
159169
if (Config.Dev) DumpObjectToJson(Path.Combine(DataDir, "ldbthemes.json"), LDB._themes.dataArray);
170+
Warn("Step4");
160171
LDB._themes.Select(1);
172+
Warn("Step5");
161173
if (Config.Dev) Utils.DumpProtosToCSharp();
162-
174+
Warn("Step6");
163175
if (Config.Dev)
164176
{
165177
var da = LDB._veges.dataArray;
@@ -174,14 +186,15 @@ public static void OnMenuLoaded()
174186

175187
DumpObjectToJson(Path.Combine(DataDir, "ldbvege.json"), vegeDict);
176188
}
177-
189+
Warn("Step7");
178190
if (updateMessage != "")
179191
{
180192
UIMessageBox.Show("Update Information", updateMessage, "Noted!", 0);
181193
updateMessage = "";
182194
}
183-
195+
Warn("Step8");
184196
UpdateNebulaSettings();
197+
Warn("Step9");
185198
}
186199
}
187200
}

0 commit comments

Comments
 (0)