The BepInEx console will not appear when launching like it does for other games on Thunderstore (you can turn it back on in your BepInEx.cfg file). If your PEAK crashes on startup, add -dx12 to your launch parameters.
Decompiled source of PEAKLib Items v1.4.1
plugins/com.github.PEAKModding.PEAKLib.Items.dll
Decompiled a week agousing System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Cryptography; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Logging; using Microsoft.CodeAnalysis; using MonoDetour; using MonoDetour.Cil; using MonoDetour.DetourTypes; using MonoDetour.HookGen; using MonoDetour.Reflection.Unspeakable; using MonoMod.Utils; using Newtonsoft.Json; using On.DataEntryValue; using On.GUIManager; using On.Interaction; using On.Item; using On.ItemDatabase; using PEAKLib.Core; using Photon.Pun; using TMPro; using UnityEngine; using Zorro.Core; using Zorro.Core.Serizalization; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("PEAKModding, Hamunii, quackandcheese, chaendizzle")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyDescription("Items module of the PEAKLib community API for the game PEAK.")] [assembly: AssemblyFileVersion("1.4.1.0")] [assembly: AssemblyInformationalVersion("1.4.1+b91c85dddeec7cc0f007caa510d0d6a3cb8adec2")] [assembly: AssemblyProduct("com.github.PEAKModding.PEAKLib.Items")] [assembly: AssemblyTitle("PEAKLib.Items")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.4.1.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.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; } } [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; } } } namespace On.Item { internal static class CanUseSecondary { public delegate void PrefixSignature(Item self); public delegate void PostfixSignature(Item self, ref bool returnValue); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(Item); MethodInfo method = typeFromHandle.GetMethod("CanUseSecondary", (BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)method == null) { throw new MissingMethodException("Item", "CanUseSecondary"); } return method; } } internal static class StartUseSecondary { public delegate void PrefixSignature(Item self); public delegate void PostfixSignature(Item self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(Item); MethodInfo method = typeFromHandle.GetMethod("StartUseSecondary", (BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)method == null) { throw new MissingMethodException("Item", "StartUseSecondary"); } return method; } } internal static class FinishCastSecondary { public delegate void PrefixSignature(Item self); public delegate void PostfixSignature(Item self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(Item); MethodInfo method = typeFromHandle.GetMethod("FinishCastSecondary", (BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)method == null) { throw new MissingMethodException("Item", "FinishCastSecondary"); } return method; } } internal static class RemoveFeedDataRPC { public delegate void PrefixSignature(Item self, ref int giverID); public delegate void PostfixSignature(Item self, ref int giverID); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(Item); MethodInfo method = typeFromHandle.GetMethod("RemoveFeedDataRPC", (BindingFlags)(-1), null, new Type[1] { typeof(int) }, null); if ((object)method == null) { throw new MissingMethodException("Item", "RemoveFeedDataRPC"); } return method; } } internal static class ConsumeDelayed { public delegate void PrefixSignature(Item self, ref bool ignoreActions); public delegate void PostfixSignature(Item self, ref bool ignoreActions, ref IEnumerator returnValue); public delegate void PrefixMoveNextSignature(SpeakableEnumerator<object, Item> self); public delegate void PostfixMoveNextSignature(SpeakableEnumerator<object, Item> self, ref bool continueEnumeration); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MonoDetourHook PrefixMoveNext(PrefixMoveNextSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>((MethodBase)StateMachineTarget(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook PostfixMoveNext(PostfixMoveNextSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>((MethodBase)StateMachineTarget(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHookMoveNext(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook((MethodBase)StateMachineTarget(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(Item); MethodInfo method = typeFromHandle.GetMethod("ConsumeDelayed", (BindingFlags)(-1), null, new Type[1] { typeof(bool) }, null); if ((object)method == null) { throw new MissingMethodException("Item", "ConsumeDelayed"); } return method; } public static MethodInfo StateMachineTarget() { return Extensions.GetStateMachineTarget((MethodInfo)Target()); } } internal static class GetName { public delegate void PrefixSignature(Item self); public delegate void PostfixSignature(Item self, ref string returnValue); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(Item); MethodInfo method = typeFromHandle.GetMethod("GetName", (BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)method == null) { throw new MissingMethodException("Item", "GetName"); } return method; } } internal static class get_itemState { } internal static class set_itemState { } internal static class get_CarryWeight { } internal static class get_isUsingPrimary { } internal static class set_isUsingPrimary { } internal static class get_cooking { } internal static class set_cooking { } internal static class Awake { } internal static class Start { } internal static class GetItemName { } internal static class AddPropertyBlock { } internal static class GetItemActions { } internal static class AddPhysics { } internal static class Update { } internal static class UpdateCollisionDetectionMode { } internal static class Interact { } internal static class DenyPickupRPC { } internal static class RequestPickup { } internal static class Center { } internal static class GetTransform { } internal static class GetInteractionText { } internal static class IsInteractible { } internal static class Move { } internal static class get_holderCharacter { } internal static class set_holderCharacter { } internal static class get_trueHolderCharacter { } internal static class SetColliders { } internal static class SetState { } internal static class HideRenderers { } internal static class get_isUsingSecondary { } internal static class set_isUsingSecondary { } internal static class get_castProgress { } internal static class set_castProgress { } internal static class get_progress { } internal static class get_shouldShowCastProgress { } internal static class CanUsePrimary { } internal static class StartUsePrimary { } internal static class ContinueUsePrimary { } internal static class FinishCastPrimary { } internal static class CancelUsePrimary { } internal static class ScrollButtonLeft { } internal static class ScrollButtonRight { } internal static class Scroll { } internal static class SendFeedDataRPC { } internal static class get_totalSecondaryUsingTime { } internal static class ContinueUseSecondary { } internal static class CancelUseSecondary { } internal static class get_consuming { } internal static class set_consuming { } internal static class Consume { } internal static class OnStash { } internal static class AddDefaultFoodScripts { } internal static class HoverEnter { } internal static class HoverExit { } internal static class SetKinematicNetworked_System_Boolean { } internal static class SetKinematicNetworked_System_Boolean_UnityEngine_Vector3_UnityEngine_Quaternion { } internal static class SetKinematicAndResetSyncData { } internal static class SetKinematicRPC { } internal static class HasData { } internal static class ForceSyncForFrames { } internal static class SetItemInstanceDataRPC { } internal static class OnInstanceDataRecieved { } internal static class OnPlayerEnteredRoom { } internal static class PutInBackpackRPC { } internal static class SetCookedAmountRPC { } internal static class SetUseRemainingPercentage { } internal static class get_inActiveList { } internal static class set_inActiveList { } internal static class WasActive { } internal static class UpdateEntryInActiveList { } internal static class RemoveFromActiveList { } internal static class OnDestroy { } internal static class TryGetFeeder { } internal static class IsValidToSpawn { } internal static class AddNameToCSV { } internal static class AddPromptToCSV { } internal static class _ctor { } internal static class _cctor { } internal static class ItemTags { internal static class _ctor { } } internal static class ItemUIData { internal static class _ctor { } } internal static class __c { internal static class _ctor { } } internal static class _ConsumeDelayed_d__130 { internal static class _ctor { } internal static class System_IDisposable_Dispose { } internal static class MoveNext { } internal static class System_Collections_Generic_IEnumerator_System_Object__get_Current { } internal static class System_Collections_IEnumerator_Reset { } internal static class System_Collections_IEnumerator_get_Current { } } } namespace On.Interaction { internal static class LateUpdate { public delegate void PrefixSignature(Interaction self); public delegate void PostfixSignature(Interaction self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(Interaction); MethodInfo method = typeFromHandle.GetMethod("LateUpdate", (BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)method == null) { throw new MissingMethodException("Interaction", "LateUpdate"); } return method; } } internal static class get_currentInteractableHeldTime { } internal static class set_currentInteractableHeldTime { } internal static class get_constantInteractableProgress { } internal static class Awake { } internal static class get_hasValidTargetCharacter { } internal static class DoInteraction { } internal static class DoInteractableRaycasts { } internal static class CancelHeldInteract { } internal static class _ctor { } } namespace On.GUIManager { internal static class RefreshInteractablePrompt { public delegate void PrefixSignature(GUIManager self); public delegate void PostfixSignature(GUIManager self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(GUIManager); MethodInfo method = typeFromHandle.GetMethod("RefreshInteractablePrompt", (BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)method == null) { throw new MissingMethodException("GUIManager", "RefreshInteractablePrompt"); } return method; } } } namespace On.ItemDatabase { internal static class OnLoaded { public delegate void PrefixSignature(ItemDatabase self); public delegate void PostfixSignature(ItemDatabase self); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(ItemDatabase); MethodInfo method = typeFromHandle.GetMethod("OnLoaded", (BindingFlags)(-1), null, Array.Empty<Type>(), null); if ((object)method == null) { throw new MissingMethodException("ItemDatabase", "OnLoaded"); } return method; } } internal static class LoadItems { } internal static class ReloadAllItems { } internal static class GetAvailableID { } internal static class ItemExistsInDatabase { } internal static class Add_Item { } internal static class Add_Item_UnityEngine_Vector3 { } internal static class TryGetItem { } internal static class AddAllNamesToCSV { } internal static class AddAllPromptsToCSV { } internal static class _ctor { } } namespace On.DataEntryValue { internal static class GetTypeValue { public delegate void PrefixSignature(ref Type type); public delegate ReturnFlow ControlFlowPrefixSignature(ref Type type, ref byte returnValue); public delegate void PostfixSignature(ref Type type, ref byte returnValue); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ControlFlowPrefix(ControlFlowPrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(DataEntryValue); MethodInfo method = typeFromHandle.GetMethod("GetTypeValue", (BindingFlags)(-1), null, new Type[1] { typeof(Type) }, null); if ((object)method == null) { throw new MissingMethodException("DataEntryValue", "GetTypeValue"); } return method; } } internal static class GetNewFromValue { public delegate void PrefixSignature(ref byte value); public delegate ReturnFlow ControlFlowPrefixSignature(ref byte value, ref DataEntryValue returnValue); public delegate void PostfixSignature(ref byte value, ref DataEntryValue returnValue); public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ControlFlowPrefix(ControlFlowPrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (MethodBase)hook.Method, config, applyByDefault); } public static MonoDetourHook ILHook(Manipulator manipulator, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null) { return (manager ?? DefaultMonoDetourManager.Instance).ILHook(Target(), manipulator, config, applyByDefault); } public static MethodBase Target() { Type typeFromHandle = typeof(DataEntryValue); MethodInfo method = typeFromHandle.GetMethod("GetNewFromValue", (BindingFlags)(-1), null, new Type[1] { typeof(byte) }, null); if ((object)method == null) { throw new MissingMethodException("DataEntryValue", "GetNewFromValue"); } return method; } } internal static class Serialize { } internal static class Deserialize { } internal static class Init { } internal static class _ctor { } } namespace MonoDetour.HookGen { internal static class DefaultMonoDetourManager { internal static MonoDetourManager Instance { get; } = New(); internal static MonoDetourManager New() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown return new MonoDetourManager(typeof(DefaultMonoDetourManager).Assembly.GetName().Name); } } [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class, AllowMultiple = true, Inherited = false)] internal class MonoDetourTargetsAttribute : Attribute, IMonoDetourTargets { public Type? TargetType { get; } public bool IncludeNestedTypes { get; set; } public bool DistinguishOverloadsByName { get; set; } public string[]? Members { get; set; } public string[]? MemberNamePrefixes { get; set; } public string[]? MemberNameSuffixes { get; set; } public bool GenerateControlFlowVariants { get; set; } public MonoDetourTargetsAttribute(Type? targetType = null) { TargetType = targetType; IncludeNestedTypes = true; base..ctor(); } } } namespace BepInEx { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] internal sealed class BepInAutoPluginAttribute : Attribute { public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace BepInEx.Preloader.Core.Patching { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] internal sealed class PatcherAutoPluginAttribute : Attribute { public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace PEAKLib.Items { public static class CustomItemData { internal const DataEntryKey PeakLibModDataKey = 42; public static bool TryGetModItemDataFromJson<T>(this ItemComponent item, ModDefinition mod, [MaybeNullWhen(false)] out T data) { data = default(T); if (!item.TryGetRawModItemData(mod, out byte[] rawData)) { return false; } data = JsonConvert.DeserializeObject<T>(Encoding.UTF8.GetString(rawData)); return data != null; } public static bool TryGetRawModItemData(this ItemComponent item, ModDefinition mod, [NotNullWhen(true)] out byte[]? rawData) { ThrowHelper.ThrowIfArgumentNull<ItemComponent>(item, "item"); ThrowHelper.ThrowIfArgumentNull<ModDefinition>(mod, "mod"); ModItemData data = item.GetData<ModItemData>((DataEntryKey)42); return data.Value.TryGetValue(((object)mod).GetHashCode(), out rawData); } public static void SetModItemDataFromJson(this ItemComponent item, ModDefinition mod, object? data) { item.SetRawModItemData(mod, Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(data))); } public static void SetRawModItemData(this ItemComponent item, ModDefinition mod, byte[] rawData) { ThrowHelper.ThrowIfArgumentNull<ItemComponent>(item, "item"); ThrowHelper.ThrowIfArgumentNull<ModDefinition>(mod, "mod"); ModItemData data = item.GetData<ModItemData>((DataEntryKey)42); data.Value[((object)mod).GetHashCode()] = rawData; } } public interface IItemContent : IContent { Item Item { get; } } public class ItemContent : IContent<ItemContent>, IContent, IItemContent { [CompilerGenerated] private Item <item>P; internal static List<RegisteredContent<ItemContent>> s_RegisteredItems = new List<RegisteredContent<ItemContent>>(); public string Name => ((Object)Item).name; public Item Item { get; } public ItemContent(Item item) { <item>P = item; Item = ThrowHelper.ThrowIfArgumentNull<Item>(<item>P, "item"); base..ctor(); } public RegisteredContent<ItemContent> Register(ModDefinition owner) { RegisteredContent<ItemContent> val = ContentRegistry.Register<ItemContent>(this, owner); ModItemComponent component = ((Component)<item>P).GetComponent<ModItemComponent>(); if ((Object)(object)component != (Object)null) { component.InitializeModItem(owner); } NetworkPrefabManager.RegisterNetworkPrefab(owner, "0_Items/", ((Component)<item>P).gameObject); s_RegisteredItems.Add(val); ItemRegistrar.RegisterIfTooLate(val); return val; } IRegisteredContent IContent.Register(ModDefinition owner) { return (IRegisteredContent)(object)Register(owner); } public IContent Resolve() { return (IContent)(object)this; } } internal static class ItemRegistrar { internal static ItemDatabase? ItemDatabaseLoaded; private static Dictionary<string, Shader> _peakShaders; internal static Dictionary<string, Shader> PeakShaders { get { if (_peakShaders == null) { List<string> list = new List<string> { "W/Peak_Standard", "W/Character", "W/Peak_Transparent", "W/Peak_Glass", "W/Peak_Clip", "W/Peak_glass_liquid", "W/Peak_GroundTransition", "W/Peak_Guidebook", "W/Peak_Honey", "W/Peak_Ice", "W/Peak_Rock", "W/Peak_Rope", "W/Peak_Splash", "W/Peak_Waterfall", "W/Vine" }; _peakShaders = new Dictionary<string, Shader>(); foreach (string item in list) { Shader val = Shader.Find(item); if ((Object)(object)val == (Object)null) { ItemsPlugin.Log.LogWarning((object)("PeakShaders: Shader " + item + " was not found.")); } else { _peakShaders[item] = val; } } } return _peakShaders; } } internal static void RegisterIfTooLate(RegisteredContent<ItemContent> registeredItem) { if ((Object)(object)ItemDatabaseLoaded != (Object)null) { FinishRegisterItem(ItemDatabaseLoaded, registeredItem); } } internal static void FinishRegisterItem(ItemDatabase self, RegisteredContent<ItemContent> registeredItem) { Item item = registeredItem.Content.Item; byte[] value = MD5.Create().ComputeHash(Encoding.UTF8.GetBytes(registeredItem.Mod.Id + ((Object)item).name)); item.itemID = BitConverter.ToUInt16(value, 0); if (self.itemLookup.ContainsKey(item.itemID)) { string arg = registeredItem.Mod.Id + ":" + ((Object)item).name; ItemsPlugin.Log.LogWarning((object)string.Format("{0}: Collision on hash itemID '{1}' for '{2}'", "FinishRegisterItem", item.itemID, arg)); if (!TryResolveCollision(self, ref item.itemID)) { ItemsPlugin.Log.LogError((object)string.Format("{0}: Could not resolve collision on itemID '{1}' for '{2}'", "FinishRegisterItem", item.itemID, arg)); return; } ItemsPlugin.Log.LogWarning((object)string.Format("{0}: itemID changed to '{1}' for '{2}'", "FinishRegisterItem", item.itemID, arg)); } Renderer[] componentsInChildren = ((Component)item).GetComponentsInChildren<Renderer>(); foreach (Renderer val in componentsInChildren) { Material[] materials = val.materials; foreach (Material val2 in materials) { if (PeakShaders.TryGetValue(((Object)val2.shader).name, out Shader value2)) { val2.shader = value2; } } } ((Renderer)((Component)((Component)item).gameObject.GetComponentInChildren<ParticleSystem>()).GetComponent<ParticleSystemRenderer>()).material = Resources.FindObjectsOfTypeAll<Material>().ToList().Find((Material x) => ((Object)x).name == "Smoke"); ((DatabaseAsset<ItemDatabase, Item>)(object)self).Objects.Add(item); self.itemLookup.Add(item.itemID, item); } private static bool TryResolveCollision(ItemDatabase self, ref ushort id) { for (ushort num = (ushort)(id + 1); num != id; num++) { if (!self.itemLookup.ContainsKey(num)) { id = num; return true; } } return false; } } public abstract class ModItemComponent : ItemComponent { private ModDefinition? _mod; [HideInInspector] [SerializeField] private string _modId; public ModDefinition Mod { get { if (_mod != null) { return _mod; } if (!ModDefinition.TryGetMod(_modId, ref _mod)) { throw new NullReferenceException("ModItemComponent's Mod property was null meaning it wasn't initialized by PEAKLib!"); } return _mod; } } internal void InitializeModItem(ModDefinition mod) { _modId = ThrowHelper.ThrowIfArgumentNull<ModDefinition>(mod, "mod").Id; } public bool TryGetModItemDataFromJson<T>([MaybeNullWhen(false)] out T data) { return ((ItemComponent)(object)this).TryGetModItemDataFromJson<T>(Mod, out data); } public bool TryGetRawModItemData([NotNullWhen(true)] out byte[]? rawData) { return ((ItemComponent)(object)this).TryGetRawModItemData(Mod, out rawData); } public void SetModItemDataFromJson(object? data) { ((ItemComponent)(object)this).SetModItemDataFromJson(Mod, data); } public void SetRawModItemData(byte[] rawData) { ((ItemComponent)(object)this).SetRawModItemData(Mod, rawData); } } internal class ModItemData : DataEntryValue { public Dictionary<int, byte[]> Value = new Dictionary<int, byte[]>(); public override void SerializeValue(BinarySerializer serializer) { serializer.WriteInt(Value.Count); foreach (KeyValuePair<int, byte[]> item in Value) { serializer.WriteInt(item.Key); serializer.WriteInt(item.Value.Length); serializer.WriteBytes(item.Value); } } public override void DeserializeValue(BinaryDeserializer deserializer) { int num = deserializer.ReadInt(); for (int i = 0; i < num; i++) { int key = deserializer.ReadInt(); int num2 = deserializer.ReadInt(); Value[key] = deserializer.ReadBytes(num2); } } public override string ToString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append($"ModItemData({Value.Count}) {{ "); foreach (KeyValuePair<int, byte[]> item in Value) { string arg = BitConverter.ToString(item.Value); stringBuilder.Append($"{item.Key}=[{arg}], "); } stringBuilder.Append("}"); return stringBuilder.ToString(); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.github.PEAKModding.PEAKLib.Items", "PEAKLib.Items", "1.4.1")] public class ItemsPlugin : BaseUnityPlugin { public const string Id = "com.github.PEAKModding.PEAKLib.Items"; internal static ManualLogSource Log { get; } = Logger.CreateLogSource(Name); public static string Name => "PEAKLib.Items"; public static string Version => "1.4.1"; private void Awake() { MonoDetourManager.InvokeHookInitializers(typeof(ItemsPlugin).Assembly); Log.LogInfo((object)("Plugin " + Name + " is loaded!")); } } } namespace PEAKLib.Items.UnityEditor { [CreateAssetMenu(fileName = "ItemContent", menuName = "PEAKLib/ItemContent", order = 1)] public class UnityItemContent : ScriptableObject, IItemContent, IContent { internal static readonly Dictionary<UnityItemContent, ItemContent> s_UnityToModItem = new Dictionary<UnityItemContent, ItemContent>(); public string Name { get { if ((Object)(object)ItemPrefab == (Object)null) { return ((Object)this).name; } Item component = ItemPrefab.GetComponent<Item>(); if ((Object)(object)component == (Object)null) { return ((Object)this).name; } return ((Object)component).name; } } public Item Item => Resolve().Item; [field: SerializeField] public GameObject ItemPrefab { get; private set; } public IRegisteredContent Register(ModDefinition owner) { return (IRegisteredContent)(object)Resolve().Register(owner); } public ItemContent Resolve() { if (s_UnityToModItem.TryGetValue(this, out ItemContent value)) { return value; } Item item = ThrowHelper.ThrowIfFieldNull<GameObject>(ItemPrefab, "ItemPrefab").GetComponent<Item>() ?? throw new NullReferenceException("Item component on ItemPrefab is null!"); value = new ItemContent(item); s_UnityToModItem.Add(this, value); return value; } IContent IContent.Resolve() { return (IContent)(object)Resolve(); } } } namespace PEAKLib.Items.ItemAcceptor { public interface IItemAcceptor { bool SecondaryInteractOnly { get; } void AcceptItem(Item item, Character interactor); bool AllowInteraction(); string GetPrompt(); static bool TryGetItemAcceptors(IInteractible? interactible, out IEnumerable<IItemAcceptor> itemAcceptors) { MonoBehaviour val = (MonoBehaviour)(object)((interactible is MonoBehaviour) ? interactible : null); if ((Object)(object)val != (Object)null) { itemAcceptors = from x in ((Component)val).GetComponents<IItemAcceptor>() where x.AllowInteraction() select x; } else { itemAcceptors = Array.Empty<IItemAcceptor>(); } return itemAcceptors.Any(); } static void ConsumeOneUse(Item item) { ConsumeUses(item, 1); } static void ConsumeAllUses(Item item) { ConsumeUses(item, item.totalUses); } static void ConsumeEntireItem(Item item) { ((MonoBehaviour)item).StartCoroutine(item.ConsumeDelayed(true)); } internal static void ConsumeUses(Item item, int uses) { Action_ReduceUses component = ((Component)item).GetComponent<Action_ReduceUses>(); if ((Object)(object)component == (Object)null) { if (item.totalUses <= 1) { ConsumeEntireItem(item); } else { ItemsPlugin.Log.LogWarning((object)$"{item} is multi-use but lacks the Action_ReduceUses component."); } } else { for (int i = 0; i < uses; i++) { ((ItemActionBase)component).RunAction(); } } } } } namespace PEAKLib.Items.ItemAcceptor.Hooks { [MonoDetourTargets(typeof(GUIManager), Members = new string[] { "RefreshInteractablePrompt" })] internal class GUIManagerHooks { [MonoDetourHookInitialize] private static void Init() { RefreshInteractablePrompt.Postfix(Postfix_RefreshInteractablePrompt); } private static void Postfix_RefreshInteractablePrompt(GUIManager self) { if (!ClassExtensionsMethods.UnityObjectExists<IInteractible>(self.currentInteractable) || !IItemAcceptor.TryGetItemAcceptors(self.currentInteractable, out IEnumerable<IItemAcceptor> itemAcceptors)) { return; } self.interactName.SetActive(false); if (Object.op_Implicit((Object)(object)Character.localCharacter.data.currentItem) && Character.localCharacter.data.currentItem.canUseOnFriend) { self.interactPromptSecondary.SetActive(true); ((TMP_Text)self.secondaryInteractPromptText).text = itemAcceptors.First().GetPrompt(); if (itemAcceptors.All((IItemAcceptor x) => x.SecondaryInteractOnly)) { self.interactPromptPrimary.SetActive(false); } } } } [MonoDetourTargets(typeof(Interaction))] internal class InteractionHooks { internal static IEnumerable<IItemAcceptor> itemAcceptors = Array.Empty<IItemAcceptor>(); [MonoDetourHookInitialize] private static void Init() { LateUpdate.Postfix(Postfix_LateUpdate); } private static void Postfix_LateUpdate(Interaction self) { IItemAcceptor.TryGetItemAcceptors(self.bestInteractable, out itemAcceptors); } } [MonoDetourTargets(typeof(Item))] internal class ItemHooks { [MonoDetourHookInitialize] private static void Init() { CanUseSecondary.Postfix(Postfix_CanUseSecondary); StartUseSecondary.Postfix(Postfix_StartUseSecondary); FinishCastSecondary.Postfix(Postfix_FinishCastSecondary); } private static void FeedItem(IItemAcceptor itemAcceptor, Item item, Character interactor) { itemAcceptor?.AcceptItem(item, interactor); } private static void Postfix_CanUseSecondary(Item self, ref bool returnValue) { returnValue = returnValue || (self.canUseOnFriend && InteractionHooks.itemAcceptors.Any()); } private static void Postfix_StartUseSecondary(Item self) { if (!self.isUsingPrimary && !self.isUsingSecondary && Object.op_Implicit((Object)(object)self.holderCharacter) && self.canUseOnFriend && InteractionHooks.itemAcceptors.Any()) { GameUtils.instance.StartFeed(((MonoBehaviourPun)self.holderCharacter).photonView.ViewID, ((MonoBehaviourPun)self.holderCharacter).photonView.ViewID, self.itemID, self.totalSecondaryUsingTime); } } private static void Postfix_FinishCastSecondary(Item self) { if (!self.canUseOnFriend || !InteractionHooks.itemAcceptors.Any()) { return; } foreach (IItemAcceptor itemAcceptor in InteractionHooks.itemAcceptors) { FeedItem(itemAcceptor, self, self.holderCharacter); } ((MonoBehaviourPun)self).photonView.RPC("RemoveFeedDataRPC", (RpcTarget)0, new object[1] { ((MonoBehaviourPun)self.holderCharacter).photonView.ViewID }); } } } namespace PEAKLib.Items.Hooks { [MonoDetourTargets(typeof(DataEntryValue), GenerateControlFlowVariants = true)] internal static class DataEntryValueHooks { public const byte PEAKLIB_MOD_TYPE_INDEX = 42; [MonoDetourHookInitialize] private static void Init() { GetTypeValue.Postfix(Postfix_GetTypeValue); GetNewFromValue.ControlFlowPrefix(Prefix_GetNewFromValue); } private static void Postfix_GetTypeValue(ref Type type, ref byte returnValue) { if (returnValue == 0 && type == typeof(ModItemData)) { returnValue = 42; } } private static ReturnFlow Prefix_GetNewFromValue(ref byte value, ref DataEntryValue returnValue) { if (value == 42) { returnValue = (DataEntryValue)(object)new ModItemData(); return (ReturnFlow)1; } return (ReturnFlow)0; } } [MonoDetourTargets(typeof(ItemDatabase))] internal static class ItemDatabaseHooks { [MonoDetourHookInitialize] private static void Init() { OnLoaded.Prefix(Prefix_OnLoaded); } private static void Prefix_OnLoaded(ItemDatabase self) { foreach (RegisteredContent<ItemContent> s_RegisteredItem in ItemContent.s_RegisteredItems) { ItemRegistrar.FinishRegisterItem(self, s_RegisteredItem); } ItemRegistrar.ItemDatabaseLoaded = self; } } } namespace System.Diagnostics.CodeAnalysis { [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class ConstantExpectedAttribute : Attribute { public object? Min { get; set; } public object? Max { get; set; } } [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class ExperimentalAttribute : Attribute { public string DiagnosticId { get; } public string? UrlFormat { get; set; } public ExperimentalAttribute(string diagnosticId) { DiagnosticId = diagnosticId; } } [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)] [ExcludeFromCodeCoverage] internal sealed class MemberNotNullAttribute : Attribute { public string[] Members { get; } public MemberNotNullAttribute(string member) { Members = new string[1] { member }; } public MemberNotNullAttribute(params string[] members) { Members = members; } } [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)] [ExcludeFromCodeCoverage] internal sealed class MemberNotNullWhenAttribute : Attribute { public bool ReturnValue { get; } public string[] Members { get; } public MemberNotNullWhenAttribute(bool returnValue, string member) { ReturnValue = returnValue; Members = new string[1] { member }; } public MemberNotNullWhenAttribute(bool returnValue, params string[] members) { ReturnValue = returnValue; Members = members; } } [AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class SetsRequiredMembersAttribute : Attribute { } [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class StringSyntaxAttribute : Attribute { public const string CompositeFormat = "CompositeFormat"; public const string DateOnlyFormat = "DateOnlyFormat"; public const string DateTimeFormat = "DateTimeFormat"; public const string EnumFormat = "EnumFormat"; public const string GuidFormat = "GuidFormat"; public const string Json = "Json"; public const string NumericFormat = "NumericFormat"; public const string Regex = "Regex"; public const string TimeOnlyFormat = "TimeOnlyFormat"; public const string TimeSpanFormat = "TimeSpanFormat"; public const string Uri = "Uri"; public const string Xml = "Xml"; public string Syntax { get; } public object?[] Arguments { get; } public StringSyntaxAttribute(string syntax) { Syntax = syntax; Arguments = new object[0]; } public StringSyntaxAttribute(string syntax, params object?[] arguments) { Syntax = syntax; Arguments = arguments; } } [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class UnscopedRefAttribute : Attribute { } } namespace System.Runtime.Versioning { [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class RequiresPreviewFeaturesAttribute : Attribute { public string? Message { get; } public string? Url { get; set; } public RequiresPreviewFeaturesAttribute() { } public RequiresPreviewFeaturesAttribute(string? message) { Message = message; } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class CallerArgumentExpressionAttribute : Attribute { public string ParameterName { get; } public CallerArgumentExpressionAttribute(string parameterName) { ParameterName = parameterName; } } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class CollectionBuilderAttribute : Attribute { public Type BuilderType { get; } public string MethodName { get; } public CollectionBuilderAttribute(Type builderType, string methodName) { BuilderType = builderType; MethodName = methodName; } } [AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class CompilerFeatureRequiredAttribute : Attribute { public const string RefStructs = "RefStructs"; public const string RequiredMembers = "RequiredMembers"; public string FeatureName { get; } public bool IsOptional { get; set; } public CompilerFeatureRequiredAttribute(string featureName) { FeatureName = featureName; } } [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class InterpolatedStringHandlerArgumentAttribute : Attribute { public string[] Arguments { get; } public InterpolatedStringHandlerArgumentAttribute(string argument) { Arguments = new string[1] { argument }; } public InterpolatedStringHandlerArgumentAttribute(params string[] arguments) { Arguments = arguments; } } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class InterpolatedStringHandlerAttribute : Attribute { } [EditorBrowsable(EditorBrowsableState.Never)] [ExcludeFromCodeCoverage] internal static class IsExternalInit { } [AttributeUsage(AttributeTargets.Method, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class ModuleInitializerAttribute : Attribute { } [AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class OverloadResolutionPriorityAttribute : Attribute { public int Priority { get; } public OverloadResolutionPriorityAttribute(int priority) { Priority = priority; } } [AttributeUsage(AttributeTargets.Parameter, Inherited = true, AllowMultiple = false)] [ExcludeFromCodeCoverage] internal sealed class ParamCollectionAttribute : Attribute { } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class RequiredMemberAttribute : Attribute { } [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] [EditorBrowsable(EditorBrowsableState.Never)] [ExcludeFromCodeCoverage] internal sealed class RequiresLocationAttribute : Attribute { } [AttributeUsage(AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event | AttributeTargets.Interface, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class SkipLocalsInitAttribute : Attribute { } }