-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Modify ConvertUbiArtToUnity to robustly load SongDesc from multiple sources, throwing FileNotFoundException if all attempts fail. - Update ISC class to perform case-insensitive comparison for USERFRIENDLY attribute. - Simplify ClipTape class by removing unused properties. - Update ConverterDialogue to skip songs if descPath and jddb.json are missing. - Add OnlineSongDesc class to represent and convert online song descriptions to SongDesc format.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
namespace JustDanceEditor.Converter.UbiArt; | ||
|
||
// For JDUnlimited server JSON | ||
internal class OnlineSongDesc | ||
{ | ||
public string artist { get; set; } | ||
Check warning on line 6 in JustDanceEditor.Converter/UbiArt/OnlineSongDesc.cs GitHub Actions / build
Check warning on line 6 in JustDanceEditor.Converter/UbiArt/OnlineSongDesc.cs GitHub Actions / build
|
||
public Assets assets { get; set; } | ||
Check warning on line 7 in JustDanceEditor.Converter/UbiArt/OnlineSongDesc.cs GitHub Actions / build
Check warning on line 7 in JustDanceEditor.Converter/UbiArt/OnlineSongDesc.cs GitHub Actions / build
|
||
public int coachCount { get; set; } | ||
public string credits { get; set; } | ||
Check warning on line 9 in JustDanceEditor.Converter/UbiArt/OnlineSongDesc.cs GitHub Actions / build
|
||
public int difficulty { get; set; } | ||
public string lyricsColor { get; set; } | ||
Check warning on line 11 in JustDanceEditor.Converter/UbiArt/OnlineSongDesc.cs GitHub Actions / build
|
||
public int lyricsType { get; set; } | ||
public int mainCoach { get; set; } | ||
public float mapLength { get; set; } | ||
public string mapName { get; set; } | ||
Check warning on line 15 in JustDanceEditor.Converter/UbiArt/OnlineSongDesc.cs GitHub Actions / build
|
||
public int originalJDVersion { get; set; } | ||
public string parentMapName { get; set; } | ||
Check warning on line 17 in JustDanceEditor.Converter/UbiArt/OnlineSongDesc.cs GitHub Actions / build
|
||
public int status { get; set; } | ||
public int sweatDifficulty { get; set; } | ||
public string[] tags { get; set; } | ||
Check warning on line 20 in JustDanceEditor.Converter/UbiArt/OnlineSongDesc.cs GitHub Actions / build
|
||
public string title { get; set; } | ||
Check warning on line 21 in JustDanceEditor.Converter/UbiArt/OnlineSongDesc.cs GitHub Actions / build
|
||
|
||
// Allow conversion from OnlineSongDesc to SongDesc | ||
public static explicit operator SongDesc(OnlineSongDesc onlineSongDesc) | ||
{ | ||
SongDesc songDesc = new() | ||
{ | ||
COMPONENTS = | ||
[ | ||
new() | ||
{ | ||
Artist = onlineSongDesc.artist, | ||
NumCoach = (uint)onlineSongDesc.coachCount, | ||
MainCoach = onlineSongDesc.mainCoach, | ||
Difficulty = (uint)onlineSongDesc.difficulty, | ||
SweatDifficulty = (uint)onlineSongDesc.sweatDifficulty, | ||
LyricsType = onlineSongDesc.lyricsType, | ||
Title = onlineSongDesc.title, | ||
Credits = onlineSongDesc.credits, | ||
Tags = onlineSongDesc.tags, | ||
Status = onlineSongDesc.status, | ||
OriginalJDVersion = (uint)onlineSongDesc.originalJDVersion, | ||
MapName = onlineSongDesc.mapName, | ||
VideoPreviewPath = onlineSongDesc.assets.videoPreview_HIGHvp9webm | ||
} | ||
] | ||
}; | ||
|
||
return songDesc; | ||
} | ||
} |