Skip to content

Commit

Permalink
display different error text if user loaded project for different game (
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmicDreamsOfCode committed Feb 9, 2023
1 parent d719299 commit ecce9f6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions FrostyEditor/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,14 @@ private void LoadProject(string filename, bool saveProject)
newProject = new FrostyProject();
if (!newProject.Load(filename))
{
// failed to load for whatever reason
App.Logger.LogWarning("Failed to load {0}", filename);
if (ProfilesLibrary.DataVersion != newProject.gameVersion) //user loaded project for different game
{
App.Logger.LogWarning("Project {0} is not for {1}.", filename, ProfilesLibrary.DisplayName);
}
else //corrupt or not a frosty project
{
App.Logger.LogWarning("Failed to load {0}", filename);
}
newProject = null;
}
});
Expand Down
2 changes: 1 addition & 1 deletion FrostyPlugin/FrostyProject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public string Filename
private string filename;
private DateTime creationDate;
private DateTime modifiedDate;
private uint gameVersion;
public uint gameVersion;

// mod export settings
private ModSettings modSettings;
Expand Down

0 comments on commit ecce9f6

Please sign in to comment.