diff --git a/InfiniteStory/InfiniteStory.csproj b/InfiniteStory/InfiniteStory.csproj
index e29b96e..f5bb953 100644
--- a/InfiniteStory/InfiniteStory.csproj
+++ b/InfiniteStory/InfiniteStory.csproj
@@ -1,7 +1,7 @@
Assembly-CSharp.InfiniteStory.mm
- Allows to watch infinite story per session
+ Allows watching the story endlessly
\ No newline at end of file
diff --git a/InfiniteStory/MU3.Sequence/patch_Play.cs b/InfiniteStory/MU3.Sequence/patch_Play.cs
index c70beea..6d7798a 100644
--- a/InfiniteStory/MU3.Sequence/patch_Play.cs
+++ b/InfiniteStory/MU3.Sequence/patch_Play.cs
@@ -5,8 +5,7 @@ namespace MU3.Sequence;
class patch_Play: Play {
private extern void orig_Enter_PlayScenario();
- private void Enter_PlayScenario()
- {
+ private void Enter_PlayScenario() {
orig_Enter_PlayScenario();
Singleton.instance.userLocal.isStoryWatched = false;
}
diff --git a/InfiniteStory/MU3/patch_Scene_32_PrePlayMusic_MusicSelect.cs b/InfiniteStory/MU3/patch_Scene_32_PrePlayMusic_MusicSelect.cs
index e021dc6..cd627b7 100644
--- a/InfiniteStory/MU3/patch_Scene_32_PrePlayMusic_MusicSelect.cs
+++ b/InfiniteStory/MU3/patch_Scene_32_PrePlayMusic_MusicSelect.cs
@@ -1,215 +1,33 @@
-using MU3.Data;
-using MU3.DataStudio;
-using MU3.DB;
-using MU3.Game;
-using MU3.Sequence;
-using MU3.Util;
+using MonoMod;
using MU3.ViewData;
-using UnityEngine;
namespace MU3;
class patch_Scene_32_PrePlayMusic_MusicSelect: Scene_32_PrePlayMusic_MusicSelect {
- private bool _playVoice;
- private UIDialogBase _dialogBase;
- private ChapterSelectionViewData _chapterSelectionViewData;
- private Scene_32_PrePlayMusic _sceneCommonObject;
- private bool _isCanceled;
private MusicSelectViewDataList _selectList;
- private FumenDifficulty _selectorDifficulty;
- private SystemUI.Request _deactivateTimer = SystemUI.Request.Default;
- private float timeCountLogOutButtonPressed;
- private float _timer;
-
- [SerializeField]
private UIMusicSelector _selector;
- private extern void orig_executeDifficulty();
- private void executeDifficulty()
- {
- orig_executeDifficulty();
- }
- private extern bool orig_updateMatchingTag();
- private bool updateMatchingTag()
- {
- return orig_updateMatchingTag();
- }
- private extern void orig_updateSecretMusic();
- private void updateSecretMusic()
- {
- orig_updateSecretMusic();
- }
- private extern void orig_disableInput();
- private void disableInput()
- {
- orig_disableInput();
- }
- private extern void orig_onFinishPurchaseItem(ChapterItemViewData itemViewData, int status);
- private void onFinishPurchaseItem(ChapterItemViewData itemViewData, int status)
- {
- orig_onFinishPurchaseItem(itemViewData, status);
- }
- private extern void orig_onFinishPlayScenario(int status, bool flag);
- private void onFinishPlayScenario(int status, bool flag)
- {
- orig_onFinishPlayScenario(status, flag);
- }
- private extern void orig_onFinishUnlockMusic(MusicViewData musicViewData, int status);
- private void onFinishUnlockMusic(MusicViewData musicViewData, int status)
- {
- orig_onFinishUnlockMusic(musicViewData, status);
- }
- private extern void orig_updateSystemUIPanel();
- private void updateSystemUIPanel()
- {
- orig_updateSystemUIPanel();
- }
+ private UIDialogBase _dialogBase;
+ [MonoModIgnore]
+ private extern void enableInput();
+ [MonoModIgnore]
+ private extern void onFinishPlayScenario(int status, bool flag);
+ [MonoModIgnore]
+ private extern void updateSystemUIPanel();
+
+ private extern void orig_Execute_Select();
private void Execute_Select() {
-
- if (_dialogBase != null)
- {
- if (_selector.isTimeOut)
- {
- _dialogBase.forceCancel();
- }
- return;
- }
- executeDifficulty();
- if (_chapterSelectionViewData.category != ChapterMajorCategoryID.MedalShop)
- {
- _sceneCommonObject.localMatchingCtrl.addNewRecruitNotice();
- }
- updateMatchingTag();
- updateSecretMusic();
- memoryQRReader.update();
- UIInput.UILayeredInput input = _selector.getInput();
- bool flag = false;
- if (_selector.isDecided)
- {
- flag = true;
- _isCanceled = false;
- }
- else if (_selector.isCanceled)
- {
- flag = true;
- _isCanceled = true;
- }
- else if (_selector.isPressed || _selector.isPressedDisabledElement)
- {
+ // Walk around the warning dialog
+ if(_dialogBase == null && !_selector.isDecided && !_selector.isCanceled && (_selector.isPressed || _selector.isPressedDisabledElement)) {
MusicSelectViewData musicViewData = _selectList.getMusicViewData(_selector.selectIndex);
- if (musicViewData != null)
- {
- if (musicViewData.kind == MusicSelectViewData.Kind.Music)
- {
- if (musicViewData.musicViewData.isForMatchingMusic)
- {
- if (_sceneCommonObject.localMatchingCtrl.startJoin(musicViewData.initOrder, _selectorDifficulty))
- {
- if (SingletonMonoBehaviour.instance.systemTimer != null)
- {
- SingletonMonoBehaviour.instance.systemTimer.deactivate(ref _deactivateTimer);
- }
- setNextState(EState.MatchingEntryWait);
- disableInput();
- }
- }
- else if (musicViewData.musicViewData.isSphereLock)
- {
- if (!musicViewData.musicViewData.isShortOfSphere)
- {
- Singleton.instance.avatarVoice.play(107);
- _dialogBase = UIUnlockMusicDialog.create(musicViewData.musicViewData, _selectorDifficulty, _chapterSelectionViewData, onFinishUnlockMusic);
- disableInput();
- }
- else
- {
- Singleton.instance.avatarVoice.play(109);
- }
- }
- }
- else if (musicViewData.kind == MusicSelectViewData.Kind.Item)
- {
- ChapterItemViewData itemViewData = musicViewData.itemViewData;
- switch (itemViewData.ngReason)
- {
- case ChapterItemViewData.PurchaseNgReason.ShortOfJewel:
- if (itemViewData.jewelWallet != null && itemViewData.jewelWallet.CurrencyType == CurrencyType.Medal)
- {
- Singleton.instance.avatarVoice.play(1405);
- }
- else
- {
- Singleton.instance.avatarVoice.play(109);
- }
- break;
- case ChapterItemViewData.PurchaseNgReason.None:
- {
- ItemType itemType = itemViewData.itemType;
- if (itemType == ItemType.Card)
- {
- Singleton.instance.avatarVoice.play(108);
- }
- else
- {
- Singleton.instance.avatarVoice.play(965);
- }
- _dialogBase = UIPurchaseItemDialog.create(itemViewData, _chapterSelectionViewData, onFinishPurchaseItem);
- disableInput();
- break;
- }
- }
- }
- else if (musicViewData.kind == MusicSelectViewData.Kind.Scenario)
- {
- ScenarioViewData scenarioViewData = musicViewData.scenarioViewData;
- ScenarioViewData.PlayNGReason ngReason = scenarioViewData.ngReason;
- if (ngReason == ScenarioViewData.PlayNGReason.None)
- {
- Singleton.instance.avatarVoice.play(1396);
- onFinishPlayScenario(0, flag: false);
- }
+ if(musicViewData != null && musicViewData.kind == MusicSelectViewData.Kind.Scenario) {
+ if(musicViewData.scenarioViewData.ngReason == ScenarioViewData.PlayNGReason.None) {
+ onFinishPlayScenario(0, false);
}
}
+ updateSystemUIPanel();
+ } else {
+ orig_Execute_Select();
}
- else if (input != null && _selector.isInputActive && !_selector.isDecidedOrWait && !_selector.isCanceledOrWait)
- {
- if (input.getStateOn(UIInput.Key.MenuLeft))
- {
- timeCountLogOutButtonPressed += UnityEngine.Time.deltaTime;
- if ((double)timeCountLogOutButtonPressed > 1.5)
- {
- timeCountLogOutButtonPressed = 0f;
- disableInput();
- setNextState(EState.Logout);
- }
- }
- else if (input.getTriggerOn(UIInput.Key.SkipRight, enableRepeat: true))
- {
- _selector.moveGenre(1);
- }
- else if (input.getTriggerOn(UIInput.Key.SkipLeft, enableRepeat: true))
- {
- _selector.moveGenre(-1);
- }
- else if (input.getTriggerOn(UIInput.Key.MenuRight))
- {
- MusicSelectViewData selectedMusicSelectViewData = _selector.selectedMusicSelectViewData;
- if (selectedMusicSelectViewData != null && selectedMusicSelectViewData.majorCategory == MusicMajorCategoryID.MyList && !selectedMusicSelectViewData.isRandom)
- {
- disableInput();
- setNextState(EState.Sort);
- }
- }
- if (!input.getStateOn(UIInput.Key.MenuLeft) && timeCountLogOutButtonPressed != 0f)
- {
- timeCountLogOutButtonPressed = 0f;
- }
- }
- if (flag)
- {
- _timer = 0f;
- setNextState(EState.WaitFinish);
- }
- updateSystemUIPanel();
}
}
\ No newline at end of file
diff --git a/Mu3Mods.sln b/Mu3Mods.sln
index 7b7b8e2..b58cd1f 100644
--- a/Mu3Mods.sln
+++ b/Mu3Mods.sln
@@ -1,5 +1,4 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
+Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34728.123
MinimumVisualStudioVersion = 10.0.40219.1
@@ -43,6 +42,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AttractVideoPlayer", "Attra
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SelectBGM", "SelectBGM\SelectBGM.csproj", "{07C01DA1-7ABF-4759-A1C2-9DCD04298E85}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InfiniteStory", "InfiniteStory\InfiniteStory.csproj", "{939914E5-8D9A-4696-9957-AA6C6480FE94}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
@@ -129,6 +130,10 @@ Global
{07C01DA1-7ABF-4759-A1C2-9DCD04298E85}.Debug|x64.Build.0 = Debug|x64
{07C01DA1-7ABF-4759-A1C2-9DCD04298E85}.Release|x64.ActiveCfg = Release|x64
{07C01DA1-7ABF-4759-A1C2-9DCD04298E85}.Release|x64.Build.0 = Release|x64
+ {939914E5-8D9A-4696-9957-AA6C6480FE94}.Debug|x64.ActiveCfg = Debug|x64
+ {939914E5-8D9A-4696-9957-AA6C6480FE94}.Debug|x64.Build.0 = Debug|x64
+ {939914E5-8D9A-4696-9957-AA6C6480FE94}.Release|x64.ActiveCfg = Release|x64
+ {939914E5-8D9A-4696-9957-AA6C6480FE94}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -136,4 +141,4 @@ Global
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D9317002-F66D-4CDE-8FF5-FF2A0D8DC021}
EndGlobalSection
-EndGlobal
+EndGlobal
\ No newline at end of file