Skip to content

Instantly share code, notes, and snippets.

@frostu8
Created March 5, 2021 02:44
Show Gist options
  • Select an option

  • Save frostu8/f37a9f6c3136924ff1bbacf8e070acd5 to your computer and use it in GitHub Desktop.

Select an option

Save frostu8/f37a9f6c3136924ff1bbacf8e070acd5 to your computer and use it in GitHub Desktop.
EnsembleLock
// EnsembleLock by frostu8
//
// Re-implements the Reverberation Ensemble's locking mechanic.
//
// 1.0.0.0 (03-04-2020) - Original version
//
// License: Unlicense
using System;
using System.IO;
using HarmonyLib;
using UnityEngine;
namespace EnsembleLock
{
public class Harmony_Patch
{
public Harmony_Patch()
{
try
{
Harmony harmony = new Harmony("EnsembleLock");
harmony.Patch(
AccessTools.Method(typeof(LibraryModel), "IsClearTheBlueReverberationPrimary"),
new HarmonyMethod(AccessTools.Method(typeof(Harmony_Patch), "patch_IsClearTheBlueReverberationPrimary")),
null, null, null);
}
catch (Exception ex)
{
File.WriteAllText(Application.dataPath + "/BaseMods/EnsembleLock_ERROR.txt", ex.Message + Environment.NewLine + ex.StackTrace);
}
}
public static bool patch_IsClearTheBlueReverberationPrimary(LibraryModel __instance, ref bool __result, SephirahType sep)
{
__result = __instance.IsClearTheBlueReverberationPrimaryFloor(sep);
return false;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment