sectionBeats from psych

This commit is contained in:
lunarcleint
2024-03-23 06:39:15 -07:00
parent bb5ad66313
commit b1bbba6e95
3 changed files with 5 additions and 0 deletions
@@ -221,6 +221,7 @@ typedef SwagSection =
{
var sectionNotes:Array<Dynamic>;
var lengthInSteps:Int;
var ?sectionBeats:Float;
var ?typeOfSection:Int;
var mustHitSection:Bool;
var ?gfSection:Bool;
@@ -13,6 +13,9 @@ class PsychParser {
base.notes = FNFLegacyParser.__convertToSwagSections(chart);
base.stage = chart.stage;
for (section in base.notes)
section.sectionBeats = Conductor.beatsPerMeasure;
for (strumLine in chart.strumLines)
if (strumLine.type == ADDITIONAL && base.gfVersion == null)
base.gfVersion = strumLine.characters.getDefault(["gf"])[0];
+1
View File
@@ -1337,6 +1337,7 @@ class Charter extends UIState {
defaultSaveFile: '${__song.toLowerCase().replace(" ", "-")}${__diff.toLowerCase() == "normal" ? "" : '-${__diff.toLowerCase()}'}.json',
}));
}
function _file_saveas_psych(_) {
openSubState(new SaveSubstate(Json.stringify(PsychParser.encode(PlayState.SONG), null, Options.editorPrettyPrint ? "\t" : null), {
defaultSaveFile: '${__song.toLowerCase().replace(" ", "-")}${__diff.toLowerCase() == "normal" ? "" : '-${__diff.toLowerCase()}'}.json',