forked from akanyan/mu3-mods
fix(MoreProfileOptions): a better way
This commit is contained in:
@ -0,0 +1,30 @@
|
||||
using MU3.Collab;
|
||||
using MU3.CustomUI;
|
||||
using MU3.Mod;
|
||||
using UnityEngine;
|
||||
|
||||
namespace MU3.SceneObject;
|
||||
|
||||
class patch_ANM_SWH_LocalMatching_User: ANM_SWH_LocalMatching_User {
|
||||
private GameObject _objRatingNum;
|
||||
private patch_MU3UICounter _counterRating;
|
||||
private GameObject _objRatingMask;
|
||||
|
||||
private extern void orig_set_sub(Party.UserInfo userInfo, bool isHost, bool isWaitPlay, bool forRecruit);
|
||||
private void set_sub(Party.UserInfo userInfo, bool isHost, bool isWaitPlay, bool forRecruit) {
|
||||
orig_set_sub(userInfo, isHost, isWaitPlay, forRecruit);
|
||||
|
||||
var flag = userInfo._optRatingID >= 1;
|
||||
_objRatingNum.SetActive(flag);
|
||||
if(userInfo._optRatingID > 1) {
|
||||
_counterRating.AddSuffix(userInfo._optRatingID switch {
|
||||
2 => CustomRating.GetSuffix(0),
|
||||
3 => CustomRating.GetSuffix(1),
|
||||
4 => CustomRating.GetSuffix(2),
|
||||
_ => 0
|
||||
});
|
||||
}
|
||||
|
||||
_objRatingMask.SetActive(!flag);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user