Skip to content

Commit

Permalink
Merge pull request #2 from ScrewThisNoise/master
Browse files Browse the repository at this point in the history
Added game tag to manifest and manifest editor
Reordered tabs
Added zipmod filetype and set as standard
Reordered file menu
  • Loading branch information
ScrewThisNoise authored Sep 26, 2019
2 parents ad9a498 + 35fde17 commit ce4b4ee
Show file tree
Hide file tree
Showing 6 changed files with 188 additions and 129 deletions.
6 changes: 6 additions & 0 deletions ZipStudio.Core/Manifest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ public string Website
set => SetContents("website", value);
}

public string Game
{
get => GetContents("game");
set => SetContents("game", value);
}

#endregion

public Manifest()
Expand Down
1 change: 1 addition & 0 deletions ZipStudio.Core/manifest template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
<author></author>
<description></description>
<website></website>
<game></game>
</manifest>
7 changes: 5 additions & 2 deletions ZipStudio/Importer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static bool ImportFromDirectory(out Mod mod, out string message)

CommonSaveFileDialog saveDialog = new CommonSaveFileDialog
{
Filters = { new CommonFileDialogFilter("Compressed folder", "*.zip") },
Filters = { new CommonFileDialogFilter("Compressed mod", "*.zipmod"), new CommonFileDialogFilter("Compressed folder", "*.zip") },
Title = "Save new .zip file",
AlwaysAppendDefaultExtension = true
};
Expand All @@ -41,7 +41,10 @@ public static bool ImportFromDirectory(out Mod mod, out string message)
string sourceDir = openDialog.FileName;
string savePath = saveDialog.FileName;

if (!savePath.ToLower().EndsWith(".zip"))
if (!savePath.ToLower().EndsWith(".zipmod") && (saveDialog.SelectedFileTypeIndex == 1))
savePath += ".zipmod";

if (!savePath.ToLower().EndsWith(".zip") && (saveDialog.SelectedFileTypeIndex == 2))
savePath += ".zip";

if (File.Exists(savePath))
Expand Down
1 change: 1 addition & 0 deletions ZipStudio/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ internal static class Program
[STAThread]
private static void Main()
{

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new formMain());
Expand Down
Loading

0 comments on commit ce4b4ee

Please sign in to comment.