using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using CUCoreLib.Data;
using CUCoreLib.Helpers;
using CUCoreLib.Registries;
using HarmonyLib;
using Md.GlobalDark;
using Md.PlayerCamera;
using Md.PreRunScript;
using Microsoft.CodeAnalysis;
using ModList.Patches;
using MonoDetour;
using MonoDetour.Cil;
using MonoDetour.DetourTypes;
using MonoDetour.HookGen;
using MonoDetour.Reflection.Unspeakable;
using MonoMod.Utils;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: IgnoresAccessChecksTo("CUCoreLib")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("McAwesome.CU.ModList")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+79b00a845a81eb16bd106a06fba9ba8894dbc58a")]
[assembly: AssemblyProduct("Mod List")]
[assembly: AssemblyTitle("McAwesome.CU.ModList")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[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]
[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]
[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;
}
}
}
internal sealed class ConfigurationManagerAttributes
{
public delegate void CustomHotkeyDrawerFunc(ConfigEntryBase setting, ref bool isCurrentlyAcceptingInput);
public bool? ShowRangeAsPercent;
public Action<ConfigEntryBase> CustomDrawer;
public CustomHotkeyDrawerFunc CustomHotkeyDrawer;
public bool? Browsable;
public string Category;
public object DefaultValue;
public bool? HideDefaultButton;
public bool? HideSettingName;
public string Description;
public string DispName;
public int? Order;
public bool? ReadOnly;
public bool? IsAdvanced;
public Func<object, string> ObjToStr;
public Func<string, object> StrToObj;
}
namespace Md.PreRunScript
{
internal static class Awake
{
public delegate void PrefixSignature(PreRunScript self);
public delegate void PostfixSignature(PreRunScript self);
public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
{
return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
}
public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
{
return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, 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()
{
return typeof(PreRunScript).GetMethod("Awake", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("PreRunScript", "Awake");
}
}
internal static class WaitLoad
{
public delegate void PrefixSignature(PreRunScript self);
public delegate void PostfixSignature(PreRunScript self, ref IEnumerator returnValue);
public delegate void PrefixMoveNextSignature(SpeakableEnumerator<object> self);
public delegate void PostfixMoveNextSignature(SpeakableEnumerator<object> 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(), (Delegate)hook, config, applyByDefault);
}
public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
{
return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, 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(), (Delegate)hook, 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(), (Delegate)hook, 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()
{
return typeof(PreRunScript).GetMethod("WaitLoad", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("PreRunScript", "WaitLoad");
}
public static MethodInfo StateMachineTarget()
{
return Extensions.GetStateMachineTarget((MethodInfo)Target());
}
}
internal static class BackFromCredits
{
}
internal static class SwitchToCredits
{
}
internal static class SwitchOffCredits
{
}
internal static class ToggleCustomSettings
{
}
internal static class Quit
{
}
internal static class QuitCoroutine
{
}
internal static class Start
{
}
internal static class UpdateEndImages
{
}
internal static class ApplyPreset
{
}
internal static class UpdateAllSettingDisplays
{
}
internal static class Update
{
}
internal static class HandleCharacterSelect
{
}
internal static class SelectCharacter
{
}
internal static class UpdateCharacterText
{
}
internal static class CopyToClipboard
{
}
internal static class PasteFromClipboard
{
}
internal static class HandleRunScreen
{
}
internal static class TryLore
{
}
internal static class OpenURL
{
}
internal static class OpenCustomMusicFolder
{
}
internal static class OpenLocaleFolder
{
}
internal static class OpenInFileBrowser
{
}
internal static class StartRun
{
}
internal static class MarkTutorialCompleted
{
}
internal static class LoadRun
{
}
internal static class StartTutorial
{
}
internal static class CompressString
{
}
internal static class DecompressString
{
}
internal static class _ctor
{
}
internal static class __c
{
internal static class _ctor
{
}
}
internal static class _QuitCoroutine_d__54
{
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
{
}
}
internal static class _SwitchOffCredits_d__50
{
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
{
}
}
internal static class _SwitchToCredits_d__49
{
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
{
}
}
internal static class _WaitLoad_d__71
{
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 Md.PlayerCamera
{
internal static class Awake
{
public delegate void PrefixSignature(PlayerCamera self);
public delegate void PostfixSignature(PlayerCamera self);
public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
{
return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
}
public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
{
return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, 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()
{
return typeof(PlayerCamera).GetMethod("Awake", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("PlayerCamera", "Awake");
}
}
internal static class ToMainMenu
{
public delegate void PrefixSignature(PlayerCamera self);
public delegate void PostfixSignature(PlayerCamera self);
public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
{
return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
}
public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
{
return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, 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()
{
return typeof(PlayerCamera).GetMethod("ToMainMenu", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("PlayerCamera", "ToMainMenu");
}
}
internal static class get_irradiateIntensity
{
}
internal static class set_irradiateIntensity
{
}
internal static class get_uiScale
{
}
internal static class PlayUISound_PlayerCamera_UISoundType_System_Single
{
}
internal static class PlayUISound_System_String_System_Single
{
}
internal static class PlayBackpackSound
{
}
internal static class get_pinnedRecipe
{
}
internal static class set_pinnedRecipe
{
}
internal static class get_muteTimeVolume
{
}
internal static class WarnSoundCannon
{
}
internal static class SetChipIndicatorPos
{
}
internal static class SwitchHands
{
}
internal static class OpenItemCustomizer
{
}
internal static class CloseItemCustomizer
{
}
internal static class UpdateItemCustomizer
{
}
internal static class CommenceBlinding
{
}
internal static class SetRecipeCategory
{
}
internal static class GunRack
{
}
internal static class GunEjectMag
{
}
internal static class GunToggleSafety
{
}
internal static class OpenCraftScreen
{
}
internal static class SeeRecipesWithItem
{
}
internal static class StartSelfDestruct
{
}
internal static class SelfDestructSequence
{
}
internal static class RefreshRecipeList
{
}
internal static class RecipeINTToColor
{
}
internal static class IngredientTextForRecipe
{
}
internal static class RefreshCurrentlySelectedRecipe
{
}
internal static class TryCraft
{
}
internal static class UpdateRecipeFilter
{
}
internal static class ClearRecipeFilter
{
}
internal static class SelectRecipe
{
}
internal static class RecipeScrollBackToTop
{
}
internal static class RecipeSmoothScrollToTop
{
}
internal static class PinRecipe
{
}
internal static class LastStandSequence
{
}
internal static class SetDroplets
{
}
internal static class FlashBrain
{
}
internal static class FlashBrief
{
}
internal static class SetIrradiateIntensity
{
}
internal static class AddComaIfTrue
{
}
internal static class ConditionToColorCode
{
}
internal static class ConditionToColor
{
}
internal static class EndColor
{
}
internal static class AutoTimeScaleSet
{
}
internal static class SetTimeScale
{
}
internal static class SpawnCharacter
{
}
internal static class SetUnchippedUI
{
}
internal static class Start
{
}
internal static class ApplyWoundItem
{
}
internal static class WoundSpecialAction
{
}
internal static class DoBodyWorkout
{
}
internal static class WoundViewButton
{
}
internal static class ToggleWoundView
{
}
internal static class HandleInput
{
}
internal static class ImageSizeDelta
{
}
internal static class LifePodShake
{
}
internal static class TimeToString
{
}
internal static class ItemHoverDescription
{
}
internal static class Update
{
}
internal static class HandleDragging
{
}
internal static class HandleStartDragging
{
}
internal static class TryPickupFromUI
{
}
internal static class TryPickupFromWorld
{
}
internal static class HandleReleaseDragging
{
}
internal static class TryPerformUIActions
{
}
internal static class StartLiquidTransfer
{
}
internal static class TryPerformInventoryAction
{
}
internal static class TryPerformRadialAction
{
}
internal static class TryPerformSpecialUIAction
{
}
internal static class TryPerformWorldActions
{
}
internal static class HandleWhileDragging
{
}
internal static class UpdateRadialWhileDragging
{
}
internal static class HandleVariables
{
}
internal static class HandleAttacks
{
}
internal static class HandleWoundView
{
}
internal static class HandleRadialMenu
{
}
internal static class HandleTradeMenu
{
}
internal static class HandleCameraPosition
{
}
internal static class HandleMouseOver
{
}
internal static class HandleWorldHover
{
}
internal static class HandlePlayerHover
{
}
internal static class HandleItemHover
{
}
internal static class HandleBuildingHover
{
}
internal static class HandleBlockHover
{
}
internal static class HandleFluidHover
{
}
internal static class HandleBlockPlaceGhost
{
}
internal static class HandleCurrentlyHeldIcon
{
}
internal static class HandleTimescaleIcons
{
}
internal static class HandleDepthLine
{
}
internal static class HandleLimbInfectionShows
{
}
internal static class OnBecameConscious
{
}
internal static class OnBecameUnconscious
{
}
internal static class HandleUnconsciousScreen
{
}
internal static class GetUnconsciousBlack
{
}
internal static class EndSequence
{
}
internal static class CopyEndPaperToClipboard
{
}
internal static class HandleDeathScreen
{
}
internal static class HandleWorldUI
{
}
internal static class HandleRadiationOverlay
{
}
internal static class HandleAmbientSound
{
}
internal static class HandleTraderOnscreenText
{
}
internal static class HandleCursorIcon
{
}
internal static class TraderToggleCategory
{
}
internal static class RefreshTraderInventories
{
}
internal static class TraderTryHaggle
{
}
internal static class TraderTryHug
{
}
internal static class TraderTryThreaten
{
}
internal static class TraderTryRest
{
}
internal static class TraderTryMove
{
}
internal static class ClearTraderInventories
{
}
internal static class ToggleTradeMenu
{
}
internal static class TraderIndexToLocaleName
{
}
internal static class DoAlertDelayed
{
}
internal static class UpdateTradeTexts
{
}
internal static class DoAlert
{
}
internal static class FixedUpdate
{
}
internal static class UpdateWearables
{
}
internal static class OpenContainer
{
}
internal static class ClearContainer
{
}
internal static class UpdateContainerInfoText
{
}
internal static class RepopulateContainer
{
}
internal static class CloseContainer
{
}
internal static class UseFailUnhappiness
{
}
internal static class LateUpdate
{
}
internal static class HandleLineOfSight
{
}
internal static class HandleScreenShaders
{
}
internal static class HandleHealthPanelButtonSprite
{
}
internal static class HandleAlertPopupOpacity
{
}
internal static class HandleOnscreenCharacterTalkText
{
}
internal static class HandleThrowLine
{
}
internal static class HandleGunMenu
{
}
internal static class DoAchievementDelayed
{
}
internal static class _ctor
{
}
internal static class SpeedType
{
internal static class _ctor
{
}
}
internal static class UISoundType
{
internal static class _ctor
{
}
}
internal static class __c
{
internal static class _ctor
{
}
}
internal static class __c__DisplayClass242_0
{
internal static class _ctor
{
}
}
internal static class __c__DisplayClass244_0
{
internal static class _ctor
{
}
}
internal static class __c__DisplayClass268_0
{
internal static class _ctor
{
}
}
internal static class __c__DisplayClass315_0
{
internal static class _ctor
{
}
}
internal static class __c__DisplayClass324_0
{
internal static class _ctor
{
}
}
internal static class _CommenceBlinding_d__233
{
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
{
}
}
internal static class _DoAlertDelayed_d__333
{
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
{
}
}
internal static class _EndSequence_d__315
{
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
{
}
}
internal static class _FlashBrain_d__255
{
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
{
}
}
internal static class _FlashBrief_d__256
{
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
{
}
}
internal static class _LastStandSequence_d__253
{
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
{
}
}
internal static class _RecipeSmoothScrollToTop_d__251
{
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
{
}
}
internal static class _SelfDestructSequence_d__241
{
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 Md.GlobalDark
{
internal static class Awake
{
public delegate void PrefixSignature(GlobalDark self);
public delegate void PostfixSignature(GlobalDark self);
public static MonoDetourHook Prefix(PrefixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
{
return (manager ?? DefaultMonoDetourManager.Instance).Hook<PrefixDetour>(Target(), (Delegate)hook, config, applyByDefault);
}
public static MonoDetourHook Postfix(PostfixSignature hook, MonoDetourConfig? config = null, bool applyByDefault = true, MonoDetourManager? manager = null)
{
return (manager ?? DefaultMonoDetourManager.Instance).Hook<PostfixDetour>(Target(), (Delegate)hook, 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()
{
return typeof(GlobalDark).GetMethod("Awake", (BindingFlags)(-1), null, Array.Empty<Type>(), null) ?? throw new MissingMethodException("GlobalDark", "Awake");
}
}
internal static class get_uiScale
{
}
internal static class get_forceDisable
{
}
internal static class get_showTooltip
{
}
internal static class get_distortionAmount
{
}
internal static class Update
{
}
internal static class SetTooltip
{
}
internal static class GetDeterministicRandom
{
}
internal static class GetDeterministicRandomChar
{
}
internal static class IsCharOutsideAngleBrackets
{
}
internal static class DistortStr
{
}
internal static class HandleTooltip
{
}
internal static class Darken
{
}
internal static class IsDarkening
{
}
internal static class SetDarkAmount
{
}
internal static class SetStayDark
{
}
internal static class SetSpeedMultiplier
{
}
internal static class CheckForDark
{
}
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(Type? targetType = null) : Attribute(), IMonoDetourTargets
{
public Type? TargetType { get; } = targetType;
public bool IncludeNestedTypes { get; set; } = true;
public string[]? Members { get; set; }
public string[]? MemberNamePrefixes { get; set; }
public string[]? MemberNameSuffixes { get; set; }
public bool GenerateControlFlowVariants { get; set; }
}
}
namespace ModList
{
[BepInPlugin("McAwesome.CU.ModList", "Mod List", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : BaseUnityPlugin
{
public static class CUCoreLibCompatibility
{
private static bool? _enabled;
private static Version _version;
private static bool? _compatibleVersion;
private static bool initialized;
public static bool Enabled
{
get
{
bool valueOrDefault = _enabled == true;
if (!_enabled.HasValue)
{
valueOrDefault = Chainloader.PluginInfos.ContainsKey("net.cucorelib");
_enabled = valueOrDefault;
}
return _enabled.Value;
}
}
public static Version Version
{
get
{
if ((object)_version == null)
{
_version = GeneralExtensions.GetValueSafe<string, PluginInfo>(Chainloader.PluginInfos, "net.cucorelib").Metadata.Version;
}
return _version;
}
}
public static bool CompatibleVersion
{
get
{
bool valueOrDefault = _compatibleVersion == true;
if (!_compatibleVersion.HasValue)
{
valueOrDefault = Enabled && Version >= new Version("1.0.4") && Version < new Version("2.0.0");
_compatibleVersion = valueOrDefault;
}
return _compatibleVersion.Value;
}
}
public static void Init()
{
if (initialized)
{
return;
}
if (Enabled)
{
if (CompatibleVersion)
{
Logger.LogInfo((object)"Found CUCoreLib");
AddOptions();
}
else
{
Logger.LogWarning((object)string.Format("Found {0}, but version was incompatible (expected: >=1.0.4, <2.0.0; got: {1})", "CUCoreLib", Version));
}
}
initialized = true;
}
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
private static void AddOptions()
{
Logger.LogInfo((object)"Registering options with CUCoreLib");
bool ignoreChange = false;
ModOptionDefinition showOnlyInMenu = ModOptionDefinition.Bool("McAwesome.CU.ModList.ShowOnlyInMenu", "Show Only In Menu", "Show only in the menu (in case it gets in the way during gameplay)", "Mod List", Instance.configShowOnlyInMenu.Value, (Action<bool>)delegate(bool value)
{
UpdateConfig<bool>(Instance.configShowOnlyInMenu, value);
});
ModOptionDefinition logUsedMods = ModOptionDefinition.Bool("McAwesome.CU.ModList.LogUsedMods", "Log Used Mods", "Print the used mods in the config on run start", "Mod List", Instance.configLogUsedMods.Value, (Action<bool>)delegate(bool value)
{
UpdateConfig<bool>(Instance.configLogUsedMods, value);
});
ModOptionDefinition modListAlpha = ModOptionDefinition.Float("McAwesome.CU.ModList.ModListAlpha", "Mod List Alpha", "Alpha value of the mod list text", "Mod List", Instance.configModListAlpha.Value, 0.007843138f, 1f, (Action<float>)delegate(float value)
{
UpdateConfig<float>(Instance.configModListAlpha, value);
}, (Func<float, string>)null);
ModOptionsRegistry.Register(showOnlyInMenu);
ModOptionsRegistry.Register(logUsedMods);
ModOptionsRegistry.Register(modListAlpha);
((MonoBehaviour)Instance).StartCoroutine(SetDefaults());
Instance.configShowOnlyInMenu.SettingChanged += delegate
{
OnConfigChanged<bool, SettingBool>(Instance.configShowOnlyInMenu, showOnlyInMenu);
};
Instance.configLogUsedMods.SettingChanged += delegate
{
OnConfigChanged<bool, SettingBool>(Instance.configLogUsedMods, logUsedMods);
};
Instance.configModListAlpha.SettingChanged += delegate
{
OnConfigChanged<float, SettingFloat>(Instance.configModListAlpha, modListAlpha);
};
void OnConfigChanged<T, V>(ConfigEntry<T> config, ModOptionDefinition option) where V : Setting
{
if (!ignoreChange)
{
V val = Settings.Get<V>(option.Id);
if (val != null)
{
((Setting)val).SetValue((object)config.Value);
UpdateSettings((Setting)(object)val);
}
}
}
IEnumerator SetDefaults()
{
yield return (object)new WaitUntil((Func<bool>)(() => (Object)(object)SettingsMenu.instance != (Object)null && (Object)(object)((Component)SettingsMenu.instance).GetComponent<SettingsMenuCategoryExtender>() != (Object)null));
showOnlyInMenu.BoolDefault = (bool)((ConfigEntryBase)Instance.configShowOnlyInMenu).DefaultValue;
logUsedMods.BoolDefault = (bool)((ConfigEntryBase)Instance.configLogUsedMods).DefaultValue;
modListAlpha.FloatDefault = (float)((ConfigEntryBase)Instance.configModListAlpha).DefaultValue;
}
void UpdateConfig<T>(ConfigEntry<T> configEntry, T value)
{
ignoreChange = true;
configEntry.Value = value;
ignoreChange = false;
}
static void UpdateSettings(Setting setting)
{
Settings.SaveSettings();
SettingsMenu instance = SettingsMenu.instance;
string displayName = ModOptionsRegistry.GetCustomCategories().Find((ModOptionCategoryEntry category) => category.Category == setting.category).DisplayName;
if ((Object)(object)instance != (Object)null)
{
for (int num = 0; num < instance.buttons.Count; num++)
{
if ((Object)(object)((Component)instance.buttons[num]).GetComponent<Image>().sprite == (Object)(object)instance.buttonOpen)
{
TextMeshProUGUI componentInChildren = ((Component)instance.buttons[num]).GetComponentInChildren<TextMeshProUGUI>();
if ((Object)(object)componentInChildren != (Object)null && ((TMP_Text)componentInChildren).text == displayName)
{
SettingsMenuCategoryExtender.RefreshLiveMenu();
}
break;
}
}
}
}
}
}
internal static ManualLogSource Logger;
internal ConfigEntry<string> configAdditionalMods;
internal ConfigEntry<bool> configShowOnlyInMenu;
internal ConfigEntry<bool> configLogUsedMods;
internal ConfigEntry<string> configLogUsedModsSeparator;
internal ConfigEntry<float> configModListAlpha;
internal HashSet<PluginInfo> modsList = new HashSet<PluginInfo>();
internal Coroutine applyModsCoroutine;
public static Plugin Instance { get; private set; }
private void Awake()
{
//IL_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: Expected O, but got Unknown
//IL_0088: Unknown result type (might be due to invalid IL or missing references)
//IL_0092: Expected O, but got Unknown
//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
//IL_00d4: Expected O, but got Unknown
//IL_011c: Unknown result type (might be due to invalid IL or missing references)
//IL_0126: Expected O, but got Unknown
Instance = this;
Logger = ((BaseUnityPlugin)this).Logger;
configAdditionalMods = ((BaseUnityPlugin)this).Config.Bind<string>("General", "AdditionalMods", "", new ConfigDescription("Any additional mod names to be displayed in the list (separated by ;)", (AcceptableValueBase)null, new object[1]
{
new ConfigurationManagerAttributes
{
Order = 0
}
}));
configShowOnlyInMenu = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "ShowOnlyInMenu", false, new ConfigDescription("Show only in the menu (in case it gets in the way during gameplay)", (AcceptableValueBase)null, new object[1]
{
new ConfigurationManagerAttributes
{
Order = -1
}
}));
configLogUsedMods = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "LogUsedMods", true, new ConfigDescription("Print the used mods in the config on run start", (AcceptableValueBase)null, new object[1]
{
new ConfigurationManagerAttributes
{
Order = -2
}
}));
configLogUsedModsSeparator = ((BaseUnityPlugin)this).Config.Bind<string>("General", "LogUsedModsSeparator", "\n", new ConfigDescription("Separator between the used mods", (AcceptableValueBase)null, new object[1]
{
new ConfigurationManagerAttributes
{
Order = -3,
IsAdvanced = true
}
}));
try
{
MonoDetourManager.InvokeHookInitializers(Assembly.GetExecutingAssembly());
}
catch (Exception ex)
{
Logger.LogError((object)"An error occurred while initializing hooks");
Logger.LogError((object)ex);
}
configAdditionalMods.SettingChanged += StartApplyMods;
configShowOnlyInMenu.SettingChanged += delegate
{
if (configShowOnlyInMenu.Value && (Object)(object)WorldGeneration.world != (Object)null)
{
GlobalDarkHooks.HideModdedText();
}
else
{
GlobalDarkHooks.ShowModdedText();
}
};
CollectMods();
StartApplyMods();
Logger.LogInfo((object)"Plugin McAwesome.CU.ModList is loaded!");
}
private void Start()
{
//IL_0051: Unknown result type (might be due to invalid IL or missing references)
//IL_005b: Expected O, but got Unknown
configModListAlpha = ((BaseUnityPlugin)this).Config.Bind<float>("General", "ModListAlpha", GlobalDarkHooks.defaultModListAlpha, new ConfigDescription("Alpha value of the mod list text", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.007843138f, 1f), new object[1]
{
new ConfigurationManagerAttributes
{
Order = -4,
ShowRangeAsPercent = false
}
}));
configModListAlpha.SettingChanged += GlobalDarkHooks.UpdateModListAlpha;
GlobalDarkHooks.UpdateModListAlpha();
CollectMods();
StartApplyMods();
((MonoBehaviour)this).StartCoroutine(CollectModsDelayed(1f));
CUCoreLibCompatibility.Init();
}
internal IEnumerator CollectModsDelayed(float delay)
{
yield return (object)new WaitForSeconds(delay);
CollectMods();
StartApplyMods();
}
internal void CollectMods()
{
foreach (KeyValuePair<string, PluginInfo> pluginInfo in Chainloader.PluginInfos)
{
modsList.Add(pluginInfo.Value);
}
}
internal static void LogHookError(string failedAction, string hookedMethod, Exception exception, string additionalInfo = null)
{
if (additionalInfo != null)
{
additionalInfo += " ";
}
Logger.LogError((object)("Could not " + failedAction + " (in " + hookedMethod + "). " + additionalInfo + "See exception (below) for more information"));
Logger.LogError((object)exception);
}
internal void StartApplyMods(object sender = null, EventArgs args = null)
{
if (applyModsCoroutine != null)
{
((MonoBehaviour)this).StopCoroutine(applyModsCoroutine);
applyModsCoroutine = null;
}
applyModsCoroutine = ((MonoBehaviour)this).StartCoroutine(ApplyModsDelayed());
}
internal IEnumerator ApplyModsDelayed()
{
yield return (object)new WaitUntil((Func<bool>)(() => (Object)(object)GlobalDark.main != (Object)null));
GlobalDarkHooks.ApplyMods();
applyModsCoroutine = null;
}
}
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "McAwesome.CU.ModList";
public const string PLUGIN_NAME = "Mod List";
public const string PLUGIN_VERSION = "1.0.0";
}
}
namespace ModList.Patches
{
[MonoDetourTargets(typeof(GlobalDark))]
public class GlobalDarkHooks
{
internal static GameObject moddedBuild = null;
internal static TextMeshProUGUI moddedBuildText = null;
internal static string originalModdedBuildText = "This is a modded build ()";
internal static float defaultModListAlpha = 0.0627451f;
[MonoDetourHookInitialize]
internal static void Init()
{
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Expected O, but got Unknown
Plugin.Logger.LogDebug((object)"Initializing GlobalDark Hooks");
Md.GlobalDark.Awake.Postfix(Postfix_Awake, new MonoDetourConfig(100000, (IEnumerable<string>)null, (IEnumerable<string>)null, (string)null));
}
internal static void Postfix_Awake(GlobalDark inst)
{
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
//IL_0114: Unknown result type (might be due to invalid IL or missing references)
//IL_0123: 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)
GameObject val = Resources.FindObjectsOfTypeAll<GameObject>().First((GameObject obj) => ((Object)obj).name == "betabuild");
try
{
moddedBuild = Resources.FindObjectsOfTypeAll<GameObject>().First((GameObject obj) => ((Object)obj).name == "moddedbuild");
}
catch (InvalidOperationException)
{
moddedBuild = Object.Instantiate<GameObject>(val, ((Component)inst).transform);
((Object)moddedBuild).name = "moddedbuild";
((TMP_Text)moddedBuild.GetComponent<TextMeshProUGUI>()).rectTransform.sizeDelta = new Vector2(((TMP_Text)moddedBuild.GetComponent<TextMeshProUGUI>()).rectTransform.sizeDelta.x * 2f, ((TMP_Text)moddedBuild.GetComponent<TextMeshProUGUI>()).rectTransform.sizeDelta.y);
}
moddedBuild.SetActive(true);
moddedBuildText = moddedBuild.GetComponent<TextMeshProUGUI>();
((TMP_Text)moddedBuildText).text = "This is a modded build ()\nIf you're seeing this, you probably forgot to set HideManagerGameObject to true in BepInEx's config!";
if (val.activeInHierarchy)
{
((TMP_Text)moddedBuildText).rectTransform.anchoredPosition = ((TMP_Text)val.GetComponent<TextMeshProUGUI>()).rectTransform.anchoredPosition + new Vector2(0f, -21f);
}
defaultModListAlpha = ((TMP_Text)moddedBuildText).alpha;
}
internal static void ApplyMods()
{
StringBuilder stringBuilder = new StringBuilder();
List<string> list = new List<string>();
foreach (PluginInfo mods in Plugin.Instance.modsList)
{
list.Add($"{mods.Metadata.Name} (v{mods.Metadata.Version})");
}
List<string> list2 = Plugin.Instance.configAdditionalMods.Value.Split(";").ToList();
for (int i = 0; i < list2.Count; i++)
{
list2[i] = list2[i].Trim();
}
list2.RemoveAll((string str) => Utility.IsNullOrWhiteSpace(str));
StringBuilder stringBuilder2 = stringBuilder;
List<string> list3 = list2;
int num = 0;
string[] array = new string[list.Count + list3.Count];
foreach (string item in list)
{
array[num] = item;
num++;
}
foreach (string item2 in list3)
{
array[num] = item2;
num++;
}
stringBuilder2.AppendJoin(", ", array);
((TMP_Text)moddedBuildText).text = originalModdedBuildText.Replace("()", $"({stringBuilder})");
}
internal static void HideModdedText()
{
moddedBuild.SetActive(false);
}
internal static void ShowModdedText()
{
moddedBuild.SetActive(true);
}
internal static void LogAllMods()
{
StringBuilder stringBuilder = new StringBuilder();
List<string> list = new List<string>();
foreach (PluginInfo mods in Plugin.Instance.modsList)
{
list.Add($"{mods.Metadata.Name} (v{mods.Metadata.Version})");
}
List<string> list2 = Plugin.Instance.configAdditionalMods.Value.Split(";").ToList();
for (int i = 0; i < list2.Count; i++)
{
list2[i] = list2[i].Trim();
}
list2.RemoveAll((string str) => Utility.IsNullOrWhiteSpace(str));
StringBuilder stringBuilder2 = stringBuilder;
string value = Plugin.Instance.configLogUsedModsSeparator.Value;
List<string> list3 = list2;
int num = 0;
string[] array = new string[list.Count + list3.Count];
foreach (string item in list)
{
array[num] = item;
num++;
}
foreach (string item2 in list3)
{
array[num] = item2;
num++;
}
stringBuilder2.AppendJoin(value, array);
Plugin.Logger.LogInfo((object)$"Used mods:\n{stringBuilder}");
}
internal static void UpdateModListAlpha(object obj = null, EventArgs args = null)
{
float value = Plugin.Instance.configModListAlpha.Value;
((TMP_Text)moddedBuildText).alpha = Mathf.Clamp(value, 0.007843138f, 1f);
}
}
[MonoDetourTargets(typeof(PlayerCamera))]
public class PlayerCameraHooks
{
[MonoDetourHookInitialize]
internal static void Init()
{
Plugin.Logger.LogDebug((object)"Initializing PlayerCamera Hooks");
ToMainMenu.Prefix(Prefix_ToMainMenu);
}
internal static void Prefix_ToMainMenu(PlayerCamera self)
{
Plugin.Instance.CollectMods();
GlobalDarkHooks.ApplyMods();
GlobalDarkHooks.ShowModdedText();
}
}
[MonoDetourTargets(typeof(PreRunScript))]
public class PreRunScriptHooks
{
[MonoDetourHookInitialize]
internal static void Init()
{
Plugin.Logger.LogDebug((object)"Initializing PreRunScript Hooks");
WaitLoad.PrefixMoveNext(Prefix_WaitLoad_MoveNext);
}
internal static void Prefix_WaitLoad_MoveNext(SpeakableEnumerator<object> self)
{
switch (self.State)
{
case 0:
Plugin.Instance.CollectMods();
GlobalDarkHooks.ApplyMods();
break;
case 1:
Plugin.Instance.CollectMods();
GlobalDarkHooks.ApplyMods();
if (Plugin.Instance.configShowOnlyInMenu.Value)
{
GlobalDarkHooks.HideModdedText();
}
if (Plugin.Instance.configLogUsedMods.Value)
{
GlobalDarkHooks.LogAllMods();
}
break;
}
}
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
public IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}