using 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 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.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
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
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;
}
}
[Microsoft.CodeAnalysis.Embedded]
[CompilerGenerated]
[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;
}
}
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
[Microsoft.CodeAnalysis.Embedded]
[CompilerGenerated]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace ValuableFusionBase
{
[BepInPlugin("nemeshisu.ValuableFusionBase", "ValuableFusionBase", "1.0")]
public class ValuableFusionBase : BaseUnityPlugin
{
private float value;
private GameObject valuable;
private float rigidBodyMass;
private Rigidbody rb;
internal PhysGrabObject physGrabObject;
[Space(20f)]
public ValuableObject valuableObject;
public PhysGrabObjectImpactDetector impactDetector;
public GameObject rareLight;
[Space(20f)]
public List<GameObject> commonList = new List<GameObject>();
public List<GameObject> rareList = new List<GameObject>();
public float rarity = 10f;
[Header("Common")]
[Space(10f)]
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;
internal static ValuableFusionBase 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();
}
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 Start()
{
valuable = commonList[0];
DeactivateAll();
rareLight.SetActive(false);
if (commonList.Count != 1 || rareList.Count != 0)
{
if (rareList.Count == 0)
{
ActivatePreset(commonList, durabilityCommon, valueCommon, physAttributeCommon, physAudioCommon, audioPresetPitchCommon, particleCommon);
rareLight.SetActive(false);
}
else if (commonList.Count == 0)
{
ActivatePreset(rareList, durabilityRare, valueRare, physAttributeRare, physAudioRare, audioPresetPitchRare, particleRare);
valuableObject.dollarValueCurrent = value;
rareLight.SetActive(true);
}
else
{
ActivateRandom();
}
}
}
public void DeactivateAll()
{
foreach (GameObject common in commonList)
{
common.SetActive(false);
}
foreach (GameObject rare in rareList)
{
rare.SetActive(false);
}
}
public void ActivateRandom()
{
float num = Random.Range(0, 100);
if (num < rarity)
{
ActivatePreset(rareList, durabilityRare, valueRare, physAttributeRare, physAudioRare, audioPresetPitchRare, particleRare);
valuableObject.dollarValueCurrent = value;
rareLight.SetActive(true);
}
else
{
ActivatePreset(commonList, durabilityCommon, valueCommon, physAttributeCommon, physAudioCommon, audioPresetPitchCommon, particleCommon);
rareLight.SetActive(false);
}
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);
}
public void ActivatePreset(List<GameObject> objectList, Durability durabilityPreset, Value valuePreset, PhysAttribute physAttributePreset, PhysAudio physAudioPreset, float audioPitch, Gradient particleColors)
{
if (objectList.Count > 1)
{
int index = Random.Range(0, objectList.Count);
valuable = objectList[index];
}
else
{
valuable = objectList[0];
}
valuableObject.durabilityPreset = durabilityPreset;
valuableObject.valuePreset = valuePreset;
valuableObject.physAttributePreset = physAttributePreset;
valuableObject.audioPreset = physAudioPreset;
valuableObject.audioPresetPitch = audioPitch;
valuableObject.particleColors = particleColors;
impactDetector.fragility = valuableObject.durabilityPreset.fragility;
impactDetector.durability = valuableObject.durabilityPreset.durability;
impactDetector.impactAudio = valuableObject.audioPreset;
impactDetector.impactAudioPitch = valuableObject.audioPresetPitch;
rigidBodyMass = physAttributePreset.mass;
value = Mathf.Round(valuePreset.valueMax);
value = Mathf.Round(value / 100f) * 100f;
}
}
}
namespace ValuableBigMiku
{
[BepInPlugin("nemeshisu.ValuableBigMiku", "ValuableBigMiku", "1.0")]
public class ValuableBigMiku : BaseUnityPlugin
{
public Transform targetObject;
public float multiplierLight = 0.98f;
public float multiplierMedium = 0.95f;
public float multiplierHeavy = 0.9f;
internal static ValuableBigMiku 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();
}
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 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
{
[HarmonyPrefix]
[HarmonyPatch("Start")]
private static void Start_Prefix(PlayerController __instance)
{
NemesisPlushiesMod.Logger.LogDebug((object)$"{__instance} Start Prefix");
}
[HarmonyPostfix]
[HarmonyPatch("Start")]
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()
{
}
}
}