From 12087a11e6dc85c6fb2a6dd90ff574796c1c6639 Mon Sep 17 00:00:00 2001 From: FenPhoenix Date: Fri, 27 Oct 2023 09:24:18 -0700 Subject: [PATCH] Update notes after testing --- AngelLoader/TDM/TDMParser.cs | 3 +-- AngelLoader/TDM/TDMWatchers.cs | 11 ++++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/AngelLoader/TDM/TDMParser.cs b/AngelLoader/TDM/TDMParser.cs index 3bbfc393f..98ce7c8c6 100644 --- a/AngelLoader/TDM/TDMParser.cs +++ b/AngelLoader/TDM/TDMParser.cs @@ -12,8 +12,7 @@ namespace AngelLoader; internal static class TDMParser { - // @TDM: Test with a fresh install of TDM where no FMs dir exists, or no missions.tdminfo exists, etc. - + // Works fine when missions.tdminfo doesn't exist, just returns an empty list. internal static List ParseMissionsInfoFile() { const string missionInfoId = "tdm_missioninfo"; diff --git a/AngelLoader/TDM/TDMWatchers.cs b/AngelLoader/TDM/TDMWatchers.cs index f7fa07275..85debc252 100644 --- a/AngelLoader/TDM/TDMWatchers.cs +++ b/AngelLoader/TDM/TDMWatchers.cs @@ -179,9 +179,14 @@ static bool TryGetLines(string file, [NotNullWhen(true)] out List? lines } } - // @TDM(Watchers): If we don't have an fms dir, all watchers are disabled. Should we be smarter? - // Should we try to have it auto-pick-up the fms dir if it's created and start watching, then stop if it's - // removed? Do we need the same currentfm.txt? + /* + @TDM(Watchers): If we don't have an fms dir, all watchers are disabled. + -currentfm.txt is fine, the watcher works even if there isn't one and then one is created. + -missions.tdminfo is also fine, if missing the watcher will pick it back up when it gets created and modified. + -A fresh TDM install puts the fms dir there already as it comes with a few FMs, so we can probably just + ignore the edge case of no fms dir. It's highly unlikely to occur, and all it results in is auto-refresh + shutting off until the next app run. + */ internal static void DeferredWatchersEnable(bool enableTDMWatchers) { string gamePath = Config.GetGamePath(GameIndex.TDM);