63 lines
1.9 KiB
C#
63 lines
1.9 KiB
C#
#pragma warning disable CS0626
|
|
#pragma warning disable CS0649
|
|
#pragma warning disable IDE0051
|
|
#pragma warning disable IDE1006
|
|
|
|
using System.IO;
|
|
|
|
namespace MU3.Data;
|
|
|
|
public class patch_DataManager: DataManager {
|
|
private extern void orig_linkFumenAnalysisData();
|
|
private const string SEPARATOR = "$";
|
|
private string PrintHeader() {
|
|
return string.Join(SEPARATOR, new string[] {
|
|
"id",
|
|
"name",
|
|
"difficulty",
|
|
"name for sort",
|
|
"artist",
|
|
"genre",
|
|
"internal level",
|
|
"charter",
|
|
"max platinum score",
|
|
"release date",
|
|
"release version",
|
|
"bpm",
|
|
"location"
|
|
});
|
|
}
|
|
private string PrintLine(FumenData fumen, MusicData mus, int level) {
|
|
return string.Join(SEPARATOR, new string[] {
|
|
mus.id.ToString(),
|
|
mus.name,
|
|
level.ToString(),
|
|
mus.nameForSort,
|
|
mus.artistName,
|
|
mus.genreName,
|
|
fumen.fumenConst.ToString(),
|
|
fumen.notesDesignerName ?? "",
|
|
fumen.platinumScoreMax.ToString(),
|
|
mus.ReleaseVersion.ToUniversalTime().ToString(),
|
|
mus.versionTitle,
|
|
fumen.bpm.ToString(),
|
|
fumen.fumenFile.Substring(fumen.fumenFile.LastIndexOf('A'))
|
|
});
|
|
}
|
|
|
|
private void linkFumenAnalysisData() {
|
|
orig_linkFumenAnalysisData();
|
|
using StreamWriter writer = new("charts.csv");
|
|
writer.WriteLine(PrintHeader());
|
|
foreach(var mus in allMusicData) {
|
|
int i = 0;
|
|
foreach(var fumen in mus.fumenData) {
|
|
if(fumen.isExist) {
|
|
writer.WriteLine(PrintLine(fumen, mus, i));
|
|
}
|
|
i += 1;
|
|
}
|
|
}
|
|
UnityEngine.Debug.Log("[ExportChartData] Written to charts.csv");
|
|
}
|
|
} |