Decompiled source of RundownX v1.9.3

plugins/Dogs-RundownX-Datablocks/Custom/DesertCullingFix/DesertCullingFix.dll

Decompiled 2 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Unity.IL2CPP;
using CullingSystem;
using HarmonyLib;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Microsoft.CodeAnalysis;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("DesertCullingFix")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("DesertCullingFix")]
[assembly: AssemblyTitle("DesertCullingFix")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace DesertCullingFix
{
	[BepInPlugin("TheDoggyDoge.DesertCullingFix", "DesertCullingFix", "1.0.0")]
	public class EntryPoint : BasePlugin
	{
		public static EntryPoint e;

		public override void Load()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			e = this;
			new Harmony("TheDoggyDoge.DesertCullingFix").PatchAll();
			Patch.culling_enabled = true;
		}

		public static void LogIt(object data)
		{
			((BasePlugin)e).Log.LogInfo(data);
		}

		public virtual bool Unload()
		{
			return ((BasePlugin)this).Unload();
		}
	}
	[HarmonyPatch]
	internal class Patch
	{
		public static bool culling_enabled = true;

		public static int cull_count = 0;

		[HarmonyPrefix]
		[HarmonyPatch(typeof(C_Camera), "RunVisibility")]
		public static bool Prefix_RunVisibility(C_Camera __instance)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			if (C_Camera.RenderWithElevatorMask || __instance.m_cullAgent.CurrentNode == null)
			{
				return false;
			}
			C_Camera.Position = ((Component)__instance).transform.position;
			C_Camera.Forward = ((Component)__instance).transform.forward;
			C_Camera.Right = ((Component)__instance).transform.right;
			C_Camera.Up = ((Component)__instance).transform.up;
			C_CullingManager.SpotLights_WantsToShow.Clear();
			C_CullingManager.PointLights_WantsToShow.Clear();
			if (culling_enabled)
			{
				cull_count = 0;
				C_LightPropagationJob.ResetDynamics();
				__instance.PropagateFrustra();
				C_CullingManager.C_CameraUpdate();
			}
			C_CullingManager.SortAndUpdateLights();
			return false;
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(C_CullingCluster), "Show")]
		public static void Prefix_Cluster_Show(C_CullingCluster __instance)
		{
			cull_count += ((Il2CppArrayBase<Renderer>)(object)__instance.Renderers).Count;
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(C_CullBucket), "Show")]
		public static void Prefix_Bucket_Show(C_CullBucket __instance)
		{
			cull_count += __instance.Renderers.Count;
		}
	}
}

plugins/Dogs-RundownX-Datablocks/Custom/FlowGeos.dll

Decompiled 2 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using GTFO.API;
using HarmonyLib;
using LevelGeneration;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("FlowGeos")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("FlowGeos")]
[assembly: AssemblyTitle("FlowGeos")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace FlowGeos;

[BepInPlugin("FlowGeos", "FlowGeos", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class EntryPoint : BasePlugin
{
	private Harmony m_Harmony;

	public override void Load()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Expected O, but got Unknown
		m_Harmony = new Harmony("FlowGeos");
		m_Harmony.PatchAll();
	}
}
internal static class FlowGeosLogger
{
	private static readonly ManualLogSource _logger;

	static FlowGeosLogger()
	{
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Expected O, but got Unknown
		_logger = new ManualLogSource("FlowGeos");
		Logger.Sources.Add((ILogSource)(object)_logger);
	}

	private static string Format(object msg)
	{
		return msg.ToString();
	}

	public static void Info(object data)
	{
		_logger.LogMessage((object)Format(data));
	}

	public static void Verbose(object data)
	{
	}

	public static void Debug(object data)
	{
		_logger.LogDebug((object)Format(data));
	}

	public static void Error(object data)
	{
		_logger.LogError((object)Format(data));
	}
}
[HarmonyPatch(typeof(LG_WardenObjective_Reactor), "Start")]
internal static class Inject_WO_Reactor
{
	private static void Postfix(LG_WardenObjective_Reactor __instance)
	{
		if ((Object)(object)__instance.m_terminalPrefab == (Object)null)
		{
			FlowGeosLogger.Info("Resolving Terminal Prefab for reactor!");
			__instance.m_terminalPrefab = AssetAPI.GetLoadedAsset<GameObject>("Assets/AssetPrefabs/Complex/Generic/FunctionMarkers/Terminal_Floor.prefab");
			if ((Object)(object)__instance.m_terminalPrefab == (Object)null)
			{
				FlowGeosLogger.Error("We tried to resolve terminal prefab for reactor but it doesn't work...");
			}
		}
	}
}