forked from akanyan/mu3-mods
feat!: rename and reorganize
This commit is contained in:
36
Enhancements/DisableGP/MU3.User/patch_UserManager.cs
Normal file
36
Enhancements/DisableGP/MU3.User/patch_UserManager.cs
Normal file
@ -0,0 +1,36 @@
|
||||
namespace MU3.User;
|
||||
|
||||
class patch_UserManager: UserManager {
|
||||
public new const int DefaultGP = 999;
|
||||
private int _gp;
|
||||
private OnUpdate _onUpdateGP;
|
||||
private OnReset _onResetGP;
|
||||
|
||||
public new void resetGP() {
|
||||
if(_onResetGP != null) {
|
||||
_onResetGP(_gp);
|
||||
}
|
||||
}
|
||||
|
||||
public new int GP {
|
||||
get {
|
||||
return _gp;
|
||||
}
|
||||
private set {
|
||||
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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user