Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
ca15fac6a1 | |||
ebb78efcde | |||
2204fb4756 | |||
66fdc27787 | |||
032b6864da |
@ -12,7 +12,9 @@ class patch_OperationManager: OperationManager {
|
||||
~patch_OperationManager() {
|
||||
try {
|
||||
File.WriteAllText(_fileName, MovieIndex.ToString());
|
||||
} catch(Exception) { }
|
||||
} catch(Exception ex) {
|
||||
System.Console.WriteLine(ex);
|
||||
}
|
||||
}
|
||||
public int MovieIndex {
|
||||
set {
|
||||
@ -41,7 +43,9 @@ class patch_OperationManager: OperationManager {
|
||||
orig_initialize();
|
||||
|
||||
using IniFile iniFile = new("mu3.ini");
|
||||
_fileName = Path.Combine(iniFile.getValue("Extra", "CacheDir", "."), "data_advert_cache.txt");
|
||||
var dir = iniFile.getValue("Extra", "CacheDir", ".");
|
||||
Directory.CreateDirectory(dir);
|
||||
_fileName = Path.Combine(dir, "data_advert_cache.txt");
|
||||
|
||||
try {
|
||||
_movieIndex = Math.Max(0, int.Parse(File.ReadAllText(_fileName)));
|
||||
|
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;
|
||||
}
|
||||
}
|
30
InfiniteStory/MU3/patch_Scene_32_PrePlayMusic_MusicSelect.cs
Normal file
30
InfiniteStory/MU3/patch_Scene_32_PrePlayMusic_MusicSelect.cs
Normal file
@ -0,0 +1,30 @@
|
||||
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
|
||||
&& musicViewData.scenarioViewData.ngReason == ScenarioViewData.PlayNGReason.None) {
|
||||
onFinishPlayScenario(0, false);
|
||||
updateSystemUIPanel();
|
||||
return;
|
||||
}
|
||||
}
|
||||
orig_Execute_Select();
|
||||
}
|
||||
}
|
@ -13,7 +13,9 @@ public class patch_DataStudioManager: DataStudioManager {
|
||||
|
||||
private static void initCache() {
|
||||
using IniFile iniFile = new("mu3.ini");
|
||||
_fileName = Path.Combine(iniFile.getValue("Extra", "CacheDir", "."), "data_cache.bin");
|
||||
var dir = iniFile.getValue("Extra", "CacheDir", ".");
|
||||
Directory.CreateDirectory(dir);
|
||||
_fileName = Path.Combine(dir, "data_cache.bin");
|
||||
|
||||
if(File.Exists(_fileName)) {
|
||||
System.Console.WriteLine("Loading data cache...");
|
||||
|
@ -2,7 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net35</TargetFramework>
|
||||
<Company>7EVENDAYS⇔HOLIDAYS</Company>
|
||||
<Version>2.2.0</Version>
|
||||
<Version>2.3.1</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
|
||||
|
@ -23,4 +23,8 @@ class patch_Scene_30_NoticeReward: Scene_30_NoticeReward {
|
||||
_mode.update();
|
||||
}
|
||||
}
|
||||
|
||||
private void End_Init() {
|
||||
Skipped = false;
|
||||
}
|
||||
}
|
20
SortByInternalDifficulty/MU3.User/patch_UserDetail.cs
Normal file
20
SortByInternalDifficulty/MU3.User/patch_UserDetail.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using MU3.Client;
|
||||
using MU3.DB;
|
||||
|
||||
namespace MU3.User;
|
||||
class patch_UserDetail: UserDetail {
|
||||
public extern void orig_copyTo(UserData userDetail);
|
||||
public new void copyTo(UserData userDetail) {
|
||||
orig_copyTo(userDetail);
|
||||
|
||||
// Attempting to use a profile with InternalLevel sorting enabled
|
||||
// causes unpatched clients to crash thanks to enormous incompetence
|
||||
// of Sxga's interns. So, unfortunately, this value has to be discarded.
|
||||
// See:
|
||||
// * MusicSelectViewDataList._sort1 set
|
||||
// * UserDetail.copyFrom()
|
||||
if(userDetail.tabSetting == (int)patch_MusicSort1ID.InternalLevel) {
|
||||
userDetail.tabSetting = (int)patch_MusicSort1ID.Level;
|
||||
}
|
||||
}
|
||||
}
|
@ -15,6 +15,7 @@ class patch_MusicSelectViewDataList: MusicSelectViewDataList {
|
||||
private CompareProc _compareProc1;
|
||||
private CompareProc _compareProc2;
|
||||
private GetCategoryNameProc _getCategoryNameProc;
|
||||
private PropertyInfo _reMasterPi = null;
|
||||
|
||||
private extern void orig_set__sort1(MusicSort1ID value);
|
||||
private extern void orig_set__sort2(MusicSort2ID value);
|
||||
@ -36,19 +37,18 @@ class patch_MusicSelectViewDataList: MusicSelectViewDataList {
|
||||
}
|
||||
}
|
||||
|
||||
private PropertyInfo reMasterPi = null;
|
||||
private bool isReMaster(Data.MusicData d) {
|
||||
// Fall back for pre-Act3
|
||||
if(reMasterPi == null) {
|
||||
if(_reMasterPi == null) {
|
||||
return false;
|
||||
}
|
||||
return (bool)reMasterPi.GetValue(d, null);
|
||||
return (bool)_reMasterPi.GetValue(d, null);
|
||||
}
|
||||
|
||||
public extern void orig_create(GameViewData gameViewData, ChapterSelection chapterSelection, FumenDifficulty difficulty, MusicSort1ID sort1, MusicSort2ID sort2);
|
||||
|
||||
public new void create(GameViewData gameViewData, ChapterSelection chapterSelection, FumenDifficulty difficulty, MusicSort1ID sort1, MusicSort2ID sort2) {
|
||||
reMasterPi = typeof(Data.MusicData).GetProperty("isReMaster");
|
||||
_reMasterPi = typeof(Data.MusicData).GetProperty("isReMaster");
|
||||
orig_create(gameViewData, chapterSelection, difficulty, sort1, sort2);
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ class patch_MusicSelectViewDataList: MusicSelectViewDataList {
|
||||
|
||||
private extern int orig_getMetaSortKey(MusicSelectViewData d, bool forCategorySort);
|
||||
private int getMetaSortKey(MusicSelectViewData d, bool forCategorySort) {
|
||||
if(reMasterPi == null) {
|
||||
if(_reMasterPi == null) {
|
||||
return orig_getMetaSortKey(d, forCategorySort);
|
||||
}
|
||||
var remas = isReMaster(d.musicViewData.data);
|
||||
|
Loading…
Reference in New Issue
Block a user