mirror of
https://github.com/MewoLab/AquaDX.git
synced 2025-10-26 04:22:38 +00:00
[F] Some compatability for 2p mode
This commit is contained in:
parent
3fcdf38d4a
commit
247f8f132b
@ -32,6 +32,7 @@ LoadAssetBundleWithoutManifest=true
|
|||||||
# Skip "New Event" and "Information" text boxes for new users
|
# Skip "New Event" and "Information" text boxes for new users
|
||||||
SkipEventInfo=true
|
SkipEventInfo=true
|
||||||
# Random BGM, put Mai2Cue.{acb,awb} of old version of the game in `LocalAssets\Mai2Cue` and rename them
|
# Random BGM, put Mai2Cue.{acb,awb} of old version of the game in `LocalAssets\Mai2Cue` and rename them
|
||||||
|
# Do not enable when SinglePlayer is off
|
||||||
RandomBgm=false
|
RandomBgm=false
|
||||||
# Play "Master" difficulty on Demo screen
|
# Play "Master" difficulty on Demo screen
|
||||||
DemoMaster=true
|
DemoMaster=true
|
||||||
@ -39,6 +40,7 @@ DemoMaster=true
|
|||||||
ExecOnIdle=""
|
ExecOnIdle=""
|
||||||
ExecOnEntry=""
|
ExecOnEntry=""
|
||||||
# Disable timers
|
# Disable timers
|
||||||
|
# Not recommand to enable when SinglePlayer is off
|
||||||
ExtendTimer=true
|
ExtendTimer=true
|
||||||
# Save immediate after playing a song
|
# Save immediate after playing a song
|
||||||
ImmediateSave=true
|
ImmediateSave=true
|
||||||
|
|||||||
@ -12,8 +12,11 @@ namespace AquaMai.UX
|
|||||||
[HarmonyPatch(typeof(AdvDemoProcess), "OnStart")]
|
[HarmonyPatch(typeof(AdvDemoProcess), "OnStart")]
|
||||||
public static void AdvDemoProcessPostStart()
|
public static void AdvDemoProcessPostStart()
|
||||||
{
|
{
|
||||||
var userOption = Singleton<GamePlayManager>.Instance.GetGameScore(0).UserOption;
|
for (int i = 0; i < 2; i++)
|
||||||
userOption.NoteSpeed = OptionNotespeedID.Speed7_0;
|
{
|
||||||
|
var userOption = Singleton<GamePlayManager>.Instance.GetGameScore(i).UserOption;
|
||||||
|
userOption.NoteSpeed = OptionNotespeedID.Speed6_5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyPrefix]
|
[HarmonyPrefix]
|
||||||
|
|||||||
@ -52,5 +52,31 @@ namespace AquaMai.UX
|
|||||||
____monitors[0].SetButtonPressed(InputManager.ButtonSetting.Button04);
|
____monitors[0].SetButtonPressed(InputManager.ButtonSetting.Button04);
|
||||||
Traverse.Create(__instance).Method("OnTimeUp").GetValue();
|
Traverse.Create(__instance).Method("OnTimeUp").GetValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(PlInformationMonitor), "IsPlayPlInfoEnd")]
|
||||||
|
public static bool IWontTapOrSlideVigorously(ref bool __result)
|
||||||
|
{
|
||||||
|
__result = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(GameOverMonitor), "IsPlayEnd")]
|
||||||
|
public static bool GameOverMonitorPlayEnd(ref bool __result)
|
||||||
|
{
|
||||||
|
__result = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(GameOverProcess), "OnUpdate")]
|
||||||
|
public static void GameOverProcessOnUpdate(ref GameOverProcess.GameOverSequence ____state)
|
||||||
|
{
|
||||||
|
if (____state == GameOverProcess.GameOverSequence.SkyChange)
|
||||||
|
{
|
||||||
|
____state = GameOverProcess.GameOverSequence.Disp;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -14,10 +14,6 @@ public class LoadLocalBga
|
|||||||
[HarmonyPatch(typeof(GameCtrl), "IsReady")]
|
[HarmonyPatch(typeof(GameCtrl), "IsReady")]
|
||||||
public static void LoadLocalBgaAwake(GameObject ____movieMaskObj)
|
public static void LoadLocalBgaAwake(GameObject ____movieMaskObj)
|
||||||
{
|
{
|
||||||
var components = ____movieMaskObj.GetComponentsInChildren<Component>(false);
|
|
||||||
var movie = components.FirstOrDefault(it => it.name == "Movie");
|
|
||||||
if (movie is null) return;
|
|
||||||
|
|
||||||
var music = Singleton<DataManager>.Instance.GetMusic(GameManager.SelectMusicID[0]);
|
var music = Singleton<DataManager>.Instance.GetMusic(GameManager.SelectMusicID[0]);
|
||||||
if (music is null) return;
|
if (music is null) return;
|
||||||
|
|
||||||
@ -28,8 +24,13 @@ public class LoadLocalBga
|
|||||||
if (jacket is null)
|
if (jacket is null)
|
||||||
{
|
{
|
||||||
MelonLogger.Msg("No jacket found for music " + music);
|
MelonLogger.Msg("No jacket found for music " + music);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
var components = ____movieMaskObj.GetComponentsInChildren<Component>(false);
|
||||||
|
var movies = components.Where(it => it.name == "Movie");
|
||||||
|
|
||||||
|
foreach (var movie in movies)
|
||||||
{
|
{
|
||||||
// If I create a new RawImage component, the jacket will be not be displayed
|
// If I create a new RawImage component, the jacket will be not be displayed
|
||||||
// I think it will be difficult to make it work with RawImage
|
// I think it will be difficult to make it work with RawImage
|
||||||
@ -39,7 +40,5 @@ public class LoadLocalBga
|
|||||||
sprite.sprite = Sprite.Create(jacket, new Rect(0, 0, jacket.width, jacket.height), new Vector2(0.5f, 0.5f));
|
sprite.sprite = Sprite.Create(jacket, new Rect(0, 0, jacket.width, jacket.height), new Vector2(0.5f, 0.5f));
|
||||||
sprite.material = new Material(Shader.Find("Sprites/Default"));
|
sprite.material = new Material(Shader.Find("Sprites/Default"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// movie.gameObject.SetActive(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -92,31 +92,5 @@ namespace AquaMai.UX
|
|||||||
Singleton<GamePlayManager>.Instance.SetQuickRetryFrag(flag: true);
|
Singleton<GamePlayManager>.Instance.SetQuickRetryFrag(flag: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyPrefix]
|
|
||||||
[HarmonyPatch(typeof(PlInformationMonitor), "IsPlayPlInfoEnd")]
|
|
||||||
public static bool IWontTapOrSlideVigorously(ref bool __result)
|
|
||||||
{
|
|
||||||
__result = true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
[HarmonyPrefix]
|
|
||||||
[HarmonyPatch(typeof(GameOverMonitor), "IsPlayEnd")]
|
|
||||||
public static bool GameOverMonitorPlayEnd(ref bool __result)
|
|
||||||
{
|
|
||||||
__result = true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
[HarmonyPrefix]
|
|
||||||
[HarmonyPatch(typeof(GameOverProcess), "OnUpdate")]
|
|
||||||
public static void GameOverProcessOnUpdate(ref GameOverProcess.GameOverSequence ____state)
|
|
||||||
{
|
|
||||||
if (____state == GameOverProcess.GameOverSequence.SkyChange)
|
|
||||||
{
|
|
||||||
____state = GameOverProcess.GameOverSequence.Disp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user