1
0
forked from akanyan/mu3-mods

fix(MoreProfileOptions): a better way

This commit is contained in:
2025-01-03 17:39:16 +00:00
parent 61eec6770e
commit 15f2fe6f57
7 changed files with 80 additions and 63 deletions

View File

@ -68,29 +68,29 @@ public static class CustomRating {
}
public static int Get() {
switch(eRating) {
case patch_UserOption.eRating.Naive:
return GetNaive();
case patch_UserOption.eRating.Reachable:
return GetReachable();
case patch_UserOption.eRating.Recent:
return GetRecent();
default:
return 0;
}
return eRating switch {
patch_UserOption.eRating.Naive => GetNaive(),
patch_UserOption.eRating.Reachable => GetReachable(),
patch_UserOption.eRating.Recent => GetRecent(),
_ => 0,
};
}
public static byte GetSuffix() {
switch(eRating) {
case patch_UserOption.eRating.Naive:
return MU3CounterBase.FigurePlus;
case patch_UserOption.eRating.Reachable:
return MU3CounterBase.FigureMinus;
case patch_UserOption.eRating.Recent:
return MU3CounterBase.FigureComma;
default:
return 0;
}
return eRating switch {
patch_UserOption.eRating.Naive => GetSuffix(0),
patch_UserOption.eRating.Reachable => GetSuffix(1),
patch_UserOption.eRating.Recent => GetSuffix(2),
_ => 0,
};
}
public static byte GetSuffix(int idx) {
return idx switch {
0 => MU3CounterBase.FigurePlus,
1 => MU3CounterBase.FigureMinus,
2 => MU3CounterBase.FigureComma,
_ => 0,
};
}
// Adapted from MU3.User.UserRating.calcBest()