Pull up data field in metadata.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Cryville.Common;
|
||||
using Cryville.Common.Unity.UI;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
@@ -100,9 +101,15 @@ namespace Cryville.Crtr.Browsing {
|
||||
public class MetaInfo {
|
||||
public string name { 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 MetaInfo song { get; set; }
|
||||
public SongMetaInfo song { get; set; }
|
||||
public float length { get; set; }
|
||||
public string ruleset { get; set; }
|
||||
public int note_count { get; set; }
|
||||
|
@@ -33,7 +33,7 @@ namespace Cryville.Crtr.Extensions.Malody {
|
||||
ChartMeta meta = new ChartMeta() {
|
||||
name = src.meta.version,
|
||||
author = src.meta.creator,
|
||||
song = new MetaInfo() {
|
||||
song = new SongMetaInfo() {
|
||||
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,
|
||||
},
|
||||
|
@@ -18,14 +18,11 @@ namespace Cryville.Crtr {
|
||||
[JsonRequired]
|
||||
public string @base;
|
||||
|
||||
[JsonRequired]
|
||||
public string pdt;
|
||||
|
||||
[JsonIgnore]
|
||||
public PdtRuleset Root { get; private set; }
|
||||
|
||||
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();
|
||||
Root = new RulesetInterpreter(src, null).Interpret();
|
||||
}
|
||||
|
@@ -19,9 +19,6 @@ namespace Cryville.Crtr {
|
||||
|
||||
[JsonRequired]
|
||||
public string ruleset;
|
||||
|
||||
[JsonRequired]
|
||||
public string pdt;
|
||||
|
||||
public List<string> frames = new List<string>();
|
||||
|
||||
@@ -29,7 +26,7 @@ namespace Cryville.Crtr {
|
||||
public PdtSkin Root { get; private set; }
|
||||
|
||||
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();
|
||||
Root = new SkinInterpreter(src, null).Interpret();
|
||||
}
|
||||
|
Reference in New Issue
Block a user