Created
March 5, 2021 02:44
-
-
Save frostu8/f37a9f6c3136924ff1bbacf8e070acd5 to your computer and use it in GitHub Desktop.
EnsembleLock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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