Refactor and Reorganize Patch Structure and Namespaces

This commit is contained in:
copecone committed 2026-05-28 14:56:16 +09:00
1 parent c235da001c
commit 9514829040
14 files changed
+19 -18

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
using System.Diagnostics.CodeAnalysis;
using ADOFAIRenderer.Core;
using HarmonyLib;
using UnityEngine;
using UnityEngine.UI;
namespace ADOFAIRenderer.Patch.Game
{
[HarmonyPatch(typeof(scrShowIfDebug))]
// ReSharper disable once InconsistentNaming
public static class scrShowIfDebugPatch
{
[HarmonyPostfix]
[HarmonyPatch("Update")]
[SuppressMessage("ReSharper", "InconsistentNaming")]
private static void IgnoreInput(Text ___txt, Color ___defaultColor)
{
if (!RenderManager.IsActive) return;
___txt.text = "Render";
if (RenderManager.Instance)
{
if (RenderManager.Instance.countdown > 0) ___txt.text = $"Render in {RenderManager.Instance.countdown}s..";
if (RenderManager.Instance.wonFrame != -1)
{
var elapsedFrames = RenderManager.Instance.frameCount - RenderManager.Instance.wonFrame;
var remainingTime = RenderManager.Instance.Configuration.EndWaitTime - elapsedFrames / RenderManager.Instance.Configuration.TargetFPS;
if (remainingTime < 0) remainingTime = 0;
___txt.text += $"\nWaiting for {remainingTime:F1}s..";
}
}
___txt.color = ___defaultColor;
}
}
}