Ejemplo n.º 1
0
 private static void WriteArchive(ZipFile zip, bool isCloudSave, string path)
 {
     if (FileUtilities.Exists(path, isCloudSave))
     {
         zip.AddZipEntry(path, isCloudSave);
     }
     path = Path.ChangeExtension(path, ".twld");
     if (FileUtilities.Exists(path, isCloudSave))
     {
         zip.AddZipEntry(path, isCloudSave);
     }
 }
Ejemplo n.º 2
0
            /// <summary>
            /// Writes for local files
            /// </summary>
            private static void WriteLocal(ZipFile zip, string path)
            {
                // Write map files from plr dir
                var plrDir = Path.Combine(Path.GetDirectoryName(path), Path.GetFileNameWithoutExtension(path));

                if (Directory.Exists(plrDir))
                {
                    zip.AddZipEntry(plrDir);
                }
            }
Ejemplo n.º 3
0
            /// <summary>
            /// Write the archive. Writes the .plr and .tplr files, then writes the player directory
            /// </summary>
            private static void WriteArchive(ZipFile zip, bool isCloudSave, string path)
            {
                // Write .plr and .tplr files
                if (FileUtilities.Exists(path, isCloudSave))
                {
                    zip.AddZipEntry(path, isCloudSave);
                }
                path = Path.ChangeExtension(path, ".tplr");
                if (FileUtilities.Exists(path, isCloudSave))
                {
                    zip.AddZipEntry(path, isCloudSave);
                }

                if (isCloudSave)
                {
                    WriteCloud(zip, path);
                }
                else
                {
                    WriteLocal(zip, path);
                }
            }