Skip to content

Commit

Permalink
Fix custom profiles having latest-release or latest-beta versionId
Browse files Browse the repository at this point in the history
  • Loading branch information
TrinityDevelopers committed Jun 24, 2020
1 parent d474845 commit 8bd5954
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 16 deletions.
4 changes: 2 additions & 2 deletions ZenovaLauncher/Mods/Mod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ public class Mod
public Version Version { get; set; }
public string MinVersion
{
get { return MinMCVersion.InternalName; }
get { return MinMCVersion.Name; }
set { MinMCVersion = VersionManager.instance.GetVersionFromString(value); }
}
public string MaxVersion
{
get { return MaxMCVersion.InternalName; }
get { return MaxMCVersion.Name; }
set { MaxMCVersion = VersionManager.instance.GetVersionFromString(value); }
}
[JsonIgnore]
Expand Down
9 changes: 8 additions & 1 deletion ZenovaLauncher/Profiles/Profile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,14 @@ public Profile() { }
[JsonProperty]
public string VersionId
{
get { return Version.InternalName; }
get
{
if (Type == ProfileType.LatestRelease)
return "latest-release";
if (Type == ProfileType.LatestBeta)
return "latest-beta";
return Version.Name;
}
set { Version = VersionManager.instance.GetVersionFromString(value); }
}
[JsonProperty]
Expand Down
4 changes: 2 additions & 2 deletions ZenovaLauncher/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.1.3")]
[assembly: AssemblyFileVersion("1.0.1.3")]
[assembly: AssemblyVersion("1.0.1.4")]
[assembly: AssemblyFileVersion("1.0.1.4")]
11 changes: 0 additions & 11 deletions ZenovaLauncher/Versions/MinecraftVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,6 @@ public string FullName
return (Release ? "release " : (Beta ? "beta " : "old_beta ")) + Name;
}
}
public string InternalName
{
get
{
if (LatestRelease)
return "latest-release";
if (LatestBeta)
return "latest-beta";
return Name;
}
}
public Version Version { get; set; }
public string UUID { get; set; }
public bool Beta { get; set; }
Expand Down

0 comments on commit 8bd5954

Please sign in to comment.