public static string GetFileOutputPath(ComponentGameDir dir, string fileName, bool isLegacy) { string safeFileName = Path.GetFileName(fileName); if (dir == ComponentGameDir.GalacticAdventures) { return(Path.Combine(GameInfo.GalacticAdventuresData, safeFileName)); } else if (dir == ComponentGameDir.Spore) { return(Path.Combine(GameInfo.CoreSporeData, safeFileName)); } else if (dir == ComponentGameDir.ModAPI) { if (isLegacy) { return(Path.Combine(Settings.LegacyLibsPath, safeFileName)); } else { return(Path.Combine(Settings.ModLibsPath, safeFileName)); } } else { return(null); } }
public static string GetGameDirectory(ComponentGameDir dir, bool isLegacy) { if (dir == ComponentGameDir.GalacticAdventures) { return(GameInfo.GalacticAdventuresData); } else if (dir == ComponentGameDir.Spore) { return(GameInfo.CoreSporeData); } else if (isLegacy) { return(Settings.LegacyLibsPath); } else { return(Settings.ModLibsPath); } }
public ManualInstalledFile(string fileName, ComponentGameDir location, bool legacy) { RealName = fileName; Location = location; _legacy = legacy; }