1
0
forked from akanyan/mu3-mods

feat: rework reward skip; move it to SkipCutscenes

This commit is contained in:
2024-12-25 19:34:02 +00:00
parent 133a36afd7
commit 076fb75a6d
8 changed files with 96 additions and 21 deletions

View File

@ -1,28 +0,0 @@
using MonoMod;
using MU3.Util;
namespace MU3;
class patch_DailyBonus: DailyBonus {
[MonoModIgnore]
private enum State {
ItemWindow = 3,
ExitWait = 4,
}
private float waitCount;
private State _state;
private extern void orig_Update();
private void Update() {
if(_state < State.ItemWindow) {
if(Singleton<UIInput>.instance.getTriggerOn(UIInput.Key.Decision)) {
waitCount = 100.0f;
}
if(Singleton<UIInput>.instance.getTriggerOn(UIInput.Key.MenuLeft)) {
waitCount = 100.0f;
_state = State.ExitWait;
}
}
orig_Update();
}
}

View File

@ -8,20 +8,11 @@ class patch_Scene_30_NoticeReward: Scene_30_NoticeReward {
[MonoModIgnore]
private enum State {
RankingReward = 2,
FadeOut = 8,
RankingReward = 2
}
private void Start() {
using IniFile iniFile = new("mu3.ini");
var quickLogin = iniFile.getValue("Sequence", "QuickLogin", false);
_mode = new Mode<Scene_30_NoticeReward, State>(this);
if(quickLogin) {
_mode.set(State.FadeOut);
} else {
_mode.set(State.RankingReward);
SingletonMonoBehaviour<SystemUI>.instance.Panel.pushState(0, show: true);
}
_mode.set(State.RankingReward);
SingletonMonoBehaviour<SystemUI>.instance.Panel.pushState(0, show: true);
}
}