mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
Fix ToggleOption inlining
This commit is contained in:
1 parent
35be381a77
commit
a0436dcbba
1 file changed
+10
-2
@@ -23,10 +23,18 @@ public static class OptionsPatches
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(ToggleOption), nameof(ToggleOption.UpdateValue))]
|
||||
[HarmonyPatch(typeof(ToggleOption), nameof(ToggleOption.Toggle))]
|
||||
// UpdateValue was inlined.
|
||||
public static bool ToggleUpdate(ToggleOption __instance)
|
||||
{
|
||||
return !__instance.IsCustom();
|
||||
if (!__instance.IsCustom())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
__instance.CheckMark.enabled = !__instance.CheckMark.enabled;
|
||||
__instance.OnValueChanged.Invoke(__instance);
|
||||
return false;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
|
||||
Reference in new issue
Block a user