CWX-mods/Live/CWX_WeatherPatcher/CWX_WeatherPatch3.cs

22 lines
632 B
C#
Raw Normal View History

2022-05-14 19:53:00 +01:00
using Aki.Reflection.Patching;
using System.Reflection;
namespace CWX_WeatherPatcher
{
class CWX_WeatherPatch3 : ModulePatch // MAKES CHANGES TO LEVELSETTINGS
{
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;
Logger.LogMessage("MADE CHANGES TO LEVELSETTINGS!");
}
}
}