Pull up data field in metadata.
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
using Cryville.Common;
|
using Cryville.Common;
|
||||||
using Cryville.Common.Unity.UI;
|
using Cryville.Common.Unity.UI;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.SceneManagement;
|
using UnityEngine.SceneManagement;
|
||||||
@@ -100,9 +101,15 @@ namespace Cryville.Crtr.Browsing {
|
|||||||
public class MetaInfo {
|
public class MetaInfo {
|
||||||
public string name { get; set; }
|
public string name { get; set; }
|
||||||
public string author { get; set; }
|
public string author { get; set; }
|
||||||
|
[JsonRequired]
|
||||||
|
public string data { get; set; }
|
||||||
|
}
|
||||||
|
public class SongMetaInfo {
|
||||||
|
public string name { get; set; }
|
||||||
|
public string author { get; set; }
|
||||||
}
|
}
|
||||||
public class ChartMeta : MetaInfo {
|
public class ChartMeta : MetaInfo {
|
||||||
public MetaInfo song { get; set; }
|
public SongMetaInfo song { get; set; }
|
||||||
public float length { get; set; }
|
public float length { get; set; }
|
||||||
public string ruleset { get; set; }
|
public string ruleset { get; set; }
|
||||||
public int note_count { get; set; }
|
public int note_count { get; set; }
|
||||||
|
@@ -33,7 +33,7 @@ namespace Cryville.Crtr.Extensions.Malody {
|
|||||||
ChartMeta meta = new ChartMeta() {
|
ChartMeta meta = new ChartMeta() {
|
||||||
name = src.meta.version,
|
name = src.meta.version,
|
||||||
author = src.meta.creator,
|
author = src.meta.creator,
|
||||||
song = new MetaInfo() {
|
song = new SongMetaInfo() {
|
||||||
name = src.meta.song.titleorg != null ? src.meta.song.titleorg : src.meta.song.title,
|
name = src.meta.song.titleorg != null ? src.meta.song.titleorg : src.meta.song.title,
|
||||||
author = src.meta.song.artistorg != null ? src.meta.song.artistorg : src.meta.song.artist,
|
author = src.meta.song.artistorg != null ? src.meta.song.artistorg : src.meta.song.artist,
|
||||||
},
|
},
|
||||||
|
@@ -18,14 +18,11 @@ namespace Cryville.Crtr {
|
|||||||
[JsonRequired]
|
[JsonRequired]
|
||||||
public string @base;
|
public string @base;
|
||||||
|
|
||||||
[JsonRequired]
|
|
||||||
public string pdt;
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public PdtRuleset Root { get; private set; }
|
public PdtRuleset Root { get; private set; }
|
||||||
|
|
||||||
public void LoadPdt(DirectoryInfo dir) {
|
public void LoadPdt(DirectoryInfo dir) {
|
||||||
using (StreamReader pdtreader = new StreamReader(dir.FullName + "/" + pdt + ".pdt", Encoding.UTF8)) {
|
using (StreamReader pdtreader = new StreamReader(dir.FullName + "/" + data + ".pdt", Encoding.UTF8)) {
|
||||||
var src = pdtreader.ReadToEnd();
|
var src = pdtreader.ReadToEnd();
|
||||||
Root = new RulesetInterpreter(src, null).Interpret();
|
Root = new RulesetInterpreter(src, null).Interpret();
|
||||||
}
|
}
|
||||||
|
@@ -20,16 +20,13 @@ namespace Cryville.Crtr {
|
|||||||
[JsonRequired]
|
[JsonRequired]
|
||||||
public string ruleset;
|
public string ruleset;
|
||||||
|
|
||||||
[JsonRequired]
|
|
||||||
public string pdt;
|
|
||||||
|
|
||||||
public List<string> frames = new List<string>();
|
public List<string> frames = new List<string>();
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public PdtSkin Root { get; private set; }
|
public PdtSkin Root { get; private set; }
|
||||||
|
|
||||||
public void LoadPdt(DirectoryInfo dir) {
|
public void LoadPdt(DirectoryInfo dir) {
|
||||||
using (StreamReader pdtreader = new StreamReader(dir.FullName + "/" + pdt + ".pdt", Encoding.UTF8)) {
|
using (StreamReader pdtreader = new StreamReader(dir.FullName + "/" + data + ".pdt", Encoding.UTF8)) {
|
||||||
var src = pdtreader.ReadToEnd();
|
var src = pdtreader.ReadToEnd();
|
||||||
Root = new SkinInterpreter(src, null).Interpret();
|
Root = new SkinInterpreter(src, null).Interpret();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user