Refactor Patches

This commit is contained in:
copecone committed 2026-06-29 22:54:34 +09:00
1 parent 3f6234d0e1
commit f8b7fe608e
6 files changed
+11 -7

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ namespace ADOFAIRenderer.Patch.Game
[HarmonyPrefix] [HarmonyPrefix]
[HarmonyPatch("Show")] [HarmonyPatch("Show")]
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
public static bool PrefixShow(EndscreenLanterns __instance, ref int __result) public static bool ForceHide(EndscreenLanterns __instance, ref int __result)
{ {
if (!RenderManager.IsActive) return true; if (!RenderManager.IsActive) return true;
if (__instance != null) if (__instance != null)
+4 -2
View File
@@ -3,11 +3,13 @@ using HarmonyLib;
namespace ADOFAIRenderer.Patch.Game namespace ADOFAIRenderer.Patch.Game
{ {
[HarmonyPatch(typeof(Persistence), "skipIntroBehavior", MethodType.Getter)] [HarmonyPatch(typeof(Persistence))]
public static class PersistencePatch public static class PersistencePatch
{ {
[HarmonyPostfix]
[HarmonyPatch("skipIntroBehavior", MethodType.Getter)]
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
public static void Postfix(ref SkipIntroBehavior __result) public static void LockSkipIntroBehavior(ref SkipIntroBehavior __result)
{ {
if (RenderManager.IsActive && if (RenderManager.IsActive &&
scrConductor.instance != null && scrConductor.instance != null &&
+1 -1
View File
@@ -13,7 +13,7 @@ namespace ADOFAIRenderer.Patch.Game
[HarmonyPrefix] [HarmonyPrefix]
[HarmonyPatch("UpdateVideo")] [HarmonyPatch("UpdateVideo")]
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
public static bool Prefix(scnGame __instance) public static bool ReplaceVideo(scnGame __instance)
{ {
// Only replace when rendering is active // Only replace when rendering is active
if (!RenderManager.IsActive) if (!RenderManager.IsActive)
+4 -2
View File
@@ -3,12 +3,14 @@ using HarmonyLib;
namespace ADOFAIRenderer.Patch.Game namespace ADOFAIRenderer.Patch.Game
{ {
[HarmonyPatch(typeof(scrCamera), "SetCustomFrameRate")] [HarmonyPatch(typeof(scrCamera))]
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
public class scrCameraPatch public class scrCameraPatch
{ {
[HarmonyPrefix]
[HarmonyPatch("SetCustomFrameRate")]
[SuppressMessage("ReSharper", "InconsistentNaming")] [SuppressMessage("ReSharper", "InconsistentNaming")]
private static bool Prefix(scrCamera __instance, bool enable, float frame) private static bool FixCamRT(scrCamera __instance, bool enable, float frame)
{ {
// There is an issue that `mainTexture.Release` triggers even if `mainTexture` is `camRT`, so mod tries to fix it // There is an issue that `mainTexture.Release` triggers even if `mainTexture` is `camRT`, so mod tries to fix it
if (enable || __instance.enableCustomFPS != enable) return true; if (enable || __instance.enableCustomFPS != enable) return true;
+1 -1
View File
@@ -10,7 +10,7 @@ namespace ADOFAIRenderer.Patch.Game
[HarmonyPostfix] [HarmonyPostfix]
[HarmonyPatch("Start")] [HarmonyPatch("Start")]
// ReSharper disable once InconsistentNaming // ReSharper disable once InconsistentNaming
public static void Postfix(scrPortalParticles __instance) public static void ForceScaledTime(scrPortalParticles __instance)
{ {
if (__instance == null) return; if (__instance == null) return;
View File
Whitespace-only changes.