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,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;
}
}
}
}