forked from akanyan/mu3-mods
feat: implement InfiniteStory (#6)
Infinite Story mod - Allows watching an infinite number of stories per session - Skips the dialog about it when selecting a story Co-authored-by: Jujuforce <jujuforce@gmail.com> Co-authored-by: akanyan <alicechecker01@proton.me> Reviewed-on: akanyan/mu3-mods#6 Co-authored-by: jujuforce <jujuforce@noreply.gitea.tendokyu.moe> Co-committed-by: jujuforce <jujuforce@noreply.gitea.tendokyu.moe>
This commit is contained in:
parent
032b6864da
commit
66fdc27787
7
InfiniteStory/InfiniteStory.csproj
Normal file
7
InfiniteStory/InfiniteStory.csproj
Normal file
@ -0,0 +1,7 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<AssemblyName>Assembly-CSharp.InfiniteStory.mm</AssemblyName>
|
||||
<Description>Allows watching the story endlessly</Description>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\Mu3Mods.csproj" />
|
||||
</Project>
|
12
InfiniteStory/MU3.Sequence/patch_Play.cs
Normal file
12
InfiniteStory/MU3.Sequence/patch_Play.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using MU3.User;
|
||||
using MU3.Util;
|
||||
|
||||
namespace MU3.Sequence;
|
||||
|
||||
class patch_Play: Play {
|
||||
private extern void orig_Enter_PlayScenario();
|
||||
private void Enter_PlayScenario() {
|
||||
orig_Enter_PlayScenario();
|
||||
Singleton<UserManager>.instance.userLocal.isStoryWatched = false;
|
||||
}
|
||||
}
|
31
InfiniteStory/MU3/patch_Scene_32_PrePlayMusic_MusicSelect.cs
Normal file
31
InfiniteStory/MU3/patch_Scene_32_PrePlayMusic_MusicSelect.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using MonoMod;
|
||||
using MU3.ViewData;
|
||||
|
||||
namespace MU3;
|
||||
|
||||
class patch_Scene_32_PrePlayMusic_MusicSelect: Scene_32_PrePlayMusic_MusicSelect {
|
||||
private MusicSelectViewDataList _selectList;
|
||||
private UIMusicSelector _selector;
|
||||
private UIDialogBase _dialogBase;
|
||||
|
||||
[MonoModIgnore]
|
||||
private extern void onFinishPlayScenario(int status, bool flag);
|
||||
[MonoModIgnore]
|
||||
private extern void updateSystemUIPanel();
|
||||
|
||||
private extern void orig_Execute_Select();
|
||||
private void Execute_Select() {
|
||||
// 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 && musicViewData.kind == MusicSelectViewData.Kind.Scenario) {
|
||||
if(musicViewData.scenarioViewData.ngReason == ScenarioViewData.PlayNGReason.None) {
|
||||
onFinishPlayScenario(0, false);
|
||||
}
|
||||
}
|
||||
updateSystemUIPanel();
|
||||
} else {
|
||||
orig_Execute_Select();
|
||||
}
|
||||
}
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net35</TargetFramework>
|
||||
<Company>7EVENDAYS⇔HOLIDAYS</Company>
|
||||
<Version>2.2.0</Version>
|
||||
<Version>2.3.0</Version>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Platforms>x64</Platforms>
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user