1
0
forked from akanyan/mu3-mods

feat!: rename and reorganize

This commit is contained in:
2024-12-22 16:16:52 +00:00
parent 7acd754397
commit 895ae9e76d
99 changed files with 110 additions and 87 deletions

View File

@ -0,0 +1,40 @@
using MonoMod;
namespace MU3.DB;
[MonoModPatch("global::MU3.DB.MusicSort1IDEnum")]
public static class patch_MusicSort1IDEnum {
private static MusicSort1TableRecord[] records;
public static patch_MusicSort1ID[] List;
public static extern bool orig_loadFromFile(string filename);
public static bool loadFromFile(string filename) {
var rv = orig_loadFromFile(filename);
records = new[] {
new MusicSort1TableRecord(0, "Genre", "ジャンル", 0),
new MusicSort1TableRecord(1, "All", "全曲", 0),
new MusicSort1TableRecord(2, "Character", "キャラクター", 0),
new MusicSort1TableRecord(3, "Version", "バージョン", 0),
new MusicSort1TableRecord(4, "Level", "譜面レベル", 0),
new MusicSort1TableRecord(5, "Name", "曲名", 0),
new MusicSort1TableRecord(6, "Attribute", "属性", 0),
new MusicSort1TableRecord(7, "InternalLevel", "譜面定数", 0)
};
List = new[] {
patch_MusicSort1ID.Genre,
patch_MusicSort1ID.All,
patch_MusicSort1ID.Character,
patch_MusicSort1ID.Version,
patch_MusicSort1ID.Level,
patch_MusicSort1ID.Name,
patch_MusicSort1ID.Attribute,
patch_MusicSort1ID.InternalLevel
};
return rv;
}
// Not exactly sure why this is necessary
public static bool isValid(this patch_MusicSort1ID self) {
return self >= patch_MusicSort1ID.Genre && self < patch_MusicSort1ID.End;
}
}