Skip to main content

MelonModFolders

A internal static class in TavernLib, TavernLib.Backend.Mods. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

Internal: edits MelonLoader's private list of mod folders at start to match the disk: disabled mods are dropped, and each enabled mod of ours gets this side's build folder (.server or .client_windows).

Fields​

2 private and internal fields
MemberWhat it is
private static readonly string[] ExcludedNamesFolder names MelonLoader skips by default: Broken, Retired, Disabled.
private static readonly string[] OtherScanNamesFolder names under Mods/ that MelonLoader treats as user libs or plugins, not mod folders.

Methods​

MemberWhat it is
static void SyncForBoot(bool serverProcess)Runs Sync for the server or Windows client target. Logs an error if it fails.
5 private and internal methods
MemberWhat it is
private static void AddWithSubfolders(string dir, List<string> into)Adds a folder and its non-excluded subfolders to a list.
private static bool IsExcluded(string dir)Returns whether MelonLoader skips the folder, by a ~ or . prefix or an excluded name.
private static bool IsUnder(string path, string root)Returns whether a path lies inside a root folder.
private static string Normalize(string path)Returns the full path without a trailing separator.
internal static void Sync(string gameDir, string target)Matches MelonLoader's folder list to the disk for one target. Logs a warning and loads no managed mod if the private field can't be reached.