Table of Contents

Class SettingPatches

Namespace
ConfigurableWarning.Patches
Assembly
RedstoneWizard08.ContentLibrary.dll

Settings patches

[HarmonyPatch]
public class SettingPatches
Inheritance
SettingPatches
Inherited Members

Methods

SetValueFloat(ref FloatSetting, float, ISettingHandler)

Patches the SetValue(float, ISettingHandler) method to not clamp if it's disabled.

[HarmonyPostfix]
[HarmonyPatch(typeof(FloatSetting), "SetValue")]
public static void SetValueFloat(ref FloatSetting __instance, float value, ISettingHandler handler)

Parameters

__instance FloatSetting

The current instance of a FloatSetting.

value float

The value

handler ISettingHandler

The settings handler

SetValueFloatPre(ref FloatSetting, float, ISettingHandler)

Patches the SetValue(float, ISettingHandler) method to capture the value.

[HarmonyPrefix]
[HarmonyPatch(typeof(FloatSetting), "SetValue")]
public static void SetValueFloatPre(ref FloatSetting __instance, float value, ISettingHandler handler)

Parameters

__instance FloatSetting

The current instance of a FloatSetting.

value float

The value

handler ISettingHandler

The settings handler