fix(SortByInternal): re:mas de-grouping in act3
This commit is contained in:
parent
de9bcda48d
commit
8a66b8becd
@ -1,7 +1,9 @@
|
||||
using MU3.DB;
|
||||
using MU3.DataStudio;
|
||||
using MU3.DB;
|
||||
using MU3.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
namespace MU3.ViewData;
|
||||
@ -34,6 +36,33 @@ class patch_MusicSelectViewDataList: MusicSelectViewDataList {
|
||||
}
|
||||
}
|
||||
|
||||
private PropertyInfo reMasterPi = null;
|
||||
private bool isReMaster(Data.MusicData d) {
|
||||
// Fall back for pre-Act3
|
||||
if(reMasterPi == null) {
|
||||
return false;
|
||||
}
|
||||
return (bool)reMasterPi.GetValue(d, null);
|
||||
}
|
||||
|
||||
public extern void orig_create(GameViewData gameViewData, ChapterSelection chapterSelection, FumenDifficulty difficulty, MusicSort1ID sort1, MusicSort2ID sort2);
|
||||
|
||||
public new void create(GameViewData gameViewData, ChapterSelection chapterSelection, FumenDifficulty difficulty, MusicSort1ID sort1, MusicSort2ID sort2) {
|
||||
reMasterPi = typeof(Data.MusicData).GetProperty("isReMaster");
|
||||
orig_create(gameViewData, chapterSelection, difficulty, sort1, sort2);
|
||||
}
|
||||
|
||||
private string getMetaGategoryName(MusicSelectViewData d) {
|
||||
var remas = isReMaster(d.musicViewData.data);
|
||||
if(d.musicViewData.data.isBonusTrack) {
|
||||
return "ボーナストラック";
|
||||
}
|
||||
if(d.musicViewData.data.isLunatic && remas && __sort1 != MusicSort1ID.Level && __sort1 != (MusicSort1ID)patch_MusicSort1ID.InternalLevel) {
|
||||
return "Re:MASTER";
|
||||
}
|
||||
return d.musicViewData.data.isLunatic && !remas ? "LUNATIC" : null;
|
||||
}
|
||||
|
||||
private string getCategoryNameByInternalLevel(MusicSelectViewData d) {
|
||||
StringBuilder stringBuilder = Singleton<MU3.Sys.System>.instance.getStringBuilder();
|
||||
Data.FumenData fumenData = ((d.musicViewData.data == null) ? null : d.musicViewData.data.fumenData[(int)d.difficulty]);
|
||||
@ -69,21 +98,31 @@ class patch_MusicSelectViewDataList: MusicSelectViewDataList {
|
||||
return orig_createMyListMusicDataAllDifficulty(list, idList, musicData, sort1, initOrder);
|
||||
}
|
||||
|
||||
// Enable this for 1.45 Re:MAS inclusion
|
||||
/*private int getMetaSortKey(MusicSelectViewData d, bool forCategorySort) {
|
||||
private extern int orig_getMetaSortKey(MusicSelectViewData d, bool forCategorySort);
|
||||
private int getMetaSortKey(MusicSelectViewData d, bool forCategorySort) {
|
||||
if(reMasterPi == null) {
|
||||
return orig_getMetaSortKey(d, forCategorySort);
|
||||
}
|
||||
var remas = isReMaster(d.musicViewData.data);
|
||||
|
||||
if(forCategorySort) {
|
||||
if(d.musicViewData.data.isBonusTrack)
|
||||
if(d.musicViewData.data.isBonusTrack) {
|
||||
return 3;
|
||||
if(d.musicViewData.data.isLunatic && d.musicViewData.data.isReMaster && __sort1 != MusicSort1ID.Level && __sort1 != (MusicSort1ID)patch_MusicSort1ID.InternalLevel)
|
||||
}
|
||||
if(d.musicViewData.data.isLunatic && remas && __sort1 != MusicSort1ID.Level && __sort1 != (MusicSort1ID)patch_MusicSort1ID.InternalLevel) {
|
||||
return 1;
|
||||
if(d.musicViewData.data.isLunatic && !d.musicViewData.data.isReMaster)
|
||||
}
|
||||
if(d.musicViewData.data.isLunatic && !remas) {
|
||||
return 2;
|
||||
}
|
||||
} else {
|
||||
if(d.musicViewData.data.isLunatic && d.musicViewData.data.isReMaster && __sort1 != MusicSort1ID.Level && __sort1 != (MusicSort1ID)patch_MusicSort1ID.InternalLevel)
|
||||
if(d.musicViewData.data.isLunatic && remas && __sort1 != MusicSort1ID.Level && __sort1 != (MusicSort1ID)patch_MusicSort1ID.InternalLevel) {
|
||||
return 1;
|
||||
if(d.musicViewData.data.isLunatic && !d.musicViewData.data.isReMaster)
|
||||
}
|
||||
if(d.musicViewData.data.isLunatic && !remas) {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}*/
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user