Compare commits

...

12 Commits

Author SHA1 Message Date
Jujuforce
a3a7475592 Merge branch 'AttractVideoPlayer' of https://gitea.tendokyu.moe/jujuforce/mu3-mods into AttractVideoPlayer
# Conflicts:
#	AttractVideoPlayer/MU3.OperationManager/patch_OperationManager.cs
#	AttractVideoPlayer/MU3.Sequence/patch_Advertise.cs
#	AttractVideoPlayer/MU3/patch_AdvManager.cs
2024-07-23 22:21:39 +02:00
6738890408 rewrite basically 2024-07-22 23:51:35 +09:00
0e244bc16b chore: formatting 2024-07-22 22:03:11 +09:00
1023dee2b7 chore: fix the branch 2024-07-22 21:58:17 +09:00
Jujuforce
6afff88596 Fixed the guest login, now only the 3 left buttons are reserved for the AttractVideoPlaver mod 2024-07-22 11:36:11 +02:00
Jujuforce
e7da1baed4 Fixed AttractVideoPlayer description 2024-07-22 11:17:25 +02:00
Jujuforce
9c230521f9 Cleaning sln 2024-07-21 21:24:05 +02:00
Jujuforce
eb39217a0b feat: AttractVideoPlayer
- Service Button : Pause the attract video
- L2/L3 Buttons : Previous/next to cycle through all the attract videos
- Saving the selected video for future game launches
2024-07-21 15:50:45 +02:00
Jujuforce
5d5692da0b Merge branch 'main' of https://gitea.tendokyu.moe/akanyan/mu3-mods
# Conflicts:
#	MiscMods.sln
#	UnlockAndSetJewelBoostNine/MU3/patch_Scene_32_PrePlayMusic_Confirm.cs
2024-07-20 17:50:03 +02:00
1131cff6b5 chore: formatting 2024-07-03 05:46:00 +09:00
d05112e2f4 feat: implement UnlockAndSetJewelBoostNine. Setting the max boost in createSelector, cleaner this way. 2024-07-02 22:15:19 +02:00
07fc9c433c feat: implement UnlockAndSetJewelBoostNine 2024-07-02 22:03:24 +02:00
5 changed files with 119 additions and 0 deletions

View File

@ -0,0 +1,7 @@
<Project>
<PropertyGroup>
<AssemblyName>Assembly-CSharp.AttractVideoPlayer.mm</AssemblyName>
<Description>Control attract video</Description>
</PropertyGroup>
<Import Project="..\Mu3Mods.csproj" />
</Project>

View File

@ -0,0 +1,45 @@
using System;
using System.Collections.ObjectModel;
using System.IO;
namespace MU3.Operation;
class patch_OperationManager: OperationManager {
private static readonly string _fname = "data_advert_cache.txt";
private ReadOnlyCollection<MovieData> _movieDataList;
private int _movieIndex;
~patch_OperationManager() {
try {
File.WriteAllText(_fname, _movieIndex.ToString());
} catch(Exception) {}
}
public int MovieIndex {
set {
_movieIndex = (value + _movieDataList.Count) % _movieDataList.Count;
}
get {
return _movieIndex;
}
}
public new MovieData movieData {
get {
if(_movieDataList.Count > 0) {
return _movieDataList[_movieIndex];
}
return null;
}
}
public extern void orig_initialize();
public new void initialize() {
orig_initialize();
try {
_movieIndex = Math.Max(0, int.Parse(File.ReadAllText(_fname)));
} catch(Exception) {
_movieIndex = 0;
}
}
}

View File

@ -0,0 +1,20 @@
using MU3.Util;
namespace MU3.Sequence;
class patch_Advertise: Advertise {
// Exclude Back/Left/Right
private bool anyKeyDown() {
UIInput instance = Singleton<UIInput>.instance;
if(instance.getTriggerOn(UIInput.Key.Decision)
|| instance.getTriggerOn(UIInput.Key.OptionBackward)
|| instance.getTriggerOn(UIInput.Key.OptionForward)
|| instance.getTriggerOn(UIInput.Key.SkipLeft)
|| instance.getTriggerOn(UIInput.Key.SkipRight)
|| instance.getTriggerOn(UIInput.Key.MenuLeft)
|| instance.getTriggerOn(UIInput.Key.MenuRight)) {
return true;
}
return false;
}
}

View File

