1
0
forked from akanyan/mu3-mods

feat: add the remaining things

* DisableMaintenance
* UnlockAllMusic
* UnlockGameEvents
* UnlockMemoryChapters
This commit is contained in:
2024-07-08 02:10:46 +09:00
parent 42cf65bdb7
commit cc7bc8613b
17 changed files with 263 additions and 1 deletions

View File

@ -0,0 +1,36 @@
using MonoMod;
namespace MU3.User;
class patch_UserOption: UserOption {
[MonoModEnumReplace]
public enum patch_eRating {
OFF = 0,
Default = 1,
ON = 1,
Naive = 2,
MAX = 2
}
class patch_DataSet: DataSet {
private patch_eRating rating = patch_eRating.ON;
public extern bool orig_isMax(OptionName id);
public new bool isMax(OptionName id) {
if(id == OptionName.Rating) {
return rating == patch_eRating.MAX;
}
return orig_isMax(id);
}
public new patch_eRating Rating {
get => rating;
set {
if(patch_eRating.MAX < value) {
rating = patch_eRating.MAX;
} else if(value < patch_eRating.OFF) {
rating = patch_eRating.OFF;
} else {
rating = value;
}
}
}
}
}