using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using HG.Reflection; using Microsoft.CodeAnalysis; using RoR2; using UnityEngine; using UnityEngine.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("SnowtimeComponents")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+f93a40505933251ade42c302b6e56c94395e6e5c")] [assembly: AssemblyProduct("SnowtimeComponents")] [assembly: AssemblyTitle("SnowtimeComponents")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } [ExecuteAlways] public class SetAmbientLightPrettyPlease : MonoBehaviour { public bool setSkyboxMaterial; public bool setAmbientLightColor; public Material skyboxMaterial; public AmbientMode ambientMode; public float ambientIntensity; [ColorUsage(true, true)] public Color ambientSkyColor = Color.black; [ColorUsage(true, true)] public Color ambientEquatorColor = Color.black; [ColorUsage(true, true)] public Color ambientGroundColor = Color.black; public void Start() { ApplyLighting(); } public void ApplyLighting() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) if (setAmbientLightColor) { RenderSettings.ambientMode = ambientMode; RenderSettings.ambientSkyColor = ambientSkyColor * ambientIntensity; RenderSettings.ambientEquatorColor = ambientEquatorColor * ambientIntensity; RenderSettings.ambientGroundColor = ambientGroundColor * ambientIntensity; } if (setSkyboxMaterial) { RenderSettings.skybox = skyboxMaterial; } } } public class VolumeCullingwLights : MonoBehaviour { public GameObject[] RendererContainers; public GameObject[] LightContainers; public Vector3 VolumeCenter = Vector3.zero; public Vector3 VolumeSize = Vector3.one * 10f; private List _renderers = new List(); private List _lights = new List(); private bool _isVisible = true; public void Start() { int num = RendererContainers.Length; for (int i = 0; i < num; i++) { RendererContainers[i].GetComponentsInChildren(false, _renderers); } int num2 = RendererContainers.Length; for (int j = 0; j < num2; j++) { LightContainers[j].GetComponentsInChildren(false, _lights); } } public void LateUpdate() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) ReadOnlyCollection readOnlyInstancesList = CameraRigController.readOnlyInstancesList; int count = readOnlyInstancesList.Count; bool flag = false; ((Component)this).transform.TransformPoint(VolumeCenter); Bounds val = default(Bounds); ((Bounds)(ref val))..ctor(VolumeCenter, VolumeSize); for (int i = 0; i < count; i++) { CameraRigController val2 = readOnlyInstancesList[i]; Vector3 val3 = ((Component)this).transform.InverseTransformPoint(val2.currentCameraState.position); flag = ((Bounds)(ref val)).Contains(val3); if (flag) { break; } } if (_isVisible != flag) { _isVisible = flag; for (int j = 0; j < _renderers.Count; j++) { _renderers[j].enabled = _isVisible; } for (int k = 0; k < _lights.Count; k++) { ((Behaviour)_lights[k]).enabled = _isVisible; } } } public void OnDrawGizmosSelected() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) Gizmos.color = Color.cyan; Matrix4x4 matrix = Gizmos.matrix; Gizmos.matrix = ((Component)this).transform.localToWorldMatrix; Gizmos.DrawWireCube(VolumeCenter, VolumeSize); Gizmos.matrix = matrix; } } namespace SnowtimeComponents { [BepInPlugin("SnowySnowtime.SnowtimeComponents_Components", "SnowtimeComponents_Components", "1.0.1")] public class SnowtimeComponents : BaseUnityPlugin { public const string Author = "SnowySnowtime"; public const string Name = "SnowtimeComponents_Components"; public const string Version = "1.0.1"; public const string GUID = "SnowySnowtime.SnowtimeComponents_Components"; public static SnowtimeComponents instance; public void Awake() { instance = this; } } }