Removal of thermal sights
This commit is contained in:
parent
f0cd475ec6
commit
30f7fefbf1
@ -8,7 +8,7 @@ using EFT;
|
||||
namespace ClearVision {
|
||||
public class GogglesPatches : ModulePatch {
|
||||
protected override MethodBase GetTargetMethod() {
|
||||
Debug.Log("GogglesPatches GTM()");
|
||||
Logger.LogInfo("GogglesPatches GTM()");
|
||||
var result = typeof(NightVision).GetMethod("method_1", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
return result;
|
||||
}
|
||||
@ -21,7 +21,7 @@ namespace ClearVision {
|
||||
NightVision nv = maincam.GetComponent<NightVision>();
|
||||
CC_Vintage vintage = maincam.GetComponent<CC_Vintage>();
|
||||
if(nv != null && nv.On) {
|
||||
Debug.Log("nv is not null and is enabled/being enabled");
|
||||
Logger.LogInfo("nv is not null and is enabled/being enabled");
|
||||
nv.Intensity = Plugin.NVGIntensity.Value;
|
||||
nv.NoiseIntensity = Plugin.NVGNoiseIntensity.Value;
|
||||
nv.NoiseScale = Plugin.NVGNoiseScale.Value;
|
||||
@ -50,7 +50,7 @@ namespace ClearVision {
|
||||
|
||||
public class ScopePatches : ModulePatch {
|
||||
protected override MethodBase GetTargetMethod() {
|
||||
Debug.Log("ScopePatches GTM()");
|
||||
Logger.LogInfo("ScopePatches GTM()");
|
||||
var result = typeof(ThermalVision).GetMethod("method_1", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
return result;
|
||||
}
|
||||
@ -58,14 +58,9 @@ namespace ClearVision {
|
||||
[PatchPostfix]
|
||||
static void Postfix() {
|
||||
if(Plugin.GlobalEnabled.Value && Singleton<GameWorld>.Instantiated) { // sanity check
|
||||
// Get Camera
|
||||
GameObject maincam = GameObject.Find("FPS Camera");
|
||||
ThermalVision t7 = maincam.GetComponent<ThermalVision>();
|
||||
// Get BaseOpticScope(Clone) obj, but need to check if it actually exists
|
||||
GameObject scope = GameObject.FindGameObjectWithTag("OpticCamera");
|
||||
ThermalVision thermal = scope.GetComponent<ThermalVision>();
|
||||
if(t7 != null && t7.On) {
|
||||
Debug.Log("t7 is not null and is on!");
|
||||
if(t7.On) {
|
||||
t7.IsGlitch = Plugin.T7Glitch.Value;
|
||||
t7.IsPixelated = Plugin.T7Pixel.Value;
|
||||
t7.IsNoisy = Plugin.T7Noise.Value;
|
||||
@ -86,24 +81,9 @@ namespace ClearVision {
|
||||
// just need to see where it is in the data structure
|
||||
return;
|
||||
}
|
||||
else if (scope != null && thermal != null && thermal.On && !t7.On) {
|
||||
Debug.Log("scope and thermal script are not null and is on!");
|
||||
thermal.IsGlitch = Plugin.ThermalGlitch.Value;
|
||||
thermal.IsPixelated = Plugin.ThermalPixel.Value;
|
||||
thermal.IsNoisy = Plugin.ThermalNoise.Value;
|
||||
thermal.IsMotionBlurred = Plugin.ThermalMotionBlur.Value;
|
||||
thermal.IsFpsStuck = Plugin.ThermalFpsLock.Value;
|
||||
if (Plugin.ThermalFpsLock.Value) {
|
||||
thermal.StuckFpsUtilities.MaxFramerate = Plugin.ThermalFpsMax.Value;
|
||||
thermal.StuckFpsUtilities.MinFramerate = Plugin.ThermalFpsMax.Value;
|
||||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
else
|
||||
return;
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
@ -26,18 +26,9 @@ namespace ClearVision {
|
||||
public static ConfigEntry<bool> T7MotionBlur { get; set; }
|
||||
public static ConfigEntry<bool> T7MaskEnabled { get; set; }
|
||||
public static ConfigEntry<float> T7MaskSize { get; set; }
|
||||
|
||||
// All Thermal Sights
|
||||
public static ConfigEntry<bool> ThermalEnabled { get; set; }
|
||||
public static ConfigEntry<bool> ThermalGlitch { get; set; }
|
||||
public static ConfigEntry<bool> ThermalNoise { get; set; }
|
||||
public static ConfigEntry<bool> ThermalPixel { get; set; }
|
||||
public static ConfigEntry<bool> ThermalFpsLock { get; set; }
|
||||
public static ConfigEntry<int> ThermalFpsMax { get; set; }
|
||||
public static ConfigEntry<bool> ThermalMotionBlur { get; set; }
|
||||
|
||||
private void Start() {
|
||||
Debug.Log("ClearVision Start()");
|
||||
Logger.LogInfo("ClearVision Start()");
|
||||
GlobalEnabled = Config.Bind("ClearVision", "GlobalEnabled", true, new ConfigDescription("Main Toggle", null));
|
||||
// NVG Goggles
|
||||
NVGEnabled = Config.Bind("NVG", "NVGEnabled", true, new ConfigDescription("Enable GPNVG-18", null));
|
||||
@ -58,14 +49,6 @@ namespace ClearVision {
|
||||
T7FpsMax = Config.Bind("T7", "T7FpsMax", 60, new ConfigDescription("T-7 FPS Max FPS", new AcceptableValueRange<int>(15, 60)));
|
||||
T7MaskEnabled = Config.Bind("T7", "T7MaskEnabled", false, new ConfigDescription("T-7 Mask Overlay On/Off", null));
|
||||
T7MaskSize = Config.Bind("T7", "T7MaskSize", 1.5f, new ConfigDescription("T-7 Mask Overlay Size", new AcceptableValueRange<float>(0f, 5f)));
|
||||
// Thermal 60Hz
|
||||
ThermalEnabled = Config.Bind("Scopes", "ThermalEnabled", true, new ConfigDescription("Enable Thermal Sights", null));
|
||||
ThermalNoise = Config.Bind("Scopes", "ThermalNosie", false, new ConfigDescription("Thermal Noise", null));
|
||||
ThermalGlitch = Config.Bind("Scopes", "ThermalGlitch", false, new ConfigDescription("Thermal Glitchiness", null));
|
||||
ThermalPixel = Config.Bind("Scopes", "ThermalPixel", false, new ConfigDescription("Thermal Pixelation", null));
|
||||
ThermalMotionBlur = Config.Bind("Scopes", "ThermalMotionBlur", false, new ConfigDescription("Thermal Motion Blur", null));
|
||||
ThermalFpsLock = Config.Bind("Scopes", "ThermalFpsLock", true, new ConfigDescription("Thermal FPS Lock Enabled", null));
|
||||
ThermalFpsMax = Config.Bind("Scopes", "ThermalFpsMax", 60, new ConfigDescription("Thermal FPS Max FPS", new AcceptableValueRange<int>(15, 60)));
|
||||
|
||||
new GogglesPatches().Enable();
|
||||
new ScopePatches().Enable();
|
||||
|
Loading…
x
Reference in New Issue
Block a user