Skip to content

Commit 2a8cd2e

Browse files
authored
Merge pull request #23 from KaBooMa/fix-fresh-save
fix: Resolved quests trying to load on a blank save, resulting in error.
2 parents 9d5c527 + c12bbfc commit 2a8cd2e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

S1API/Internal/Patches/QuestPatches.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ private static void QuestManagerWriteData(S1Quests.QuestManager __instance, stri
5353
[HarmonyPostfix]
5454
private static void QuestsLoaderLoad(S1Loaders.QuestsLoader __instance, string mainPath)
5555
{
56+
// Make sure we have a quests directory (fresh saves don't at this point in runtime)
57+
if (!Directory.Exists(mainPath))
58+
return;
59+
5660
string[] questDirectories = Directory.GetDirectories(mainPath)
5761
.Select(Path.GetFileName)
5862
.Where(directory => directory.StartsWith("Quest_"))

0 commit comments

Comments
 (0)