Update ruleset and skin format number. (2)
This commit is contained in:
@@ -355,7 +355,7 @@ namespace Cryville.Crtr {
|
|||||||
skin = JsonConvert.DeserializeObject<Skin>(reader.ReadToEnd(), new JsonSerializerSettings() {
|
skin = JsonConvert.DeserializeObject<Skin>(reader.ReadToEnd(), new JsonSerializerSettings() {
|
||||||
MissingMemberHandling = MissingMemberHandling.Error
|
MissingMemberHandling = MissingMemberHandling.Error
|
||||||
});
|
});
|
||||||
if (skin.format != 2) throw new FormatException("Invalid skin file version");
|
if (skin.format != Skin.CURRENT_FORMAT) throw new FormatException("Invalid skin file version");
|
||||||
}
|
}
|
||||||
|
|
||||||
loadThread = new Thread(new ParameterizedThreadStart(Load));
|
loadThread = new Thread(new ParameterizedThreadStart(Load));
|
||||||
@@ -553,7 +553,7 @@ namespace Cryville.Crtr {
|
|||||||
ruleset = JsonConvert.DeserializeObject<Ruleset>(reader.ReadToEnd(), new JsonSerializerSettings() {
|
ruleset = JsonConvert.DeserializeObject<Ruleset>(reader.ReadToEnd(), new JsonSerializerSettings() {
|
||||||
MissingMemberHandling = MissingMemberHandling.Error
|
MissingMemberHandling = MissingMemberHandling.Error
|
||||||
});
|
});
|
||||||
if (ruleset.format != 2) throw new FormatException("Invalid ruleset file version");
|
if (ruleset.format != Ruleset.CURRENT_FORMAT) throw new FormatException("Invalid ruleset file version");
|
||||||
ruleset.LoadPdt(dir);
|
ruleset.LoadPdt(dir);
|
||||||
pruleset = ruleset.Root;
|
pruleset = ruleset.Root;
|
||||||
pruleset.Optimize(etor);
|
pruleset.Optimize(etor);
|
||||||
|
@@ -35,7 +35,7 @@ namespace Cryville.Crtr.Config {
|
|||||||
ruleset = JsonConvert.DeserializeObject<Ruleset>(reader.ReadToEnd(), new JsonSerializerSettings() {
|
ruleset = JsonConvert.DeserializeObject<Ruleset>(reader.ReadToEnd(), new JsonSerializerSettings() {
|
||||||
MissingMemberHandling = MissingMemberHandling.Error
|
MissingMemberHandling = MissingMemberHandling.Error
|
||||||
});
|
});
|
||||||
if (ruleset.format != 1) throw new FormatException("Invalid ruleset file version");
|
if (ruleset.format != Ruleset.CURRENT_FORMAT) throw new FormatException("Invalid ruleset file version");
|
||||||
ruleset.LoadPdt(dir);
|
ruleset.LoadPdt(dir);
|
||||||
}
|
}
|
||||||
FileInfo cfgfile = new FileInfo(
|
FileInfo cfgfile = new FileInfo(
|
||||||
|
@@ -12,6 +12,8 @@ using SIdentifier = Cryville.Common.Identifier;
|
|||||||
|
|
||||||
namespace Cryville.Crtr {
|
namespace Cryville.Crtr {
|
||||||
public class Ruleset : MetaInfo {
|
public class Ruleset : MetaInfo {
|
||||||
|
public const long CURRENT_FORMAT = 2;
|
||||||
|
|
||||||
[JsonRequired]
|
[JsonRequired]
|
||||||
public long format;
|
public long format;
|
||||||
|
|
||||||
|
@@ -12,6 +12,8 @@ using System.Text;
|
|||||||
|
|
||||||
namespace Cryville.Crtr {
|
namespace Cryville.Crtr {
|
||||||
public class Skin : MetaInfo {
|
public class Skin : MetaInfo {
|
||||||
|
public const long CURRENT_FORMAT = 2;
|
||||||
|
|
||||||
[JsonRequired]
|
[JsonRequired]
|
||||||
public long format;
|
public long format;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user