Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of NemesisPlushiesMod v1.5.0
NemesisPlushiesMod.dll
Decompiled 5 days agousing System; using System.Collections.Generic; 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 HarmonyLib; using Microsoft.CodeAnalysis; using Photon.Pun; using UnityEngine; [assembly: AssemblyTitle("NemesisPlushiesMod")] [assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")] [assembly: IgnoresAccessChecksTo("Sirenix.Utilities")] [assembly: IgnoresAccessChecksTo("Sirenix.Serialization")] [assembly: IgnoresAccessChecksTo("Sirenix.Serialization.Config")] [assembly: IgnoresAccessChecksTo("Sirenix.OdinInspector.Attributes")] [assembly: IgnoresAccessChecksTo("SingularityGroup.HotReload.Runtime.Public")] [assembly: IgnoresAccessChecksTo("SingularityGroup.HotReload.Runtime")] [assembly: IgnoresAccessChecksTo("PhotonVoice.PUN")] [assembly: IgnoresAccessChecksTo("PhotonVoice")] [assembly: IgnoresAccessChecksTo("PhotonVoice.API")] [assembly: IgnoresAccessChecksTo("PhotonUnityNetworking.Utilities")] [assembly: IgnoresAccessChecksTo("PhotonUnityNetworking")] [assembly: IgnoresAccessChecksTo("Unity.Burst")] [assembly: IgnoresAccessChecksTo("PhotonRealtime")] [assembly: IgnoresAccessChecksTo("Photon3Unity3D")] [assembly: IgnoresAccessChecksTo("Klattersynth")] [assembly: IgnoresAccessChecksTo("FbxBuildTestAssets")] [assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")] [assembly: IgnoresAccessChecksTo("Domain_Reload")] [assembly: IgnoresAccessChecksTo("Discord.Sdk")] [assembly: IgnoresAccessChecksTo("Autodesk.Fbx")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: IgnoresAccessChecksTo("PhotonChat")] [assembly: UnityAPICompatibilityVersion("2022.3.62f3", new string[] { "UnityEngine.CoreModule:6503E8CDF1A95D43A6F6700B950B862DBC66B629", "UnityEngine.ParticleSystemModule:234ABB61DA76A78DAA39697F6EAF6E9915BC8FA4", "UnityEngine.AudioModule:3905046837BE277D45470E574F6622F7444FD262", "UnityEngine.PhysicsModule:ACC9726B217ADE09A40ECC5F0B4EB3C651F0E4D3" })] [assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")] [assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")] [assembly: AssemblyProduct("NemesisPlushiesMod")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyCompany("nemeshisu")] [assembly: IgnoresAccessChecksTo("websocket-sharp")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")] [assembly: IgnoresAccessChecksTo("Unity.VisualScripting.State")] [assembly: IgnoresAccessChecksTo("Unity.VisualScripting.Flow")] [assembly: IgnoresAccessChecksTo("Unity.VisualScripting.Core")] [assembly: CompilationRelaxations(8)] [assembly: IgnoresAccessChecksTo("Unity.VisualScripting.Antlr3.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")] [assembly: IgnoresAccessChecksTo("Unity.Splines")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")] [assembly: IgnoresAccessChecksTo("Unity.Postprocessing.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.MemoryProfiler")] [assembly: IgnoresAccessChecksTo("Unity.Mathematics")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem")] [assembly: IgnoresAccessChecksTo("Unity.Formats.Fbx.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Timeline")] [assembly: IgnoresAccessChecksTo("Unity.Collections")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] [module: UnverifiableCode] 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; } } [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] [CompilerGenerated] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } public class BreakSpawnBase : MonoBehaviour { public List<PrefabRef> partsList = new List<PrefabRef>(); public List<Transform> spawnsList = new List<Transform>(); public Transform mainSpawnPoint; public void SpawnParts() { //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: 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) if (!SemiFunc.IsMasterClientOrSingleplayer()) { return; } for (int i = 0; i < partsList.Count; i++) { if (SemiFunc.IsMultiplayer()) { if ((Object)(object)spawnsList[i] == (Object)null) { PhotonNetwork.Instantiate(partsList[i].ResourcePath, mainSpawnPoint.position, mainSpawnPoint.rotation, (byte)0, (object[])null); } else { PhotonNetwork.Instantiate(partsList[i].ResourcePath, spawnsList[i].position, spawnsList[i].rotation, (byte)0, (object[])null); } } else if ((Object)(object)spawnsList[i] == (Object)null) { Object.Instantiate<GameObject>(partsList[i].Prefab, mainSpawnPoint.position, mainSpawnPoint.rotation); } else { Object.Instantiate<GameObject>(partsList[i].Prefab, spawnsList[i].position, spawnsList[i].rotation); } } } } public class CameraScreenEffect : MonoBehaviour { private float activeTimer; public Transform pivotPoint; public List<Material> materialList; public float rotationSpeed = 1f; public float fadeInSpeed = 1f; public float fadeOutSpeed = 1f; public MeshRenderer cameraRenderer1; public MeshRenderer cameraRenderer2; private void Start() { MakeTransparent(); SetMaterials(); } private void Update() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) if (activeTimer > 0f) { activeTimer -= Time.deltaTime; FadeIn(); pivotPoint.Rotate(0f, 0f, rotationSpeed * Time.deltaTime); return; } FadeOut(); if (materialList[0].color.a <= 0f) { Object.Destroy((Object)(object)((Component)this).gameObject); } } public void SetMaterials() { ((Renderer)cameraRenderer1).material = materialList[0]; ((Renderer)cameraRenderer2).material = materialList[1]; } public void Active() { activeTimer = 0.05f; } private void FadeIn() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) foreach (Material material in materialList) { Color color = material.color; color.a = Mathf.MoveTowards(color.a, 1f, Time.deltaTime * fadeInSpeed); material.color = color; } } private void FadeOut() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) foreach (Material material in materialList) { Color color = material.color; color.a = Mathf.MoveTowards(color.a, 0f, Time.deltaTime * fadeOutSpeed); material.color = color; } } private void MakeTransparent() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) foreach (Material material in materialList) { Color color = material.color; color.a = 0f; material.color = color; } } } public class ItemCamera : MonoBehaviour { } public class MultiBase : MonoBehaviour { public List<ValuableObject> listValuableObject; public ValuableObject parentValuable; private void Start() { foreach (ValuableObject item in listValuableObject) { ((Behaviour)item).enabled = false; } ((MonoBehaviour)this).Invoke("enableValuableObjects", 5f); } private void Update() { checkIfChildrenDead(); } public void enableValuableObjects() { foreach (ValuableObject item in listValuableObject) { ((Behaviour)item).enabled = true; } disableParentValuable(); } public void disableParentValuable() { ((Behaviour)parentValuable).enabled = false; } public void checkIfChildrenDead() { listValuableObject.RemoveAll((ValuableObject val) => (Object)(object)val == (Object)null); if (listValuableObject.Count <= 0) { Object.Destroy((Object)(object)((Component)parentValuable).gameObject); } } } public class SpriteScreenEffect : MonoBehaviour { private float activeTimer; public Transform pivotPoint; public SpriteRenderer spriteRenderer1; public SpriteRenderer spriteRenderer2; public float rotationSpeed = 1f; public float fadeInSpeed = 1f; public float fadeOutSpeed = 1f; private void Start() { MakeTransparent(); } private void Update() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) if (activeTimer > 0f) { activeTimer -= Time.deltaTime; FadeIn(); pivotPoint.Rotate(0f, 0f, rotationSpeed * Time.deltaTime); return; } FadeOut(); if (spriteRenderer1.color.a <= 0f) { Object.Destroy((Object)(object)((Component)this).gameObject); } } public void Active() { activeTimer = 0.05f; } private void FadeIn() { //IL_0007: 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_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) Color color = spriteRenderer1.color; color.a = Mathf.MoveTowards(color.a, 1f, Time.deltaTime * fadeInSpeed); spriteRenderer1.color = color; spriteRenderer2.color = color; } private void FadeOut() { //IL_0007: 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_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) Color color = spriteRenderer1.color; color.a = Mathf.MoveTowards(color.a, 0f, Time.deltaTime * fadeOutSpeed); spriteRenderer1.color = color; spriteRenderer2.color = color; } private void MakeTransparent() { //IL_0007: 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_001f: 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) Color color = spriteRenderer1.color; color.a = 0f; spriteRenderer1.color = color; spriteRenderer2.color = color; } private void OnDisable() { AudioListener.volume = 1f; } } public class BloodlineEnd : MonoBehaviour { [Space(10f)] [Header("SetBloodline")] public GameObject parentObject; public List<PhysGrabObject> childrenList = new List<PhysGrabObject>(); public void hurtLightAllChildren() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) if (!SemiFunc.IsMasterClientOrSingleplayer()) { return; } foreach (PhysGrabObject children in childrenList) { if (!((Object)(object)children == (Object)null) && !((Object)(object)children.impactDetector == (Object)null)) { children.impactDetector.BreakLight(children.centerPoint, true); } } } public void hurtMediumAllChildren() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) if (!SemiFunc.IsMasterClientOrSingleplayer()) { return; } foreach (PhysGrabObject children in childrenList) { if (!((Object)(object)children == (Object)null) && !((Object)(object)children.impactDetector == (Object)null)) { children.impactDetector.BreakMedium(children.centerPoint, true); } } } public void killAllChildren() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) if (!SemiFunc.IsMasterClientOrSingleplayer()) { return; } foreach (PhysGrabObject children in childrenList) { if (!((Object)(object)children == (Object)null) && !((Object)(object)children.impactDetector == (Object)null)) { children.impactDetector.BreakHeavy(children.centerPoint, true, 0f); } } } } public class ValuableCanvas : MonoBehaviour { protected PhotonView photonView; [HideInInspector] public bool isLocal; public List<Texture2D> textureList = new List<Texture2D>(); public MeshRenderer meshRenderer; public Material sourceMaterial; private Texture2D texture; protected virtual void Start() { photonView = ((Component)this).GetComponent<PhotonView>(); if (GameManager.instance.gameMode == 0 || PhotonNetwork.IsMasterClient) { isLocal = true; } } protected virtual void Update() { if (isLocal && (Object)(object)texture == (Object)null && SemiFunc.IsMasterClientOrSingleplayer()) { int index = Random.Range(0, textureList.Count); ActivateTexture(index); } } public void ActivateTexture(int index) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) if (SemiFunc.IsMultiplayer()) { photonView.RPC("ActivateTextureRCP", (RpcTarget)0, new object[1] { index }); } else { ActivateTextureRCP(index); } } [PunRPC] public void ActivateTextureRCP(int index, PhotonMessageInfo _info = default(PhotonMessageInfo)) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown Material val = new Material(sourceMaterial); texture = textureList[index]; val.mainTexture = (Texture)(object)texture; ((Renderer)meshRenderer).material = val; } } public class ValuableDarkScreen : Trap { [Header("DarkScreenEffect")] public GameObject darkEffectObject; public int expression; private int playerCount; private List<PlayerAvatar> allPlayers; private List<bool> playerIsGrabbing = new List<bool>(); private SpriteScreenEffect darkScreenEffect; private Coroutine fadeCoroutine; protected void Awake() { ((Trap)this).Start(); GetValues(); } private void GetValues() { allPlayers = SemiFunc.PlayerGetList(); playerCount = allPlayers.Count; for (int i = 0; i < playerCount; i++) { playerIsGrabbing.Add(item: false); } } public override void Update() { ((Trap)this).Update(); CheckForLeftPlayers(); ClientEffectsLoop(); if (SemiFunc.IsMasterClientOrSingleplayer()) { CheckForListChange(); } foreach (PhysGrabber item in base.physGrabObject.playerGrabbing) { if (item.playerAvatar.voiceChatFetched) { item.playerAvatar.voiceChat.volumeOff.TransitionTo(0.1f); item.playerAvatar.voiceChat.OverrideNoTalkAnimation(0.1f); item.playerAvatar.voiceChat.OverrideMute(0.1f); } if (item.isLocal) { item.playerAvatar.playerExpression.OverrideExpressionSet(expression, 100f); PlayerExpressionsUI.instance.playerExpression.OverrideExpressionSet(expression, 100f); } } } public void ClientEffectsLoop() { for (int i = 0; i < playerCount; i++) { if (playerCount == 0) { break; } if (allPlayers[i].isLocal && playerIsGrabbing[i]) { ScreenDarkOn(); AudioListener.volume = 0f; } } } private void CheckForListChange() { if (!SemiFunc.FPSImpulse5()) { return; } for (int i = 0; i < playerCount; i++) { bool flag = base.physGrabObject.playerGrabbing.Contains(allPlayers[i].physGrabber); if (flag != playerIsGrabbing[i]) { PlayerStateChanged(flag, allPlayers[i].photonView.ViewID); } } } private void CheckForLeftPlayers() { if (playerCount != SemiFunc.PlayerGetList().Count) { RedoPlayersGrabbingList(); playerCount = SemiFunc.PlayerGetList().Count; allPlayers = SemiFunc.PlayerGetList(); } } private void ScreenDarkOn() { //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)darkScreenEffect) && Object.op_Implicit((Object)(object)PlayerAvatar.instance)) { darkScreenEffect = ((Component)((Component)PlayerAvatar.instance.localCamera).transform).GetComponentInChildren<SpriteScreenEffect>(); } if (!Object.op_Implicit((Object)(object)darkScreenEffect)) { for (int i = 0; i < playerCount; i++) { if (allPlayers[i].isLocal && playerIsGrabbing[i]) { Transform transform = ((Component)allPlayers[i].localCamera).transform; GameObject val = Object.Instantiate<GameObject>(darkEffectObject, ((Component)this).transform.position, Quaternion.identity, transform); val.transform.localPosition = Vector3.zero; val.transform.localRotation = Quaternion.identity; darkScreenEffect = val.GetComponent<SpriteScreenEffect>(); break; } } } if (Object.op_Implicit((Object)(object)darkScreenEffect)) { darkScreenEffect.Active(); } } public void PlayerStateChanged(bool _state, int _playerID) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) if (SemiFunc.IsMasterClientOrSingleplayer()) { if (SemiFunc.IsMultiplayer()) { base.photonView.RPC("PlayerStateChangedRPC", (RpcTarget)0, new object[2] { _state, _playerID }); } else { PlayerStateChangedRPC(_state, _playerID); } } } [PunRPC] public void PlayerStateChangedRPC(bool _state, int _playerID, PhotonMessageInfo _info = default(PhotonMessageInfo)) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) if (!SemiFunc.MasterOnlyRPC(_info)) { return; } for (int i = 0; i < playerCount; i++) { if (allPlayers[i].photonView.ViewID == _playerID) { playerIsGrabbing[i] = _state; break; } } } private void RedoPlayersGrabbingList() { for (int i = 0; i < playerCount; i++) { playerIsGrabbing[i] = false; } } private void OnDisable() { AudioListener.volume = 1f; } } public class ValuableNeru : Trap { [Header("Sounds")] public Sound soundBoomboxMusic; public override void Update() { ((Trap)this).Update(); if (!base.trapTriggered && base.physGrabObject.grabbed) { base.trapStart = true; } if (base.physGrabObject.grabbed) { soundBoomboxMusic.PlayLoop(true, 2f, 2f, 1f); base.enemyInvestigate = true; } else { soundBoomboxMusic.PlayLoop(false, 2f, 2f, 1f); } if (base.physGrabObject.grabbed) { } } } public class ValuableTerminal : Trap { protected PhotonView photonView; [Header("CameraScreenEffect")] public GameObject cameraEffectObject; private static CameraScreenEffect cameraScreenEffect; public MeshRenderer terminalRenderer; public Camera camera1; public Camera camera2; public MeshRenderer cameraRenderer1; public MeshRenderer cameraRenderer2; public int resolutionWidth = 256; public float aspectRatio = 0.75f; public Material originalMaterial; private Material monitorMaterial1; private Material monitorMaterial2; private int currentPreview = 1; private static ValuableTerminal activeTerminalForLocalPlayer; private int playerCount; private List<PlayerAvatar> allPlayers; private List<bool> playerIsGrabbing = new List<bool>(); private bool wasHoldingLastFrame = false; private RenderTexture renderTexture1; private RenderTexture renderTexture2; private bool isInteractingWithThing; public PhysGrabObjectGrabArea physGrabObjectGrabArea; protected void Awake() { ((Trap)this).Start(); setThings(); GetValues(); photonView = ((Component)this).GetComponent<PhotonView>(); } private void GetValues() { allPlayers = SemiFunc.PlayerGetList(); playerCount = allPlayers.Count; for (int i = 0; i < playerCount; i++) { playerIsGrabbing.Add(item: false); } } public override void Update() { ((Trap)this).Update(); ClientEffectsLoop(); } public void ClientEffectsLoop() { if ((Object)(object)activeTerminalForLocalPlayer == (Object)(object)this) { ScreenCameraOn(); } } public void OnConsoleGrabbed() { if (!SemiFunc.IsMasterClientOrSingleplayer()) { return; } PlayerAvatar latestGrabber = physGrabObjectGrabArea.GetLatestGrabber(); if ((Object)(object)latestGrabber != (Object)null) { int viewID = latestGrabber.photonView.ViewID; if (SemiFunc.IsMultiplayer()) { photonView.RPC("RPC_ActivateTerminalForPlayer", (RpcTarget)0, new object[1] { viewID }); } else { RPC_ActivateTerminalForPlayer(viewID); } } } [PunRPC] public void RPC_ActivateTerminalForPlayer(int _playerID) { if ((Object)(object)PlayerAvatar.instance != (Object)null && PlayerAvatar.instance.photonView.ViewID == _playerID) { GrabConsole(); } } public void GrabConsole() { if ((Object)(object)activeTerminalForLocalPlayer == (Object)null) { activeTerminalForLocalPlayer = this; } else { activeTerminalForLocalPlayer = null; } } public void GrabThing() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) isInteractingWithThing = true; if (GameManager.instance.gameMode == 0) { GrabThingRPC(); } else if (PhotonNetwork.IsMasterClient) { photonView.RPC("GrabThingRPC", (RpcTarget)0, Array.Empty<object>()); } ((MonoBehaviour)this).Invoke("resetInteraction", 0.5f); } public void resetInteraction() { isInteractingWithThing = false; } [PunRPC] public void GrabThingRPC(PhotonMessageInfo _info = default(PhotonMessageInfo)) { if (currentPreview == 1) { ((Renderer)terminalRenderer).material = monitorMaterial2; currentPreview = 2; } else { ((Renderer)terminalRenderer).material = monitorMaterial1; currentPreview = 1; } } private void ScreenCameraOn() { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)cameraScreenEffect) && Object.op_Implicit((Object)(object)PlayerAvatar.instance)) { cameraScreenEffect = ((Component)((Component)PlayerAvatar.instance.localCamera).transform).GetComponentInChildren<CameraScreenEffect>(); } if (!Object.op_Implicit((Object)(object)cameraScreenEffect)) { Transform transform = ((Component)PlayerAvatar.instance.localCamera).transform; GameObject val = Object.Instantiate<GameObject>(cameraEffectObject, ((Component)this).transform.position, Quaternion.identity, transform); val.transform.localPosition = Vector3.zero; val.transform.localRotation = Quaternion.identity; cameraScreenEffect = val.GetComponent<CameraScreenEffect>(); cameraScreenEffect.materialList[0] = monitorMaterial1; cameraScreenEffect.materialList[1] = monitorMaterial2; } if (Object.op_Implicit((Object)(object)cameraScreenEffect)) { cameraScreenEffect.Active(); } } private void setThings() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Expected O, but got Unknown renderTexture1 = new RenderTexture(resolutionWidth, (int)Math.Round((float)resolutionWidth * aspectRatio), 16); renderTexture2 = new RenderTexture(resolutionWidth, (int)Math.Round((float)resolutionWidth * aspectRatio), 16); renderTexture1.Create(); renderTexture2.Create(); camera1.targetTexture = renderTexture1; camera2.targetTexture = renderTexture2; monitorMaterial1 = new Material(originalMaterial); monitorMaterial2 = new Material(originalMaterial); monitorMaterial1.mainTexture = (Texture)(object)renderTexture1; monitorMaterial2.mainTexture = (Texture)(object)renderTexture2; ((Renderer)cameraRenderer1).material = monitorMaterial1; ((Renderer)cameraRenderer2).material = monitorMaterial2; ((Renderer)terminalRenderer).material = monitorMaterial1; } } namespace PearTeto { public class PearTeto : Trap { public Sound pearSound; public List<AudioClip> pearSoundsClips; public void StartVoiceLine() { if (SemiFunc.IsMasterClientOrSingleplayer()) { PlayLine(Random.Range(0, pearSoundsClips.Count)); } } private void PlayLine(int index) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) EnemyDirector.instance.SetInvestigate(((Component)this).transform.position, 15f, false); if (SemiFunc.IsMultiplayer()) { base.photonView.RPC("PlayLinePearRPC", (RpcTarget)0, new object[1] { index }); } else { PlayLinePearRPC(index); } } [PunRPC] private void PlayLinePearRPC(int index, PhotonMessageInfo _info = default(PhotonMessageInfo)) { //IL_0001: 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) if (SemiFunc.MasterOnlyRPC(_info)) { AudioClip val = pearSoundsClips[index]; AudioClip[] sounds = (AudioClip[])(object)new AudioClip[1] { val }; pearSound.Sounds = sounds; pearSound.Play(base.physGrabObject.centerPoint, 1f, 1f, 1f, 1f); } } } } namespace ValuableFusionBase { public class ValuableFusionBase : MonoBehaviour { protected PhotonView photonView; [HideInInspector] public bool isLocal; private float value; private GameObject valuable; private int index; private float rigidBodyMass; private Rigidbody rb; internal PhysGrabObject physGrabObject; [Space(20f)] public ValuableObject valuableObject; public PhysGrabObjectImpactDetector impactDetector; [Space(20f)] public List<GameObject> commonList = new List<GameObject>(); public List<GameObject> rareList = new List<GameObject>(); public float rarity = 10f; [Space(10f)] [Header("Common")] public Durability durabilityCommon; public Value valueCommon; public PhysAttribute physAttributeCommon; public PhysAudio physAudioCommon; [Range(0.5f, 3f)] public float audioPresetPitchCommon = 1f; public Gradient particleCommon; [Header("Rare")] [Space(10f)] public Durability durabilityRare; public Value valueRare; public PhysAttribute physAttributeRare; public PhysAudio physAudioRare; [Range(0.5f, 3f)] public float audioPresetPitchRare = 1f; public Gradient particleRare; protected virtual void Start() { photonView = ((Component)this).GetComponent<PhotonView>(); if (GameManager.instance.gameMode == 0 || PhotonNetwork.IsMasterClient) { isLocal = true; } } protected virtual void Update() { if (isLocal && (Object)(object)valuable == (Object)null) { ActivateRandom(); } } public void DeactivateAll() { foreach (GameObject common in commonList) { common.SetActive(false); } foreach (GameObject rare in rareList) { rare.SetActive(false); } } public void ActivateRandom() { if (SemiFunc.IsMasterClientOrSingleplayer()) { float num = Random.Range(0, 100); if (num < rarity) { index = Random.Range(0, rareList.Count); ActivatePreset(index, isRare: true); } else { index = Random.Range(0, commonList.Count); ActivatePreset(index, isRare: false); } } } public void ActivatePreset(int index, bool isRare) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) if (SemiFunc.IsMultiplayer()) { photonView.RPC("ActivatePresetRCP", (RpcTarget)0, new object[2] { index, isRare }); } else { ActivatePresetRCP(index, isRare); } } [PunRPC] public void ActivatePresetRCP(int index, bool isRare, PhotonMessageInfo _info = default(PhotonMessageInfo)) { DeactivateAll(); if (isRare) { valuable = rareList[index]; valuableObject.durabilityPreset = durabilityRare; valuableObject.valuePreset = valueRare; valuableObject.physAttributePreset = physAttributeRare; valuableObject.audioPreset = physAudioRare; valuableObject.audioPresetPitch = audioPresetPitchRare; valuableObject.particleColors = particleRare; rigidBodyMass = physAttributeRare.mass; value = Mathf.Round(valueRare.valueMax); valuableObject.dollarValueCurrent = value; } else { valuable = commonList[index]; valuableObject.durabilityPreset = durabilityCommon; valuableObject.valuePreset = valueCommon; valuableObject.physAttributePreset = physAttributeCommon; valuableObject.audioPreset = physAudioCommon; valuableObject.audioPresetPitch = audioPresetPitchCommon; valuableObject.particleColors = particleCommon; rigidBodyMass = physAttributeCommon.mass; } impactDetector.fragility = valuableObject.durabilityPreset.fragility; impactDetector.durability = valuableObject.durabilityPreset.durability; impactDetector.impactAudio = valuableObject.audioPreset; impactDetector.impactAudioPitch = valuableObject.audioPresetPitch; physGrabObject = ((Component)this).GetComponent<PhysGrabObject>(); rb = ((Component)this).GetComponent<Rigidbody>(); if (Object.op_Implicit((Object)(object)rb)) { rb.mass = rigidBodyMass; } physGrabObject.massOriginal = rigidBodyMass; valuable.SetActive(true); } } } namespace CameraSet { public class CameraSet : MonoBehaviour { public Camera camera; public MeshRenderer monitorRenderer; public MeshRenderer previewRenderer; public int resolution = 512; public Material originalMaterial; private void setThings() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown RenderTexture val = new RenderTexture(resolution, resolution, 16); val.Create(); camera.targetTexture = val; Material val2 = new Material(originalMaterial); val2.mainTexture = (Texture)(object)val; ((Renderer)monitorRenderer).material = val2; ((Renderer)previewRenderer).material = val2; } private void Start() { setThings(); } private void OnDestroy() { if ((Object)(object)camera != (Object)null && (Object)(object)camera.targetTexture != (Object)null) { camera.targetTexture.Release(); } } } } namespace ValuableBigMiku { public class ValuableBigMiku : MonoBehaviour { public Transform targetObject; public float multiplierLight = 0.98f; public float multiplierMedium = 0.95f; public float multiplierHeavy = 0.9f; private void Start() { if ((Object)(object)targetObject == (Object)null) { targetObject = ((Component)this).transform.Find("Object"); } if (!((Object)(object)targetObject == (Object)null)) { } } public void ApplyScaleLight() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)targetObject == (Object)null)) { Transform obj = targetObject; obj.localScale *= multiplierLight; } } public void ApplyScaleMedium() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)targetObject == (Object)null)) { Transform obj = targetObject; obj.localScale *= multiplierMedium; } } public void ApplyScaleHeavy() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)targetObject == (Object)null)) { Transform obj = targetObject; obj.localScale *= multiplierHeavy; } } } } namespace NemesisPlushiesMod { [HarmonyPatch(typeof(PlayerController))] internal static class ExamplePlayerControllerPatch { [HarmonyPatch("Start")] [HarmonyPrefix] private static void Start_Prefix(PlayerController __instance) { NemesisPlushiesMod.Logger.LogDebug((object)$"{__instance} Start Prefix"); } [HarmonyPatch("Start")] [HarmonyPostfix] private static void Start_Postfix(PlayerController __instance) { NemesisPlushiesMod.Logger.LogDebug((object)$"{__instance} Start Postfix"); } } [BepInPlugin("nemeshisu.NemesisPlushiesMod", "NemesisPlushiesMod", "1.0")] public class NemesisPlushiesMod : BaseUnityPlugin { internal static NemesisPlushiesMod Instance { get; private set; } internal static ManualLogSource Logger => Instance._logger; private ManualLogSource _logger => ((BaseUnityPlugin)this).Logger; internal Harmony? Harmony { get; set; } private void Awake() { Instance = this; ((Component)this).gameObject.transform.parent = null; ((Object)((Component)this).gameObject).hideFlags = (HideFlags)61; Patch(); Logger.LogInfo((object)$"{((BaseUnityPlugin)this).Info.Metadata.GUID} v{((BaseUnityPlugin)this).Info.Metadata.Version} has loaded!"); } internal void Patch() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0026: Expected O, but got Unknown if (Harmony == null) { Harmony val = new Harmony(((BaseUnityPlugin)this).Info.Metadata.GUID); Harmony val2 = val; Harmony = val; } Harmony.PatchAll(); } internal void Unpatch() { Harmony? harmony = Harmony; if (harmony != null) { harmony.UnpatchSelf(); } } private void Update() { } } }