1
0
forked from akanyan/mu3-mods

feat!: NaiveRating -> MoreProfileOptions

This commit is contained in:
2024-12-23 16:20:25 +00:00
parent 1b8f0e617e
commit 57d7be2bfb
24 changed files with 327 additions and 104 deletions

View File

@ -0,0 +1,59 @@
using MonoMod;
namespace MU3.User;
class patch_UserOption: UserOption {
[MonoModEnumReplace]
public new enum eRating {
OFF = 0,
Default = 1,
ON = 1,
Naive = 2,
MAX = 2
}
[MonoModEnumReplace]
public new enum eAbort {
OFF = 0,
S = 1,
SS = 2,
SSS = 3,
SSS1 = 4,
PB = 5,
FB = 6,
ZERO = 7,
MAX = 8,
Default = 0
}
class patch_DataSet: DataSet {
private eRating rating = eRating.ON;
private eAbort abort;
public extern bool orig_isMax(OptionName id);
public new bool isMax(OptionName id) {
if(id == OptionName.Rating) {
return rating == eRating.MAX;
}
return orig_isMax(id);
}
public void set_Rating(eRating value) {
if(eRating.MAX < value) {
rating = eRating.MAX;
} else if(value < eRating.OFF) {
rating = eRating.OFF;
} else {
rating = value;
}
}
public void set_Abort(eAbort value) {
if(eAbort.MAX < value) {
abort = eAbort.ZERO;
} else if(value < eAbort.OFF) {
abort = eAbort.OFF;
} else {
abort = value;
}
}
}
}