Пример #1
0
        private static IASL GetGame(string filename, string libraryFolder, string originalFilename)
        {
            string tempDir;

            switch (System.IO.Path.GetExtension(filename).ToLower())
            {
            case ".aslx":
            case ".quest":
            case ".quest-save":
                return(new WorldModel(filename, libraryFolder, originalFilename));

            case ".asl":
            case ".cas":
            case ".qsg":
                LegacyASL.LegacyGame game = new TextAdventures.Quest.LegacyASL.LegacyGame(filename, originalFilename);
                game.SetUnzipFunction(UnzipAndGetGameFile);
                return(game);

            case ".zip":
                return(GetGameFromZip(filename, libraryFolder, out tempDir));

            default:
                return(null);
            }
        }
Пример #2
0
 private static IASL GetGame(string filename, string libraryFolder, string originalFilename)
 {
     string tempDir;
     switch (System.IO.Path.GetExtension(filename).ToLower())
     {
         case ".aslx":
         case ".quest":
         case ".quest-save":
             return new WorldModel(filename, libraryFolder, originalFilename);
         case ".asl":
         case ".cas":
         case ".qsg":
             LegacyASL.LegacyGame game = new TextAdventures.Quest.LegacyASL.LegacyGame(filename, originalFilename);
             game.SetUnzipFunction(UnzipAndGetGameFile);
             return game;
         case ".zip":
             return GetGameFromZip(filename, libraryFolder, out tempDir);
         default:
             return null;
     }
 }