using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using PEAKLib.Core; using PEAKLib.Core.Extensions; using PEAKLib.Items; using PEAKLib.Items.UnityEditor; using Peak.Afflictions; using Photon.Pun; using Photon.Realtime; using PiggyBank.Behaviours; using PiggyBank.Behaviours.GUI; using Sirenix.Utilities; using TMPro; using UnityEngine; using UnityEngine.Audio; using UnityEngine.EventSystems; using UnityEngine.Rendering; using UnityEngine.SceneManagement; using UnityEngine.TextCore; using UnityEngine.UI; using UnityEngine.UI.Extensions; using UnnamedProducts.Behaviours; using UnnamedProducts.Behaviours.Item; using UnnamedProducts.Behaviours.Item.GarbageBag; using UnnamedProducts.Behaviours.Item.GarbageBag.GUI; using UnnamedProducts.Compatibility; using UnnamedProducts.Extensions; using UnnamedProducts.Patchers; using Zorro.Core; using Zorro.Core.CLI; using Zorro.Core.Serizalization; using Zorro.Settings; using pworld.Scripts.Extensions; [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("com.github.MiiMii1205.UnnamedProducts")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.3.0.0")] [assembly: AssemblyInformationalVersion("1.3.0+b46d04ef22b9a76380cdb3f0a764e68486b9e90c")] [assembly: AssemblyProduct("com.github.MiiMii1205.UnnamedProducts")] [assembly: AssemblyTitle("UnnamedProducts")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.3.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.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 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 UnnamedProducts { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.github.MiiMii1205.UnnamedProducts", "UnnamedProducts", "1.3.0")] public class UnnamedPlugin : BaseUnityPlugin { public const float UnnamedModifier = 0.5f; public const float UnnamedChance = 0.25f; public const float UnnamedLuggageChance = 0.125f; public const byte UnnamedTotalBaseDataEntryKey = 15; private static readonly Dictionary UnnamedDatabase = new Dictionary(); private static TMP_FontAsset? _darumaFontAsset; private static Material? _darumaShadowMaterial; private static readonly string[] GlobalZombieSpawnModList = new string[5] { "com.EMOKaMi.Zombie", "com.emokami.mimic", "Heroes", "sinik.zombiespawner", "legocool.LuckyBlocks" }; public static GameObject UnnamedGarbageBagPrefab = null; public static Texture2D GarbageBagIcon = null; private static readonly HashSet UnnamedUniques = new HashSet(); private static readonly Dictionary BiomeSeeds = new Dictionary(); private static readonly int UnderlayDilate = Shader.PropertyToID("_UnderlayDilate"); private static readonly int UnderlayOffsetY = Shader.PropertyToID("_UnderlayOffsetY"); private static readonly int UnderlaySoftness = Shader.PropertyToID("_UnderlaySoftness"); private static readonly int UnderlayColor = Shader.PropertyToID("_UnderlayColor"); private static bool _hasAnyGlobalSpawningZombies; private static string _unnamedPrefix = null; private static string _modInfoPrefix = null; public const string Id = "com.github.MiiMii1205.UnnamedProducts"; internal static ManualLogSource Log { get; private set; } = null; internal static PluginInfo UnnamedInfo { get; private set; } = null; public static Material SmallLuggageMaterial { get; private set; } = null; public static Material SmallLuggageInteriorMaterial { get; private set; } = null; public static Material LargeLuggageMaterial { get; private set; } = null; public static Material EpicLuggageMaterial { get; private set; } = null; public static Material LargeLuggageInteriorMaterial { get; private set; } = null; public static Material AncientLuggageMaterial { get; private set; } = null; public static Material AncientLuggageMetalMaterial { get; private set; } = null; public static Material AncientLuggageCrystalMaterial { get; private set; } = null; public static Material RespawnStatueCalderaMaterial { get; private set; } = null; public static Material RespawnStatueAlpineMaterial { get; private set; } = null; public static Material RespawnStatueMesaMaterial { get; private set; } = null; public static Material RespawnStatueRockVFXMaterial { get; private set; } = null; public static Material RespawnStatueRootsMaterial { get; private set; } = null; public static Material RespawnStatueTropicsMaterial { get; private set; } = null; public static Material RespawnStatueShoreMaterial { get; private set; } = null; public static SpawnPool UnnamedSpawnPool { get; private set; } = (SpawnPool)0; public static GameObject BigUnnamedLuggagePrefab { get; private set; } = null; public static GameObject SmallUnnamedLuggagePrefab { get; private set; } = null; public static GameObject EpicUnnamedLuggagePrefab { get; private set; } = null; public static GameObject AncientUnnamedLuggagePrefab { get; private set; } = null; public static TMP_FontAsset DarumaDropOne { get { if ((Object)(object)_darumaFontAsset == (Object)null) { TMP_FontAsset[] source = Resources.FindObjectsOfTypeAll(); _darumaFontAsset = ((IEnumerable)source).FirstOrDefault((Func)delegate(TMP_FontAsset fontAsset) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) FaceInfo faceInfo = ((TMP_Asset)fontAsset).faceInfo; return ((FaceInfo)(ref faceInfo)).familyName == "Daruma Drop One"; }); Log.LogInfo((object)"Daruma Drop One font found!"); } return _darumaFontAsset; } } public static Material DarumaDropOneShadowMaterial { get { //IL_0097: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_darumaShadowMaterial == (Object)null) { _darumaShadowMaterial = ThrowHelper.ThrowIfArgumentNull(Object.Instantiate(((TMP_Asset)DarumaDropOne).material), "GameObject.Instantiate(DarumaDropOne.material)"); _darumaShadowMaterial.EnableKeyword("UNDERLAY_ON"); _darumaShadowMaterial.SetFloat(UnderlayDilate, 1f); _darumaShadowMaterial.SetFloat(UnderlayOffsetY, -0.7f); _darumaShadowMaterial.SetFloat(UnderlaySoftness, 1f); _darumaShadowMaterial.SetColor(UnderlayColor, new Color(0f, 0f, 0f, 0.1960784f)); Log.LogInfo((object)"Shadow material for Critial Hit indicator was successfully generated!"); } return _darumaShadowMaterial; } } public GameObject UnnamedKioskSetup { get; private set; } public GameObject UnnamedBrokenStandeeSetup { get; private set; } public Dictionary PlaneMaterials { get; set; } public Dictionary MirageMaterials { get; set; } public static bool ShouldBeUnnamed => Random.value <= 0.25f; public static bool LuggageShouldBeUnnamed => Random.value <= 0.125f; public static float RandomUnnamedModifier => RandomModifier(); public static bool RandomUnnamedBool => IsUnnamedLucky(); public static string Name => "UnnamedProducts"; public static string Version => "1.3.0"; private void Awake() { //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Expected O, but got Unknown Log = ((BaseUnityPlugin)this).Logger; UnnamedInfo = ((BaseUnityPlugin)this).Info; _modInfoPrefix = ModDefinition.GetOrCreate(UnnamedInfo).Id + ":"; _unnamedPrefix = _modInfoPrefix + "Unnamed"; AddLocalizedTextCsv(); int num = 0; foreach (int value in Enum.GetValues(typeof(SpawnPool))) { if (value > num) { num = value; } } UnnamedSpawnPool = (SpawnPool)(num * 2); Log.LogInfo((object)$"Highest spawn pool: {num}. Using {num * 2} as the unnamed pool"); Log.LogInfo((object)("Plugin " + Name + " is loading...")); _hasAnyGlobalSpawningZombies = GlobalZombieSpawnModList.Any(Chainloader.PluginInfos.ContainsKey); GlobalEvents.OnItemRequested = (Action)Delegate.Combine(GlobalEvents.OnItemRequested, new Action(CheckForStickyFireballs)); BundleLoader.LoadBundleWithName((BaseUnityPlugin)(object)this, "unnamed.peakbundle", (Action)delegate(PeakBundle peakBundle) { //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Expected O, but got Unknown //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_0403: Expected O, but got Unknown //IL_042c: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Unknown result type (might be due to invalid IL or missing references) //IL_0440: Expected O, but got Unknown //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Expected O, but got Unknown //IL_0673: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_07d4: Unknown result type (might be due to invalid IL or missing references) //IL_07d9: Unknown result type (might be due to invalid IL or missing references) //IL_07ef: Unknown result type (might be due to invalid IL or missing references) //IL_07f4: Unknown result type (might be due to invalid IL or missing references) //IL_080a: Unknown result type (might be due to invalid IL or missing references) //IL_080f: Unknown result type (might be due to invalid IL or missing references) //IL_0825: Unknown result type (might be due to invalid IL or missing references) //IL_082a: Unknown result type (might be due to invalid IL or missing references) //IL_0866: Unknown result type (might be due to invalid IL or missing references) //IL_086b: Unknown result type (might be due to invalid IL or missing references) //IL_0881: Unknown result type (might be due to invalid IL or missing references) //IL_0886: Unknown result type (might be due to invalid IL or missing references) //IL_089c: Unknown result type (might be due to invalid IL or missing references) //IL_08a1: Unknown result type (might be due to invalid IL or missing references) //IL_08b7: Unknown result type (might be due to invalid IL or missing references) //IL_08bc: Unknown result type (might be due to invalid IL or missing references) //IL_093d: Unknown result type (might be due to invalid IL or missing references) //IL_0942: Unknown result type (might be due to invalid IL or missing references) //IL_094d: Unknown result type (might be due to invalid IL or missing references) //IL_0958: Unknown result type (might be due to invalid IL or missing references) //IL_095f: Unknown result type (might be due to invalid IL or missing references) //IL_0966: Unknown result type (might be due to invalid IL or missing references) //IL_096d: Unknown result type (might be due to invalid IL or missing references) //IL_0974: Unknown result type (might be due to invalid IL or missing references) //IL_097f: Unknown result type (might be due to invalid IL or missing references) //IL_0986: Unknown result type (might be due to invalid IL or missing references) //IL_098d: Unknown result type (might be due to invalid IL or missing references) //IL_0994: Unknown result type (might be due to invalid IL or missing references) //IL_099b: Unknown result type (might be due to invalid IL or missing references) //IL_09a2: Unknown result type (might be due to invalid IL or missing references) //IL_09a9: Unknown result type (might be due to invalid IL or missing references) //IL_09b0: Unknown result type (might be due to invalid IL or missing references) //IL_09b7: Unknown result type (might be due to invalid IL or missing references) //IL_09be: Unknown result type (might be due to invalid IL or missing references) //IL_09c5: Unknown result type (might be due to invalid IL or missing references) //IL_09cb: Unknown result type (might be due to invalid IL or missing references) //IL_09d1: Unknown result type (might be due to invalid IL or missing references) //IL_09d7: Unknown result type (might be due to invalid IL or missing references) //IL_09dd: Unknown result type (might be due to invalid IL or missing references) //IL_09ed: Expected O, but got Unknown //IL_0a43: Unknown result type (might be due to invalid IL or missing references) //IL_0a48: Unknown result type (might be due to invalid IL or missing references) //IL_1433: Unknown result type (might be due to invalid IL or missing references) //IL_1363: Unknown result type (might be due to invalid IL or missing references) GameObject val5 = peakBundle.LoadAsset("Antifreeze.prefab"); Log.LogInfo((object)"Loading Antifreeze..."); MeshRenderer[] componentsInChildren = val5.GetComponentsInChildren(); foreach (MeshRenderer val6 in componentsInChildren) { ((Renderer)val6).sortingOrder = 1; if (((Object)((Renderer)val6).sharedMaterial.shader).name == "Shader Graphs/LiquidEffect" || ((Object)((Renderer)val6).material.shader).name == "Shader Graphs/LiquidEffect") { GameObject gameObject = ((Component)val6).gameObject; LiquidController orAddComponent3 = ExtGameObject.GetOrAddComponent(gameObject); Log.LogInfo((object)"Initializing Liquid Controller..."); orAddComponent3.mesh = gameObject.GetComponent().sharedMesh; orAddComponent3.rend = (Renderer)(object)val6; orAddComponent3.compensateShapeAmount = 0.132f; orAddComponent3.Thickness = 0.5f; orAddComponent3.fillAmount = 0.4f; orAddComponent3.Recovery = 1f; orAddComponent3.MaxWobble = 0.03f; orAddComponent3.WobbleSpeedMove = 0.5f; } } ExplodeOnBurningAction explodeOnBurningAction = val5.AddComponent(); explodeOnBurningAction.dontRunIfOutOfFuel = false; ((ItemAction)explodeOnBurningAction).OnCastFinished = true; UnnamedSpawnRestriction orAddComponent4 = ExtGameObject.GetOrAddComponent(val5); orAddComponent4.biomeType = CollectionExtensions.AddToArray(orAddComponent4.biomeType, (BiomeType)2); orAddComponent4.whenNightIsCold = true; orAddComponent4.hasColdNightRestrictions = true; LootData orAddComponent5 = ExtGameObject.GetOrAddComponent(val5); orAddComponent5.spawnLocations = UnnamedSpawnPool; Log.LogInfo((object)"Loading sticky fireball..."); GameObject val7 = peakBundle.LoadAsset("StickyFireball.prefab"); StickyFireballController orAddComponent6 = ExtGameObject.GetOrAddComponent(val7); orAddComponent6.destroyAfterTime = val7.GetComponent(); orAddComponent6.rb = val7.GetComponent(); AudioSource component = ((Component)orAddComponent6).GetComponent(); Item val8 = default(Item); if (ItemDatabase.TryGetItem((ushort)62, ref val8)) { AudioClip clip = ((Component)val8).GetComponent().constructedPrefab.gameObject.GetComponent().clip; component.clip = clip; Campfire componentInChildren = ((Component)val8).GetComponent().constructedPrefab.GetComponentInChildren(); SFX_Instance[] fireStart = componentInChildren.fireStart; SFX_Instance[] extinguish = componentInChildren.extinguish; orAddComponent6.extinguish = extinguish; orAddComponent6.fireStart = fireStart; } component.SetCustomCurve((AudioSourceCurveType)0, new AnimationCurve((Keyframe[])(object)new Keyframe[10] { new Keyframe(0.002f, 1f, -500.2007f, -500.2007f, 0f, 0f), new Keyframe(0.004f, 0.5f, -125.0502f, -125.0502f, 0f, 0f), new Keyframe(0.008f, 0.25f, -31.2625f, -31.2625f, 0f, 0f), new Keyframe(0.016f, 0.125f, -7.8156f, -7.8156f, 0f, 0f), new Keyframe(0.032f, 0.0625f, -1.9539f, -1.9539f, 0f, 0f), new Keyframe(0.064f, 1f / 32f, -0.4885f, -0.4885f, 0f, 0f), new Keyframe(0.128f, 1f / 64f, -0.1221f, -0.1221f, 0f, 0f), new Keyframe(0.256f, 1f / 128f, -0.0305f, -0.0305f, 0f, 0f), new Keyframe(0.512f, 0.00390625f, -0.00076f, -0.00076f, 0f, 0f), new Keyframe(1f, 0f, -0.002f, -0.002f, 0f, 0f) })); component.SetCustomCurve((AudioSourceCurveType)1, new AnimationCurve((Keyframe[])(object)new Keyframe[1] { new Keyframe(0f, 1f, 0f, 0f, 0.3333f, 0.3333f) })); component.SetCustomCurve((AudioSourceCurveType)2, new AnimationCurve((Keyframe[])(object)new Keyframe[1] { new Keyframe(0f, 1f, 0f, 0f, 0.3333f, 0.3333f) })); component.SetCustomCurve((AudioSourceCurveType)3, new AnimationCurve((Keyframe[])(object)new Keyframe[1] { new Keyframe(0f, 1f, 0f, 0f, 0.3333f, 0.3333f) })); Renderer[] componentsInChildren2 = ((Component)orAddComponent6).GetComponentsInChildren(true); Material item; foreach (Renderer val9 in componentsInChildren2) { Material[] materials = val9.materials; int l = 0; for (int num3 = materials.Length; l < num3; l++) { Material val10 = materials[l]; val10.shader = ThrowHelper.ThrowIfArgumentNull(Shader.Find(((Object)val10.shader).name), "Shader.Find(mat.shader.name)"); } Renderer val11 = val9; Material[] array = materials; List list = new List(array.Length); Material[] array2 = array; for (int m = 0; m < array2.Length; m++) { item = array2[m]; list.Add(item); } val11.SetMaterials(list); } Item val12 = default(Item); if (ItemDatabase.TryGetItem((ushort)35, ref val12)) { ItemCooking orAddComponent7 = ExtGameObject.GetOrAddComponent(val5); GameObject val13 = peakBundle.LoadAsset("AntifreezeExplosion.prefab"); AntifreezeExplosionController antifreezeExplosionController = val13.AddComponent(); antifreezeExplosionController.stickyFireball = ((Component)orAddComponent6).gameObject; antifreezeExplosionController.m_amountOfFireballs = 20; GameObject val14 = Object.Instantiate(((Component)val12).GetComponent().explosionPrefab); val14.SetActive(false); Object.DontDestroyOnLoad((Object)(object)val14); antifreezeExplosionController.explosionPrefab = val14; orAddComponent7.explosionPrefab = ((Component)antifreezeExplosionController).gameObject; NetworkPrefabManager.RegisterNetworkPrefab(ModDefinition.GetOrCreate(((BaseUnityPlugin)this).Info), ((Component)antifreezeExplosionController).gameObject); NetworkPrefabManager.RegisterNetworkPrefab(ModDefinition.GetOrCreate(((BaseUnityPlugin)this).Info), val14); } StickyFireballController.FireballPrefab = ((Component)orAddComponent6).gameObject; NetworkPrefabManager.RegisterNetworkPrefab(ModDefinition.GetOrCreate(((BaseUnityPlugin)this).Info), ((Component)orAddComponent6).gameObject); UnnamedUniques.Add(((Object)val5).name.Trim()); GameObject val15 = peakBundle.LoadAsset("LaundryDetergent.prefab"); Action_Detergent orAddComponent8 = ExtGameObject.GetOrAddComponent(val15); ((ItemAction)orAddComponent8).OnCastFinished = true; UnnamedSpawnRestriction orAddComponent9 = ExtGameObject.GetOrAddComponent(val15); orAddComponent9.biomeType = CollectionExtensions.AddToArray(CollectionExtensions.AddToArray(CollectionExtensions.AddToArray(orAddComponent9.biomeType, (BiomeType)7), (BiomeType)6), (BiomeType)2); orAddComponent9.hasZombieRestrictions = true; orAddComponent9.whenZombieSpawnGlobally = true; LootData orAddComponent10 = ExtGameObject.GetOrAddComponent(val15); orAddComponent10.spawnLocations = UnnamedSpawnPool; UnnamedUniques.Add(((Object)val15).name.Trim()); GameObject val16 = peakBundle.LoadAsset("GarbageBag.prefab"); Item val17 = default(Item); ItemDatabase.TryGetItem((ushort)91, ref val17); BananaPeel component2 = ((Component)val17).GetComponent(); UnnamedGarbageBagController orAddComponent11 = ExtGameObject.GetOrAddComponent(val16); UnnamedGarbageBagSlips orAddComponent12 = ExtGameObject.GetOrAddComponent(val16); UnnamedGarbageBagAudio orAddComponent13 = ExtGameObject.GetOrAddComponent(val16); ItemCooking orAddComponent14 = ExtGameObject.GetOrAddComponent(val16); BackPackAudio val18 = default(BackPackAudio); if (val16.TryGetComponent(ref val18)) { orAddComponent13.holdSFX = val18.holdSFX; orAddComponent13.dropSFX = val18.dropSFX; Object.Destroy((Object)(object)val18); } orAddComponent11.slipSDSfxInstances = (SFX_Instance[])(object)new SFX_Instance[1] { component2.slipSFX[0] }; orAddComponent14.additionalCookingBehaviors = CollectionExtensions.AddToArray(orAddComponent14.additionalCookingBehaviors, (AdditionalCookingBehavior)(object)new CookingBehavior_DestroyAndReleaseGarbageBagItems { cookedAmountToTrigger = 1 }); orAddComponent12.garbageBag = orAddComponent11; orAddComponent12.rig = val16.GetComponent(); orAddComponent12.slipOnCollision = true; orAddComponent12.minSlipVelocity = 15f; orAddComponent12.ragdollCharacterOnSlip = false; orAddComponent12.pushForce = 2f; orAddComponent12.wholeBodyPushForce = 1f; orAddComponent11.fullBagGameObject = ((Component)val16.transform.Find("GarbageBag/filled")).gameObject; orAddComponent11.emptyBagGameObject = ((Component)val16.transform.Find("GarbageBag/empty")).gameObject; orAddComponent11.rightHandEmptyPosition = new Vector3(0.1941f, 0.179f, -0.3009f); orAddComponent11.leftHandEmptyPosition = new Vector3(-0.187f, 0.179f, -0.292f); orAddComponent11.rightHandFullPosition = new Vector3(0.407f, 0.17900696f, -0.429f); orAddComponent11.leftHandFullPosition = new Vector3(-0.377f, 0.179f, -0.42899966f); orAddComponent11.fullBagGameObject.SetActive(true); ShaderExtensions.ReplaceShaders(orAddComponent11.fullBagGameObject); orAddComponent11.fullBagGameObject.SetActive(false); ((Item)orAddComponent11).defaultPos = new Vector3(0f, -0.3f, 1.3166288f); orAddComponent11.defaultPosFilled = new Vector3(0f, -0.3f, 1.3166288f); orAddComponent11.defaultPosEmpty = new Vector3(0f, -0.3f, 0.81002724f); ((Item)orAddComponent11).defaultForward = new Vector3(0f, 0f, 1f); ((Item)orAddComponent11).mainRenderer = orAddComponent11.fullBagGameObject.GetComponent(); ((Item)orAddComponent11).addtlRenderers = (Renderer[])(object)new Renderer[1] { orAddComponent11.emptyBagGameObject.GetComponent() }; UnnamedGarbageBagVisuals orAddComponent15 = ExtGameObject.GetOrAddComponent(val16); orAddComponent15.item = (Item)(object)orAddComponent11; orAddComponent11.m_unnamedGarbageBagVisuals = orAddComponent15; orAddComponent11.openRadialMenuTime = 0f; GarbageBagIcon = peakBundle.LoadAsset("GarbageBag Icon.png"); ((Item)orAddComponent11).carryWeight = 1; ((Item)orAddComponent11).mass = 50f; ((Item)orAddComponent11).UIData = new ItemUIData { itemName = "Garbage Bag", icon = GarbageBagIcon, hasAltIcon = false, hasColorBlindIcon = false, altIcon = null, hasMainInteract = false, mainInteractPrompt = "OPEN", hasSecondInteract = false, secondaryInteractPrompt = null, hasScrollingInteract = false, scrollInteractPrompt = null, canDrop = true, canPocket = true, canBackpack = true, canThrow = true, isShootable = false, hideFuel = true, iconPositionOffset = default(Vector3), iconRotationOffset = default(Vector3), iconScaleOffset = 1.49f }; ((Item)orAddComponent11).totalUses = -1; UnnamedUniques.Add(((Object)val16).name.Trim()); GameObject val19 = peakBundle.LoadAsset("GarbageBagBox.prefab"); Action_SpawnAndGrab orAddComponent16 = ExtGameObject.GetOrAddComponent(val19); orAddComponent16.itemToSpawn = val16.GetComponent(); ((ItemAction)orAddComponent16).OnCastFinished = true; LootData orAddComponent17 = ExtGameObject.GetOrAddComponent(val19); orAddComponent17.spawnLocations = UnnamedSpawnPool; UnnamedUniques.Add(((Object)val19).name.Trim()); SmallLuggageMaterial = peakBundle.LoadAsset("M_UnnamedLuggage.mat"); SmallLuggageInteriorMaterial = peakBundle.LoadAsset("M_UnnamedLuggage_interior.mat"); EpicLuggageMaterial = peakBundle.LoadAsset("M_UnnamedLuggage_epic.mat"); LargeLuggageMaterial = peakBundle.LoadAsset("M_UnnamedLuggage_large.mat"); LargeLuggageInteriorMaterial = peakBundle.LoadAsset("M_UnnamedLuggage_interior_large.mat"); AncientLuggageMaterial = peakBundle.LoadAsset("M_UnnamedLuggage_ancient.mat"); AncientLuggageMetalMaterial = peakBundle.LoadAsset("M_UnnamedMetal.mat"); AncientLuggageCrystalMaterial = peakBundle.LoadAsset("M_UnnamedRock_Crystal.mat"); RespawnStatueCalderaMaterial = peakBundle.LoadAsset("M_UnnamedRock_Volcano.mat"); RespawnStatueAlpineMaterial = peakBundle.LoadAsset("M_UnnamedRock_peak Snow.mat"); RespawnStatueMesaMaterial = peakBundle.LoadAsset("M_UnnamedDesertSand.mat"); RespawnStatueRootsMaterial = peakBundle.LoadAsset("M_UnnamedForest_rock.mat"); RespawnStatueTropicsMaterial = peakBundle.LoadAsset("M_UnnamedRock 1.mat"); RespawnStatueShoreMaterial = peakBundle.LoadAsset("M_UnnamedSaltRock.mat"); RespawnStatueRockVFXMaterial = peakBundle.LoadAsset("M_UnnamedRock_staticTopColour.mat"); PlaneMaterials = new Dictionary(); string[] array3 = new string[10] { "Plane", "Plane 1", "Plane 3", "Plane 4", "Plane cleaner", "Plane Glass", "Plane seat", "Plane-snow", "PlaneWings", "PlaneWings-snow" }; string[] array4 = array3; foreach (string text in array4) { Material val20 = peakBundle.LoadAsset("M_Unnamed" + text + ".mat"); val20.shader = ThrowHelper.ThrowIfArgumentNull(Shader.Find(((Object)val20.shader).name), "Shader.Find(planeMaterial.shader.name)"); Log.LogInfo((object)("Added plane material named " + ((Object)val20).name + ".")); PlaneMaterials[text] = val20; } MirageMaterials = new Dictionary(); string[] array5 = new string[6] { "Luggage_Large_Mirage", "Luggage_Ancient_Mirage", "Luggage_AncientChain_Mirage", "Luggage_AncientCrystal_Mirage", "Luggage-mirage", "Luggage_Epic_Mirage" }; string[] array6 = array5; foreach (string text2 in array6) { Material val21 = peakBundle.LoadAsset("M_Unnamed" + text2 + ".mat"); val21.shader = ThrowHelper.ThrowIfArgumentNull(Shader.Find(((Object)val21.shader).name), "Shader.Find(mirageMaterial.shader.name)"); Log.LogInfo((object)("Added mirage material named " + ((Object)val21).name + ".")); MirageMaterials[text2] = val21; } SmallLuggageMaterial.shader = ThrowHelper.ThrowIfArgumentNull(Shader.Find(((Object)SmallLuggageMaterial.shader).name), "Shader.Find(SmallLuggageMaterial.shader.name)"); SmallLuggageInteriorMaterial.shader = ThrowHelper.ThrowIfArgumentNull(Shader.Find(((Object)SmallLuggageInteriorMaterial.shader).name), "Shader.Find(SmallLuggageInteriorMaterial.shader.name)"); EpicLuggageMaterial.shader = ThrowHelper.ThrowIfArgumentNull(Shader.Find(((Object)EpicLuggageMaterial.shader).name), "Shader.Find(EpicLuggageMaterial.shader.name)"); LargeLuggageMaterial.shader = ThrowHelper.ThrowIfArgumentNull(Shader.Find(((Object)LargeLuggageMaterial.shader).name), "Shader.Find(LargeLuggageMaterial.shader.name)"); LargeLuggageInteriorMaterial.shader = ThrowHelper.ThrowIfArgumentNull(Shader.Find(((Object)LargeLuggageInteriorMaterial.shader).name), "Shader.Find(LargeLuggageInteriorMaterial.shader.name)"); AncientLuggageMaterial.shader = ThrowHelper.ThrowIfArgumentNull(Shader.Find(((Object)AncientLuggageMaterial.shader).name), "Shader.Find(AncientLuggageMaterial.shader.name)"); AncientLuggageMetalMaterial.shader = ThrowHelper.ThrowIfArgumentNull(Shader.Find(((Object)AncientLuggageMetalMaterial.shader).name), "Shader.Find(AncientLuggageMetalMaterial.shader.name)"); AncientLuggageCrystalMaterial.shader = ThrowHelper.ThrowIfArgumentNull(Shader.Find(((Object)AncientLuggageCrystalMaterial.shader).name), "Shader.Find(AncientLuggageCrystalMaterial.shader.name)"); RespawnStatueRockVFXMaterial.shader = ThrowHelper.ThrowIfArgumentNull(Shader.Find(((Object)RespawnStatueRockVFXMaterial.shader).name), "Shader.Find(RespawnStatueRockVFXMaterial.shader.name)"); RespawnStatueCalderaMaterial.shader = ThrowHelper.ThrowIfArgumentNull(Shader.Find(((Object)RespawnStatueCalderaMaterial.shader).name), "Shader.Find(RespawnStatueCalderaMaterial.shader.name)"); RespawnStatueAlpineMaterial.shader = ThrowHelper.ThrowIfArgumentNull(Shader.Find(((Object)RespawnStatueAlpineMaterial.shader).name), "Shader.Find(RespawnStatueAlpineMaterial.shader.name)"); RespawnStatueMesaMaterial.shader = ThrowHelper.ThrowIfArgumentNull(Shader.Find(((Object)RespawnStatueMesaMaterial.shader).name), "Shader.Find(RespawnStatueMesaMaterial.shader.name)"); RespawnStatueRootsMaterial.shader = ThrowHelper.ThrowIfArgumentNull(Shader.Find(((Object)RespawnStatueRootsMaterial.shader).name), "Shader.Find(RespawnStatueRootsMaterial.shader.name)"); RespawnStatueTropicsMaterial.shader = ThrowHelper.ThrowIfArgumentNull(Shader.Find(((Object)RespawnStatueTropicsMaterial.shader).name), "Shader.Find(RespawnStatueTropicsMaterial.shader.name)"); RespawnStatueShoreMaterial.shader = ThrowHelper.ThrowIfArgumentNull(Shader.Find(((Object)RespawnStatueShoreMaterial.shader).name), "Shader.Find(RespawnStatueShoreMaterial.shader.name)"); Log.LogInfo((object)("Added material named " + ((Object)SmallLuggageMaterial).name + ".")); Log.LogInfo((object)("Added material named " + ((Object)SmallLuggageInteriorMaterial).name + ".")); Log.LogInfo((object)("Added material named " + ((Object)EpicLuggageMaterial).name + ".")); Log.LogInfo((object)("Added material named " + ((Object)LargeLuggageMaterial).name + ".")); Log.LogInfo((object)("Added material named " + ((Object)LargeLuggageInteriorMaterial).name + ".")); Log.LogInfo((object)("Added material named " + ((Object)AncientLuggageMaterial).name + ".")); Log.LogInfo((object)("Added material named " + ((Object)AncientLuggageMetalMaterial).name + ".")); Log.LogInfo((object)("Added material named " + ((Object)AncientLuggageCrystalMaterial).name + ".")); Log.LogInfo((object)("Added material named " + ((Object)RespawnStatueRockVFXMaterial).name + ".")); Log.LogInfo((object)("Added material named " + ((Object)RespawnStatueCalderaMaterial).name + ".")); Log.LogInfo((object)("Added material named " + ((Object)RespawnStatueAlpineMaterial).name + ".")); Log.LogInfo((object)("Added material named " + ((Object)RespawnStatueMesaMaterial).name + ".")); Log.LogInfo((object)("Added material named " + ((Object)RespawnStatueRootsMaterial).name + ".")); Log.LogInfo((object)("Added material named " + ((Object)RespawnStatueTropicsMaterial).name + ".")); Log.LogInfo((object)("Added material named " + ((Object)RespawnStatueShoreMaterial).name + ".")); List list2 = new List(34) { 0, 1, 2, 7, 115, 17, 18, 24, 106, 27, 29, 32, 152, 99, 33, 70, 35, 42, 43, 44, 58, 98, 61, 62, 100, 63, 64, 65, 107, 66, 67, 71, 104, 73 }; int num5 = 0; Item val22 = default(Item); for (int count = list2.Count; num5 < count; num5++) { ushort num6 = list2[num5]; if (ItemDatabase.TryGetItem(num6, ref val22)) { string itemName = val22.UIData.itemName; GameObject go = GenerateInstancedVariant(((Component)val22).gameObject, CleanItemName(((Object)((Component)val22).gameObject).name)); Item it = go.gameObject.GetComponent(); CopyUnnamedMaterials(ref go, peakBundle); CopyUnnamedIcons(ref it, peakBundle); PopulateUnnamedData(ref it, peakBundle); CopyExplosionData(ref it, peakBundle); LootData component3 = go.gameObject.GetComponent(); Object.Destroy((Object)(object)component3); AddItemToDatabase(itemName, go.gameObject); if (itemName == "Lantern") { GameObject gameObject2 = ((Component)it).gameObject; ((Object)gameObject2).name = ((Object)gameObject2).name + "_lant"; } new ItemContent(it).Register(ModDefinition.GetOrCreate(((BaseUnityPlugin)this).Info)); } } BigUnnamedLuggagePrefab = GenerateUnnamedLuggagePrefab("0_Items/LuggageBig"); SmallUnnamedLuggagePrefab = GenerateUnnamedLuggagePrefab("0_Items/LuggageSmall"); EpicUnnamedLuggagePrefab = GenerateUnnamedLuggagePrefab("0_Items/LuggageEpic"); AncientUnnamedLuggagePrefab = GenerateUnnamedLuggagePrefab("0_Items/LuggageAncient"); GameObject val23 = peakBundle.LoadAsset("UnnamedAirportSetup.prefab"); ShaderExtensions.ReplaceShaders(val23); TextMeshProUGUI componentInChildren2 = val23.GetComponentInChildren(true); ((TMP_Text)componentInChildren2).font = DarumaDropOne; ((TMP_Text)componentInChildren2).lineSpacing = -50f; Material val24 = (((Graphic)componentInChildren2).material = DarumaDropOneShadowMaterial); item = (((TMP_Text)componentInChildren2).fontMaterial = val24); ((TMP_Text)componentInChildren2).fontSharedMaterial = item; LocalizedText orAddComponent18 = ExtGameObject.GetOrAddComponent(((Component)componentInChildren2).gameObject); orAddComponent18.fontStyle = (FontStyle)1; orAddComponent18.index = "KIOSK_READY_TEXT"; orAddComponent18.tmp = (TMP_Text)(object)componentInChildren2; orAddComponent18.autoSet = true; UnnamedKioskSetup = val23; GameObject val26 = peakBundle.LoadAsset("UnnamedBrokenStandee.prefab"); ShaderExtensions.ReplaceShaders(val26); UnnamedBrokenStandeeSetup = val26; peakBundle.Mod.RegisterContent(); Log.LogInfo((object)"Unnamed items are loaded!"); }); BundleLoader.LoadBundleWithName((BaseUnityPlugin)(object)this, "unnamedui.peakbundle", (Action)delegate(PeakBundle bundle) { GameObject val2 = bundle.LoadAsset("UnnamedGarbageBagWheel.prefab"); UnnamedGarbageBagScreen unnamedGarbageBagScreen = val2.AddComponent(); ((UIWheel)unnamedGarbageBagScreen).maxCursorDistance = 190f; unnamedGarbageBagScreen.chosenItemText = ((Component)((Component)unnamedGarbageBagScreen).transform.Find("SelectedItemName")).GetComponent(); unnamedGarbageBagScreen.currentlyHeldItem = ((Component)((Component)unnamedGarbageBagScreen).transform.Find("HeldItem")).GetComponent(); ShaderExtensions.ReplaceShaders(val2); int i = 0; BackpackWheelSlice val3 = default(BackpackWheelSlice); BackpackWheelSlice val4 = default(BackpackWheelSlice); for (int childCount = val2.transform.Find("Wheel").childCount; i < childCount; i++) { Transform child = val2.transform.Find("Wheel").GetChild(i); if (((Object)child).name == "UI_PickupZone") { UnnamedGarbageBagZone orAddComponent = ExtGameObject.GetOrAddComponent(((Component)child).gameObject); orAddComponent.image = ((Component)((Component)orAddComponent).transform.Find("Segment")).GetComponentInChildren(); ((UIWheelSlice)orAddComponent).button = ((Component)orAddComponent).GetComponent