private void Load(ModInfoBase dir) { foreach (var dirPath in Directory.GetDirectories(dir.ModPath)) { var info = new DirModInfo(dirPath); Load(info); if (info.Descendants().Any(m => !m.IsDir)) { dir.AddChild(info); } } foreach (var filePath in Directory.GetFiles(dir.ModPath)) { try { var modInfo = new ModInfo(filePath, this, WebModInfos); dir.AddChild(modInfo); } catch { } } }
private void Load() { EnumerateClasses(); var mods = new List <ModInfo>(); WebModInfos = WebManager.Instance.GetMods(); Root = new DirModInfo("mods"); if (Directory.Exists("mods")) { Load(Root); } FlowScriptVersion = GetVersion("FlowScriptEngine.dll"); FlowScriptBasicVersion = GetVersion("dlls\\FlowScriptEngineBasic.dll"); FlowScriptPPDVersion = GetVersion("dlls\\FlowScriptEnginePPD.dll"); FlowScriptSharpDXVersion = GetVersion("dlls\\FlowScriptEngineSlimDX.dll"); FlowScriptBasicExtensionVersion = GetVersion("dlls\\FlowScriptEngineBasicExtension.dll"); FlowScriptDataVersion = GetVersion("dlls\\FlowScriptEngineData.dll"); initialized = true; loading = false; #if DEBUG Console.WriteLine("Mod Load Finished"); #endif }