public static string Find(GameModInfo info) { Dictionary <string, string> gameids = info.GameIDs; string exedir = info.ExecutableDir; string exename = info.ExecutableName; for (int i = 0; i < Finders.Count; i++) { GameFinder finder = Finders[i]; string s; if (!gameids.TryGetValue(finder.ID, out s)) { continue; } if ((s = finder.FindGameDir(s)) != null) { if (!string.IsNullOrEmpty(exedir)) { s = Path.Combine(s, exedir); } if (!string.IsNullOrEmpty(exename)) { s = Path.Combine(s, exename); } if (File.Exists(s) || Directory.Exists(s)) { return(s); } } } return(null); }
public GameModder(GameModInfo info) { Info = info; }