Add backward compatibility for skin. (Amend)
This commit is contained in:
@@ -2,6 +2,7 @@ using Cryville.Common;
|
||||
using Cryville.Common.Pdt;
|
||||
using Cryville.Crtr.Browsing;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
@@ -33,8 +34,11 @@ namespace Cryville.Crtr {
|
||||
Root.elements = (SkinElement)new SkinInterpreter(src, new PdtBinder()).Interpret(typeof(SkinElement));
|
||||
}
|
||||
else {
|
||||
if (format[1] == 1) {
|
||||
Root = (PdtSkin)new SkinInterpreter(src, new PdtBinder()).Interpret(typeof(PdtSkin));
|
||||
switch (format[1]) {
|
||||
case 1:
|
||||
Root = (PdtSkin)new SkinInterpreter(src, new PdtBinder()).Interpret(typeof(PdtSkin));
|
||||
break;
|
||||
default: throw new NotSupportedException("Unsupported skin format");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user