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
FloatSettingThe current instance of a FloatSetting.
value
floatThe value
handler
ISettingHandlerThe 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
FloatSettingThe current instance of a FloatSetting.
value
floatThe value
handler
ISettingHandlerThe settings handler