2022-05-14 19:53:00 +01:00
|
|
|
using Aki.Reflection.Patching;
|
|
|
|
using System.Reflection;
|
2022-08-19 17:27:56 +01:00
|
|
|
using EFT;
|
2022-05-14 19:53:00 +01:00
|
|
|
|
|
|
|
namespace CWX_WeatherPatcher
|
|
|
|
{
|
2022-05-25 13:36:03 +01:00
|
|
|
class GClassPatch : ModulePatch // MAKES CHANGES TO GClass1694 SMETHOD_0
|
2022-05-14 19:53:00 +01:00
|
|
|
{
|
|
|
|
protected override MethodBase GetTargetMethod()
|
2022-05-21 17:48:06 +01:00
|
|
|
{
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|