2022-05-14 19:53:00 +01:00
|
|
|
|
using Aki.Reflection.Patching;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
|
|
|
|
|
namespace CWX_WeatherPatcher
|
|
|
|
|
{
|
2022-10-19 17:27:45 +01:00
|
|
|
|
public class LevelSettingsPatch : ModulePatch // MAKES CHANGES TO LevelSettings
|
2022-05-14 19:53:00 +01:00
|
|
|
|
{
|
|
|
|
|
protected override MethodBase GetTargetMethod()
|
|
|
|
|
{
|
|
|
|
|
return typeof(LevelSettings).GetMethod("ApplySettings", BindingFlags.Public | BindingFlags.Instance);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[PatchPostfix]
|
|
|
|
|
private static void PostFixPatch(ref LevelSettings __instance)
|
|
|
|
|
{
|
|
|
|
|
__instance.fog = false;
|
|
|
|
|
__instance.fogEndDistance = 0f;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|