46 lines
1.1 KiB
C#
46 lines
1.1 KiB
C#
using Cryville.Common;
|
|
using Cryville.Common.Collections.Generic;
|
|
using Cryville.Common.Pdt;
|
|
using Cryville.Crtr.Extension;
|
|
using Newtonsoft.Json;
|
|
using System.IO;
|
|
using System.Text;
|
|
|
|
namespace Cryville.Crtr.Ruleset {
|
|
public class VirtualPlayerStrategy : MetaInfo {
|
|
[JsonRequired]
|
|
public long format;
|
|
|
|
[JsonRequired]
|
|
public string ruleset;
|
|
|
|
public string chart;
|
|
|
|
[JsonIgnore]
|
|
public PdtVirtualPlayerStrategy Root { get; private set; }
|
|
|
|
public void LoadPdt(DirectoryInfo dir) {
|
|
using StreamReader pdtreader = new(Path.Combine(dir.FullName, data + ".pdt"), Encoding.UTF8);
|
|
var src = pdtreader.ReadToEnd();
|
|
Root = (PdtVirtualPlayerStrategy)new RulesetInterpreter(src, null).Interpret(typeof(PdtVirtualPlayerStrategy));
|
|
}
|
|
}
|
|
|
|
[Binder(typeof(PdtBinder))]
|
|
public class PdtVirtualPlayerStrategy {
|
|
public Identifier[] use;
|
|
public StrategyAction strategy;
|
|
|
|
public void Generate() {
|
|
|
|
}
|
|
}
|
|
|
|
public class StrategyAction {
|
|
[ElementList]
|
|
public PairList<RulesetSelectors, StrategyAction> Elements = new();
|
|
[PropertyList]
|
|
public PairList<ConstraintKey, PdtExpression> Properties = new();
|
|
}
|
|
}
|