Document Harmony Patches

This commit is contained in:
copecone committed 2026-10-15 16:17:13 +09:00
1 parent 8deb64fd4d
commit d2bd655118
19 files changed
+499 -4

No files matched your search

+21
View File
@@ -6,10 +6,31 @@ using UnityEngine.UI;
namespace ADOFAIRenderer.Patch.Game;
/// <summary>
/// Replaces the game's status text (normally "Autoplay", "Auto tile" or "Debug Mode") with the render status.
/// <para>
/// Patched member: <c>scrShowIfDebug.Update()</c>, which each frame sets its UI <c>Text</c> (<c>txt</c>) to the autoplay /
/// auto-tile / debug label or hides it (no-HUD modes, recording mode), in <c>defaultColor</c> (green) or orange for auto tiles.
/// </para>
/// <para>
/// Active while <see cref="RenderManager.IsActive"/> (stage &gt;= OnScene). The postfix overwrites whatever the original set,
/// every frame, so the text is shown even in the game's no-HUD modes.
/// </para>
/// </summary>
[HarmonyPatch(typeof(scrShowIfDebug))]
// ReSharper disable once InconsistentNaming
public static class scrShowIfDebugPatch
{
/// <summary>
/// Postfix of <c>scrShowIfDebug.Update</c>. Shows, in the default (green) color:
/// <list type="bullet">
/// <item>"Render in Ns.." during the countdown (N = <c>RenderManager.countdown</c>, seconds), otherwise "Render";</item>
/// <item>after the end condition is met (<c>endFrame</c> != -1), a second line "Waiting for X.Xs.." with the remaining
/// part of <c>DelayAfterEnd</c> in render seconds ((frameCount - endFrame) / RenderFPS elapsed), clamped at 0.</item>
/// </list>
/// </summary>
/// <param name="___txt">Private field <c>txt</c>: the status Text component.</param>
/// <param name="___defaultColor">Private field <c>defaultColor</c>: the game's status text color.</param>
[HarmonyPostfix]
[HarmonyPatch("Update")]
[SuppressMessage("ReSharper", "InconsistentNaming")]