forked from akanyan/mu3-mods
feat(InfiniteGP): make UI changes optional
This commit is contained in:
parent
946402fa82
commit
381d888da6
@ -1,13 +1,12 @@
|
||||
namespace MU3.User;
|
||||
|
||||
class patch_UserManager: UserManager {
|
||||
public new const int DefaultGP = 666;
|
||||
public new const int DefaultGP = 999;
|
||||
private int _gp;
|
||||
private OnUpdate _onUpdateGP;
|
||||
private OnReset _onResetGP;
|
||||
|
||||
public new void resetGP() {
|
||||
_gp = 999;
|
||||
if(_onResetGP != null) {
|
||||
_onResetGP(_gp);
|
||||
}
|
||||
@ -18,10 +17,20 @@ class patch_UserManager: UserManager {
|
||||
return _gp;
|
||||
}
|
||||
private set {
|
||||
_gp = 999;
|
||||
if(_onUpdateGP != null) {
|
||||
_onUpdateGP(_gp);
|
||||
}
|
||||
}
|
||||
}
|
||||
public new bool checkBattleGP(int needed) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public extern void orig_initialize();
|
||||
public new void initialize() {
|
||||
orig_initialize();
|
||||
|
||||
using IniFile iniFile = new("mu3.ini");
|
||||
_gp = iniFile.getIntValue("Extra", "GP", 999);
|
||||
}
|
||||
}
|
@ -21,20 +21,35 @@ class patch_UICredit: UICredit {
|
||||
public new void initialize() {
|
||||
orig_initialize();
|
||||
|
||||
using IniFile iniFile = new("mu3.ini");
|
||||
|
||||
if(iniFile.getValue("Extra", "HideGP", true)) {
|
||||
DestroyImmediate(gpAnimator_);
|
||||
|
||||
creditRoot_.transform.localScale = new Vector3(0, 0, 0);
|
||||
credit_.transform.localScale = new Vector3(0, 0, 0);
|
||||
freePlayRoot_.transform.localScale = new Vector3(0, 0, 0);
|
||||
gpRoot_.transform.localScale = new Vector3(0, 0, 0);
|
||||
gp_.transform.localScale = new Vector3(0, 0, 0);
|
||||
gpPlus_.transform.localScale = new Vector3(0, 0, 0);
|
||||
gpMinus_.transform.localScale = new Vector3(0, 0, 0);
|
||||
}
|
||||
|
||||
netIcon_.transform.localPosition = new Vector3(-514, netIcon_.transform.localPosition.y, netIcon_.transform.localPosition.z);
|
||||
if(iniFile.getValue("Extra", "HideCredits", true)) {
|
||||
creditRoot_.transform.localScale = new Vector3(0, 0, 0);
|
||||
credit_.transform.localScale = new Vector3(0, 0, 0);
|
||||
freePlayRoot_.transform.localScale = new Vector3(0, 0, 0);
|
||||
|
||||
netIcon_.transform.localPosition = new Vector3(
|
||||
-514,
|
||||
netIcon_.transform.localPosition.y,
|
||||
netIcon_.transform.localPosition.z
|
||||
);
|
||||
netIcon_.image.rectTransform.pivot = new Vector2(0f, 0.5f);
|
||||
|
||||
groupIcon_.transform.localPosition = new Vector3(-476, groupIcon_.transform.localPosition.y, groupIcon_.transform.localPosition.z);
|
||||
groupIcon_.transform.localPosition = new Vector3(
|
||||
-476,
|
||||
groupIcon_.transform.localPosition.y,
|
||||
groupIcon_.transform.localPosition.z
|
||||
);
|
||||
groupIcon_.image.rectTransform.pivot = new Vector2(0f, 0.5f);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user