Update Malody extension to fit the new ruleset.
This commit is contained in:
@@ -42,21 +42,10 @@ namespace Cryville.Crtr.Extensions.Malody {
|
|||||||
var group = new Chart.Group() {
|
var group = new Chart.Group() {
|
||||||
tracks = new List<Chart.Track>(),
|
tracks = new List<Chart.Track>(),
|
||||||
notes = new List<Chart.Note>(),
|
notes = new List<Chart.Note>(),
|
||||||
motions = new List<Chart.Motion> {
|
motions = new List<Chart.Motion>(),
|
||||||
new Chart.Motion() { motion = "dir#0:-50,," },
|
|
||||||
new Chart.Motion() { motion = "dist:5h" },
|
|
||||||
new Chart.Motion() { motion = "visible:1" },
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
chart.groups.Add(group);
|
chart.groups.Add(group);
|
||||||
int col = src.meta.mode_ext.column;
|
int col = src.meta.mode_ext.column;
|
||||||
for (int i = 0; i < col; i++) {
|
|
||||||
group.tracks.Add(new Chart.Track {
|
|
||||||
motions = new List<Chart.Motion> {
|
|
||||||
new Chart.Motion() { motion = "pt:" + ((i + 0.5) / col * 0.9 - 0.45).ToString() + "w,-.35h" },
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
IEnumerable<MalodyChart.IEvent> events = src.time.Cast<MalodyChart.IEvent>();
|
IEnumerable<MalodyChart.IEvent> events = src.time.Cast<MalodyChart.IEvent>();
|
||||||
if (src.effect != null) events = events.Concat(src.effect.Cast<MalodyChart.IEvent>());
|
if (src.effect != null) events = events.Concat(src.effect.Cast<MalodyChart.IEvent>());
|
||||||
@@ -118,7 +107,6 @@ namespace Cryville.Crtr.Extensions.Malody {
|
|||||||
if (bp(tev.beat) > bp(endbeat)) endbeat = tev.beat;
|
if (bp(tev.beat) > bp(endbeat)) endbeat = tev.beat;
|
||||||
var rn = new Chart.Note() {
|
var rn = new Chart.Note() {
|
||||||
time = new BeatTime(tev.beat[0], tev.beat[1], tev.beat[2]),
|
time = new BeatTime(tev.beat[0], tev.beat[1], tev.beat[2]),
|
||||||
judge = "normal",
|
|
||||||
motions = new List<Chart.Motion> {
|
motions = new List<Chart.Motion> {
|
||||||
new Chart.Motion() { motion = "track:" + tev.column.ToString() }
|
new Chart.Motion() { motion = "track:" + tev.column.ToString() }
|
||||||
},
|
},
|
||||||
@@ -126,7 +114,6 @@ namespace Cryville.Crtr.Extensions.Malody {
|
|||||||
if (tev.endbeat != null) {
|
if (tev.endbeat != null) {
|
||||||
if (bp(tev.endbeat) > bp(endbeat)) endbeat = tev.endbeat;
|
if (bp(tev.endbeat) > bp(endbeat)) endbeat = tev.endbeat;
|
||||||
rn.endtime = new BeatTime(tev.endbeat[0], tev.endbeat[1], tev.endbeat[2]);
|
rn.endtime = new BeatTime(tev.endbeat[0], tev.endbeat[1], tev.endbeat[2]);
|
||||||
rn.endjudge = "longend";
|
|
||||||
longEvents.Add(ev, new StartEventState {
|
longEvents.Add(ev, new StartEventState {
|
||||||
Destination = rn,
|
Destination = rn,
|
||||||
Time = ctime,
|
Time = ctime,
|
||||||
@@ -139,13 +126,6 @@ namespace Cryville.Crtr.Extensions.Malody {
|
|||||||
var tev = (MalodyChart.EndEvent)ev;
|
var tev = (MalodyChart.EndEvent)ev;
|
||||||
if (tev.StartEvent is MalodyChart.Note) {
|
if (tev.StartEvent is MalodyChart.Note) {
|
||||||
var sev = tev.StartEvent;
|
var sev = tev.StartEvent;
|
||||||
var state = longEvents[sev];
|
|
||||||
var dest = (Chart.Note)state.Destination;
|
|
||||||
dest.motions.Add(new Chart.Motion() {
|
|
||||||
time = new BeatTime(sev.beat[0], sev.beat[1], sev.beat[2]),
|
|
||||||
endtime = new BeatTime(ev.beat[0], ev.beat[1], ev.beat[2]),
|
|
||||||
motion = "judge!long:" + ((ctime - state.Time) * 20).ToString(),
|
|
||||||
});
|
|
||||||
longEvents.Remove(sev);
|
longEvents.Remove(sev);
|
||||||
}
|
}
|
||||||
else throw new NotSupportedException();
|
else throw new NotSupportedException();
|
||||||
|
Reference in New Issue
Block a user