@ -0,0 +1,35 @@
using MU3.Operation;
using MU3.Util;
using UnityEngine;
namespace MU3;
class patch_AdvManager: AdvManager {
private GameObject objMovie;
private CriManaMovieMaterial movieController;
private extern bool orig_exec();
public new bool exec() {
if(movieController?.player?.status == CriMana.Player.Status.Playing) {
if(Singleton<UIInput>.instance.getTriggerOn(UIInput.Key.Service)) {
movieController.player.Pause(!movieController.player.IsPaused());
} else if(Singleton<UIInput>.instance.getTriggerOn(UIInput.Key.L2)) {
addMovieOffset(-1);
} else if(Singleton<UIInput>.instance.getTriggerOn(UIInput.Key.L3)) {
addMovieOffset(1);
}
}
return orig_exec();
}
public void addMovieOffset(int offset) {
var om = (patch_OperationManager)Singleton<OperationManager>.instance;
om.MovieIndex += offset;
movieController.Stop();
Utility.destroyGameObject(ref movieController);
Utility.destroyGameObject(ref objMovie);
initMovie();
}
}

View File

@ -3,6 +3,8 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.9.34728.123 VisualStudioVersion = 17.9.34728.123
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AttractVideoPlayer", "AttractVideoPlayer\AttractVideoPlayer.csproj", "{003AD3C6-07CA-4824-B4BD-4BEF6F3D8999}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BetterGiveUp", "BetterGiveUp\BetterGiveUp.csproj", "{003AD3C6-07CA-4824-B4BD-4BEF6F3D8997}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BetterGiveUp", "BetterGiveUp\BetterGiveUp.csproj", "{003AD3C6-07CA-4824-B4BD-4BEF6F3D8997}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NaiveRating", "NaiveRating\NaiveRating.csproj", "{1FEA698E-DF5E-46CF-8023-F2B2F57885C5}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NaiveRating", "NaiveRating\NaiveRating.csproj", "{1FEA698E-DF5E-46CF-8023-F2B2F57885C5}"
@ -39,12 +41,18 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnlockMemoryChapters", "Unl
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PlatinumTiming", "PlatinumTiming\PlatinumTiming.csproj", "{099AD6AF-181A-4745-88C4-1D0466BECCB1}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PlatinumTiming", "PlatinumTiming\PlatinumTiming.csproj", "{099AD6AF-181A-4745-88C4-1D0466BECCB1}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AttractVideoPlayer", "AttractVideoPlayer\AttractVideoPlayer.csproj", "{6889330F-2E7E-4778-ADFF-70AF036F1BD5}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64 Debug|x64 = Debug|x64
Release|x64 = Release|x64 Release|x64 = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{003AD3C6-07CA-4824-B4BD-4BEF6F3D8999}.Debug|x64.ActiveCfg = Debug|x64
{003AD3C6-07CA-4824-B4BD-4BEF6F3D8999}.Debug|x64.Build.0 = Debug|x64
{003AD3C6-07CA-4824-B4BD-4BEF6F3D8999}.Release|x64.ActiveCfg = Release|x64
{003AD3C6-07CA-4824-B4BD-4BEF6F3D8999}.Release|x64.Build.0 = Release|x64
{003AD3C6-07CA-4824-B4BD-4BEF6F3D8997}.Debug|x64.ActiveCfg = Debug|x64 {003AD3C6-07CA-4824-B4BD-4BEF6F3D8997}.Debug|x64.ActiveCfg = Debug|x64
{003AD3C6-07CA-4824-B4BD-4BEF6F3D8997}.Debug|x64.Build.0 = Debug|x64 {003AD3C6-07CA-4824-B4BD-4BEF6F3D8997}.Debug|x64.Build.0 = Debug|x64
{003AD3C6-07CA-4824-B4BD-4BEF6F3D8997}.Release|x64.ActiveCfg = Release|x64 {003AD3C6-07CA-4824-B4BD-4BEF6F3D8997}.Release|x64.ActiveCfg = Release|x64
@ -117,6 +125,10 @@ Global
{099AD6AF-181A-4745-88C4-1D0466BECCB1}.Debug|x64.Build.0 = Debug|x64 {099AD6AF-181A-4745-88C4-1D0466BECCB1}.Debug|x64.Build.0 = Debug|x64
{099AD6AF-181A-4745-88C4-1D0466BECCB1}.Release|x64.ActiveCfg = Release|x64 {099AD6AF-181A-4745-88C4-1D0466BECCB1}.Release|x64.ActiveCfg = Release|x64
{099AD6AF-181A-4745-88C4-1D0466BECCB1}.Release|x64.Build.0 = Release|x64 {099AD6AF-181A-4745-88C4-1D0466BECCB1}.Release|x64.Build.0 = Release|x64
{6889330F-2E7E-4778-ADFF-70AF036F1BD5}.Debug|x64.ActiveCfg = Debug|x64
{6889330F-2E7E-4778-ADFF-70AF036F1BD5}.Debug|x64.Build.0 = Debug|x64
{6889330F-2E7E-4778-ADFF-70AF036F1BD5}.Release|x64.ActiveCfg = Release|x64
{6889330F-2E7E-4778-ADFF-70AF036F1BD5}.Release|x64.Build.0 = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE