public static void LoadAll() { if (OnStartedLoadingMods != null) { OnStartedLoadingMods(); } if (Directory.Exists(ModsDirectory)) { foreach (var ModPath in Directory.GetDirectories(ModsDirectory)) { TitanfallMod newMod = new TitanfallMod(ModPath); string modDirectory = System.IO.Path.GetFileName(newMod.Directory); if (!modDirectory.StartsWith(".")) { LoadedMods.Add(newMod); if (OnModLoaded != null) { OnModLoaded(newMod); } } } } if (OnFinishedLoadingMods != null) { OnFinishedLoadingMods(); } }
public static void LoadAll() { if (OnStartedLoadingMods != null) { OnStartedLoadingMods(); } string modsFullDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ModsDirectory); if (Directory.Exists(modsFullDirectory)) { foreach (var modPath in Directory.GetDirectories(modsFullDirectory)) { TitanfallMod newMod = new TitanfallMod(modPath); string modDirectory = Path.GetFileName(newMod.Directory); if (!modDirectory.StartsWith(".")) { LoadedMods.Add(newMod); if (OnModLoaded != null) { OnModLoaded(newMod); } } } } if (OnFinishedLoadingMods != null) { OnFinishedLoadingMods(); } }