27 lines
799 B
C#
Raw Normal View History

2022-05-14 19:53:00 +01:00
using Aki.Reflection.Patching;
using System.Reflection;
namespace CWX_WeatherPatcher
{
public class GClassPatch : ModulePatch // MAKES CHANGES TO WeatherClass SMETHOD_0
2022-05-14 19:53:00 +01:00
{
protected override MethodBase GetTargetMethod()
{
2022-08-19 17:27:56 +01:00
return typeof(WeatherClass).GetMethod("smethod_0", BindingFlags.NonPublic | BindingFlags.Static);
2022-05-14 19:53:00 +01:00
}
[PatchPostfix]
2022-08-19 17:27:56 +01:00
private static void PatchPostfix(ref WeatherClass __result)
2022-05-14 19:53:00 +01:00
{
__result.Cloudness = -1;
__result.WindDirection = 8;
__result.Wind = 0;
__result.Rain = 0;
__result.RainRandomness = 0;
__result.ScaterringFogDensity = 0;
__result.GlobalFogDensity = 0;
__result.GlobalFogHeight = 0;
}
}
}