Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 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;
 }