SHA256
Document Harmony Patches
This commit is contained in:
1 parent
8deb64fd4d
commit
d2bd655118
19 files changed
+499
-4
No files matched your search
@@ -3,10 +3,25 @@ using HarmonyLib;
|
||||
|
||||
namespace ADOFAIRenderer.Patch.Game;
|
||||
|
||||
/// <summary>
|
||||
/// Keeps a render from writing custom level results to the player's save data.
|
||||
/// <para>
|
||||
/// Patched member: <c>scrMistakesManager.SaveCustom(string hash, bool wonLevel, float multiplier)</c>, which compares the
|
||||
/// run with the stored completion, accuracy, speed trial and death records of the custom level (keyed by the level hash),
|
||||
/// stores new bests through <c>Persistence</c> and returns an <c>EndLevelInfo</c>. The game calls it from
|
||||
/// <c>scrController.OnLandOnPortal</c> (custom level win) and <c>Fail2Action</c> (custom boss level failure).
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// Active while <see cref="RenderManager.IsActive"/> (stage >= OnScene); the run of a render is not stored as a player
|
||||
/// record. The skipped call returns a default <c>EndLevelInfo</c>.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
[HarmonyPatch(typeof(scrMistakesManager))]
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static class scrMistakesManagerPatch
|
||||
{
|
||||
/// <summary>Prefix of <c>scrMistakesManager.SaveCustom</c>.</summary>
|
||||
/// <returns>True to run the original method (not rendering); false to skip it (rendering).</returns>
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch("SaveCustom")]
|
||||
public static bool PreventSaveCustom()
|
||||
|
||||
Reference in new issue
Block a user