forked from akanyan/mu3-mods
feat!: NaiveRating -> MoreProfileOptions
This commit is contained in:
48
Extras/MoreProfileOptions/MU3.Notes/patch_NotesManager.cs
Normal file
48
Extras/MoreProfileOptions/MU3.Notes/patch_NotesManager.cs
Normal file
@ -0,0 +1,48 @@
|
||||
using MU3.Battle;
|
||||
using MU3.DataStudio;
|
||||
using MU3.DB;
|
||||
using MU3.User;
|
||||
using MU3.Util;
|
||||
using UnityEngine;
|
||||
|
||||
namespace MU3.Notes;
|
||||
|
||||
class patch_NotesManager: NotesManager {
|
||||
private RetireResult _retireResult;
|
||||
private GameEngine _gameEngine;
|
||||
private UserFumen _userFumen;
|
||||
private int _previousPb;
|
||||
public extern void orig_update();
|
||||
public new void update() {
|
||||
orig_update();
|
||||
|
||||
int threshold = 0;
|
||||
var abort = (patch_UserOption.eAbort)GameOption.abort;
|
||||
switch(abort) {
|
||||
case patch_UserOption.eAbort.SSS1:
|
||||
threshold = 1007500;
|
||||
break;
|
||||
case patch_UserOption.eAbort.FB:
|
||||
threshold = 970000;
|
||||
break;
|
||||
case patch_UserOption.eAbort.PB:
|
||||
if(_userFumen == null) {
|
||||
UserManager userManager = Singleton<UserManager>.instance;
|
||||
_userFumen = userManager.getUserFumen(_sessionInfo.musicData.id, _sessionInfo.musicLevel, create: false);
|
||||
_previousPb = _userFumen?.TechScoreMax ?? 0;
|
||||
UnityEngine.Debug.Log(_previousPb + "HELLO THIS ONLY EXECUTES ONCE");
|
||||
}
|
||||
threshold = _previousPb;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if(_retireResult == RetireResult.None && threshold > 0) {
|
||||
int techScoreEnable = _gameEngine.counters.getTechScoreEnable();
|
||||
if(techScoreEnable < threshold) {
|
||||
_retireResult = RetireResult.ScoreRetire;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user