forked from CWX/CWX-mods
22 lines
633 B
C#
22 lines
633 B
C#
using Aki.Reflection.Patching;
|
|
using System.Reflection;
|
|
|
|
namespace CWX_WeatherPatcher
|
|
{
|
|
class LevelSettingsPatch : 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!");
|
|
}
|
|
}
|
|
}
|