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

@ -1,11 +0,0 @@
using MU3.CustomUI;
namespace MU3.SceneObject;
class patch_ANM_CMN_UserDeta_01: ANM_CMN_UserDeta_01 {
private MU3UICounter rating;
public extern void orig_setUserDetail();
public new void setUserDetail() {
((patch_MU3UICounter)rating).isDispSuffix = NaiveRating.IsEnabled();
orig_setUserDetail();
}
}

View File

@ -1,18 +0,0 @@
namespace MU3.CustomUI;
class patch_MU3UICounter: MU3UICounter {
protected extern void orig_calcNumFiguresFloat(double value);
protected new void calcNumFiguresFloat(double value) {
orig_calcNumFiguresFloat(value);
if(isDispSuffix) {
pushFigureFront(10);
}
}
public bool isDispSuffix { get; set; }
protected void pushFigureFront(byte c) {
for(int i = numFigures_; i > 0; --i) {
figures_[i] = figures_[i - 1];
}
figures_[0] = c;
numFigures_ += 1;
}
}

View File

@ -0,0 +1,10 @@
namespace MU3;
// It doesn't have to be PrePlayMusic_Confirm, but it prev rating has to be stored at some point
class patch_Scene_32_PrePlayMusic_Confirm: Scene_32_PrePlayMusic_Confirm {
private extern void orig_Enter_Select();
private void Enter_Select() {
NaiveRating.SavePrev();
orig_Enter_Select();
}
}

View File

@ -1,36 +0,0 @@
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;
}
}
}
}
}