Decompiled source of LCGoldScrapMod v1.7.3
LCGoldScrapMod.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; 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.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using HarmonyLib.Tools; using LCGoldScrapMod.NetcodePatcher; using Microsoft.CodeAnalysis; using Unity.Netcode; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: AssemblyCompany("LCGoldScrapMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Add 30 rare gold versions of scrap that comes with a great risk and even greater reward!")] [assembly: AssemblyFileVersion("1.7.3.0")] [assembly: AssemblyInformationalVersion("1.7.3")] [assembly: AssemblyProduct("LCGoldScrapMod")] [assembly: AssemblyTitle("LCGoldScrapMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.7.3.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] internal class <Module> { static <Module>() { } } namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [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 LCGoldScrapMod { public class GoldScrapMethodsAwake { public enum GoldScrapLevels { Experimentation, Assurance, Vow, Offense, March, Rend, Dine, Titan, Adamance, Artifice, Embrion } public static bool AlreadyAddedGoldScrapOnAwake; public static bool AlreadyAddedGoldScrapOnModded; public static void SetAllItemsAwake() { if (!AlreadyAddedGoldScrapOnAwake) { GoldBolt(); GoldenAirhorn(); GoldenEggbeater(); TalkativeGoldBar(); GoldRegister(); GoldenBoots(); GoldenHorn(); PurifiedMask(); GoldAxle(); GoldJug(); GoldenBell(); GoldenGlass(); GoldMug(); GoldenFlask(); DuckOfGold(); GoldSign(); GoldPuzzle(); ComedyGold(); CookieGoldPan(); GolderBar(); Marigold(); GoldenGrunt(); CuddlyGold(); Goldkeeper(); GoldSpring(); GoldenGuardian(); GoldTypeEngine(); TiltControls(); JacobsLadder(); GoldToyRobot(); Plugin.ConfigSetCustomGoldScrapValues(); AlreadyAddedGoldScrapOnAwake = true; } } public static void RegisterGoldScrapVanilla(Item ItemName, float ItemRarity, GoldScrapLevels[] LevelsToAddMinus, GoldScrapLevels[] LevelsToAddDefault, GoldScrapLevels[] LevelsToAddPlus) { //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Expected O, but got Unknown //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Expected O, but got Unknown float num = 0.34f / Plugin.Config.configRarityMultiplier.Value; float num2 = 0.67f * Plugin.Config.configRarityMultiplier.Value; SelectableLevel[] levels = StartOfRound.Instance.levels; foreach (SelectableLevel val in levels) { for (int j = 0; j < LevelsToAddMinus.Length; j++) { GoldScrapLevels goldScrapLevels = LevelsToAddMinus[j]; string text = goldScrapLevels.ToString(); if (!Plugin.ConfigIsLevelSelected(text)) { continue; } string text2 = text + "Level"; if (((Object)val).name == text2) { SpawnableItemWithRarity val2 = new SpawnableItemWithRarity(); val2.spawnableItem = ItemName; val2.rarity = (int)(ItemRarity - num); if (val2.rarity < 1) { val2.rarity = 1; } else if (val2.rarity > 100) { val2.rarity = 100; } val.spawnableScrap.Add(val2); } } for (int k = 0; k < LevelsToAddDefault.Length; k++) { GoldScrapLevels goldScrapLevels2 = LevelsToAddDefault[k]; string text3 = goldScrapLevels2.ToString(); if (!Plugin.ConfigIsLevelSelected(text3)) { continue; } string text4 = text3 + "Level"; if (((Object)val).name == text4) { SpawnableItemWithRarity val3 = new SpawnableItemWithRarity(); val3.spawnableItem = ItemName; val3.rarity = (int)ItemRarity; if (val3.rarity < 1) { val3.rarity = 1; } else if (val3.rarity > 100) { val3.rarity = 100; } val.spawnableScrap.Add(val3); } } for (int l = 0; l < LevelsToAddPlus.Length; l++) { GoldScrapLevels goldScrapLevels3 = LevelsToAddPlus[l]; string text5 = goldScrapLevels3.ToString(); if (!Plugin.ConfigIsLevelSelected(text5)) { continue; } string text6 = text5 + "Level"; if (((Object)val).name == text6) { SpawnableItemWithRarity val4 = new SpawnableItemWithRarity(); val4.spawnableItem = ItemName; val4.rarity = (int)(ItemRarity + num2); if (val4.rarity < 1) { val4.rarity = 1; } else if (val4.rarity > 100) { val4.rarity = 100; } val.spawnableScrap.Add(val4); } } } } public static void RegisterGoldScrapModded() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown SelectableLevel[] levels = StartOfRound.Instance.levels; foreach (SelectableLevel val in levels) { Item[] allGoldScrap = Plugin.AllGoldScrap; foreach (Item val2 in allGoldScrap) { if (((Object)val2).name.Contains("LCGoldScrapMod") && val.levelID > Plugin.SuspectedLevelListLength && Plugin.GetMoonTravelCost(val.levelID) >= Plugin.Config.configModdedMoonCost.Value) { SpawnableItemWithRarity val3 = new SpawnableItemWithRarity(); val3.spawnableItem = val2; val3.rarity = Plugin.Config.configModdedMoonRarity.Value; val.spawnableScrap.Add(val3); } } } AlreadyAddedGoldScrapOnModded = true; } public static void GoldBolt() { string text = "GoldBolt"; float itemRarity = 0.67f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.GoldBoltWeightDefault = val.weight; GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[2] { GoldScrapLevels.Experimentation, GoldScrapLevels.Assurance }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[5] { GoldScrapLevels.Vow, GoldScrapLevels.Rend, GoldScrapLevels.Dine, GoldScrapLevels.Adamance, GoldScrapLevels.Embrion }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[4] { GoldScrapLevels.Offense, GoldScrapLevels.March, GoldScrapLevels.Titan, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void GoldenAirhorn() { string text = "GoldenAirhorn"; float itemRarity = 0.67f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.GoldenAirhornWeightDefault = val.weight; if (Plugin.Config.configToolsRebalance.Value) { val.isConductiveMetal = false; ((GrabbableObject)val.spawnPrefab.GetComponent<NoisemakerProp>()).useCooldown = 2f; Plugin.Logger.LogInfo((object)"Config [Other Tools Balance] is set to TRUE. Rebalancing Golden Airhorn..."); } GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[3] { GoldScrapLevels.Experimentation, GoldScrapLevels.Assurance, GoldScrapLevels.Vow }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[4] { GoldScrapLevels.Offense, GoldScrapLevels.March, GoldScrapLevels.Titan, GoldScrapLevels.Adamance }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[4] { GoldScrapLevels.Embrion, GoldScrapLevels.Rend, GoldScrapLevels.Dine, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void GoldenEggbeater() { string text = "GoldenEggbeater"; float itemRarity = 1f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.GoldenEggbeaterWeightDefault = val.weight; GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[2] { GoldScrapLevels.Experimentation, GoldScrapLevels.Assurance }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[3] { GoldScrapLevels.Vow, GoldScrapLevels.Adamance, GoldScrapLevels.Titan }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[1] { GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void TalkativeGoldBar() { string text = "TalkativeGoldBar"; float itemRarity = 0.67f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.TalkativeGoldBarWeightDefault = val.weight; GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[2] { GoldScrapLevels.Assurance, GoldScrapLevels.Vow }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[4] { GoldScrapLevels.Rend, GoldScrapLevels.Dine, GoldScrapLevels.Titan, GoldScrapLevels.Embrion }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[3] { GoldScrapLevels.Offense, GoldScrapLevels.Adamance, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void GoldRegister() { string text = "GoldRegister"; float itemRarity = 0.34f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.GoldRegisterWeightDefault = val.weight; if (Plugin.Config.configToolsRebalance.Value) { val.isConductiveMetal = false; val.toolTips = null; Plugin.Logger.LogInfo((object)"Config [Other Tools Balance] is set to TRUE. Rebalancing Gold Register..."); } GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[0]; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[6] { GoldScrapLevels.Experimentation, GoldScrapLevels.Assurance, GoldScrapLevels.Vow, GoldScrapLevels.March, GoldScrapLevels.Rend, GoldScrapLevels.Titan }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[3] { GoldScrapLevels.Dine, GoldScrapLevels.Adamance, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void GoldenBoots() { string text = "GoldenBoots"; float itemRarity = 1f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.GoldenBootsWeightDefault = val.weight; GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[0]; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[4] { GoldScrapLevels.Rend, GoldScrapLevels.Dine, GoldScrapLevels.Titan, GoldScrapLevels.Embrion }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[1] { GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void GoldenHorn() { string text = "GoldenHorn"; float itemRarity = 0.67f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.GoldenHornWeightDefault = val.weight; if (Plugin.Config.configToolsRebalance.Value) { val.isConductiveMetal = false; val.spawnPrefab.GetComponent<AudioSource>().maxDistance = 10f; ((Component)val.spawnPrefab.transform.GetChild(1)).gameObject.GetComponent<AudioSource>().maxDistance = 30f; Plugin.Logger.LogInfo((object)"Config [Other Tools Balance] is set to TRUE. Rebalancing Golden Horn..."); } GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[3] { GoldScrapLevels.Experimentation, GoldScrapLevels.Assurance, GoldScrapLevels.Vow }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[6] { GoldScrapLevels.Offense, GoldScrapLevels.Rend, GoldScrapLevels.Dine, GoldScrapLevels.Titan, GoldScrapLevels.Adamance, GoldScrapLevels.Embrion }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[2] { GoldScrapLevels.March, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void PurifiedMask() { string text = "PurifiedMask"; float itemRarity = 0.67f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.PurifiedMaskWeightDefault = val.weight; if (Plugin.Config.configToolsRebalance.Value) { val.isConductiveMetal = false; val.toolTips = null; Plugin.Logger.LogInfo((object)"Config [Other Tools Balance] is set to TRUE. Rebalancing Purified Mask..."); } GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[1] { GoldScrapLevels.Assurance }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[2] { GoldScrapLevels.Dine, GoldScrapLevels.Titan }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[2] { GoldScrapLevels.Rend, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void GoldAxle() { string text = "GoldAxle"; float itemRarity = 1f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.GoldAxleWeightDefault = val.weight; GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[3] { GoldScrapLevels.Experimentation, GoldScrapLevels.Assurance, GoldScrapLevels.Vow }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[4] { GoldScrapLevels.Rend, GoldScrapLevels.Titan, GoldScrapLevels.Adamance, GoldScrapLevels.Embrion }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[4] { GoldScrapLevels.Offense, GoldScrapLevels.March, GoldScrapLevels.Dine, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void GoldJug() { string text = "GoldJug"; float itemRarity = 1.34f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.GoldJugWeightDefault = val.weight; GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[1] { GoldScrapLevels.Adamance }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[2] { GoldScrapLevels.Vow, GoldScrapLevels.Titan }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[1] { GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void GoldenBell() { string text = "GoldenBell"; float itemRarity = 0.67f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.GoldenBellWeightDefault = val.weight; if (Plugin.Config.configToolsRebalance.Value) { val.isConductiveMetal = false; val.spawnPrefab.GetComponent<AnimatedItem>().noiseRange = 128f; Plugin.Logger.LogInfo((object)"Config [Other Tools Balance] is set to TRUE. Rebalancing Golden Bell..."); } GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[1] { GoldScrapLevels.Assurance }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[2] { GoldScrapLevels.Vow, GoldScrapLevels.Adamance }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[4] { GoldScrapLevels.Titan, GoldScrapLevels.Rend, GoldScrapLevels.Dine, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void GoldenGlass() { string text = "GoldenGlass"; float itemRarity = 0.67f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.GoldenGlassWeightDefault = val.weight; if (Plugin.Config.configToolsRebalance.Value) { val.isConductiveMetal = false; val.canBeInspected = false; val.toolTips = null; Material[] materials = (Material[])(object)new Material[2] { Plugin.CustomGoldScrapAssets.LoadAsset<Material>("Assets/GoldScrapVisuals/DefaultMaterialGold.mat"), Plugin.CustomGoldScrapAssets.LoadAsset<Material>("Assets/GoldScrapVisuals/DefaultMaterialGold.mat") }; ((Renderer)val.spawnPrefab.GetComponent<MeshRenderer>()).materials = materials; Plugin.Logger.LogInfo((object)"Config [Other Tools Balance] is set to TRUE. Rebalancing Golden Glass..."); } GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[2] { GoldScrapLevels.Assurance, GoldScrapLevels.Vow }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[3] { GoldScrapLevels.Titan, GoldScrapLevels.Adamance, GoldScrapLevels.Embrion }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[5] { GoldScrapLevels.Offense, GoldScrapLevels.Dine, GoldScrapLevels.March, GoldScrapLevels.Rend, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void GoldMug() { string text = "GoldMug"; float itemRarity = 1f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.GoldMugWeightDefault = val.weight; GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[2] { GoldScrapLevels.Assurance, GoldScrapLevels.Adamance }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[3] { GoldScrapLevels.Vow, GoldScrapLevels.Dine, GoldScrapLevels.Titan }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[2] { GoldScrapLevels.Rend, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void GoldenFlask() { string text = "GoldenFlask"; float itemRarity = 1f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.GoldenFlaskWeightDefault = val.weight; GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[2] { GoldScrapLevels.Experimentation, GoldScrapLevels.Assurance }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[2] { GoldScrapLevels.Vow, GoldScrapLevels.Titan }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[2] { GoldScrapLevels.March, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void DuckOfGold() { string text = "DuckOfGold"; float itemRarity = 1f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.DuckOfGoldWeightDefault = val.weight; GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[1] { GoldScrapLevels.Vow }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[3] { GoldScrapLevels.Adamance, GoldScrapLevels.Rend, GoldScrapLevels.Titan }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[2] { GoldScrapLevels.Dine, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void GoldSign() { string text = "GoldSign"; float itemRarity = 0.67f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); if (Plugin.Config.configToolsRebalance.Value) { val.isConductiveMetal = false; Plugin.GoldSignWeightDefault = 1.42f; Plugin.Logger.LogInfo((object)"Config [Other Tools Balance] is set to TRUE. Rebalancing Gold Sign..."); } else { Plugin.GoldSignWeightDefault = val.weight; } GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[2] { GoldScrapLevels.Assurance, GoldScrapLevels.Vow }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[1] { GoldScrapLevels.Titan }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[4] { GoldScrapLevels.Embrion, GoldScrapLevels.Offense, GoldScrapLevels.March, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void GoldPuzzle() { string text = "GoldPuzzle"; float itemRarity = 1f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.GoldPuzzleWeightDefault = val.weight; GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[1] { GoldScrapLevels.Assurance }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[6] { GoldScrapLevels.Vow, GoldScrapLevels.Offense, GoldScrapLevels.March, GoldScrapLevels.Rend, GoldScrapLevels.Titan, GoldScrapLevels.Adamance }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[3] { GoldScrapLevels.Dine, GoldScrapLevels.Embrion, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void ComedyGold() { string text = "ComedyGold"; float itemRarity = 0.67f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject spawnPrefab = val.spawnPrefab; GameObject gameObject = ((Component)spawnPrefab.transform.Find("Trigger")).gameObject; if (Plugin.v60Compatible) { SetWhoopieCushionV60(gameObject, spawnPrefab); } else { SetWhoopieCushionV56(gameObject, spawnPrefab); } Plugin.ComedyGoldWeightDefault = val.weight; if (Plugin.Config.configToolsRebalance.Value) { val.isConductiveMetal = false; Plugin.Logger.LogInfo((object)"Config [Other Tools Balance] is set to TRUE. Rebalancing Comedy Gold..."); } GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[2] { GoldScrapLevels.Assurance, GoldScrapLevels.Vow }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[2] { GoldScrapLevels.Titan, GoldScrapLevels.Adamance }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[2] { GoldScrapLevels.Dine, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } private static void SetWhoopieCushionV60(GameObject TriggerPrefab, GameObject ItemPrefab) { TriggerPrefab.AddComponent<GrabbableObjectPhysicsTrigger>().itemScript = ItemPrefab.GetComponent<GrabbableObject>(); } private static void SetWhoopieCushionV56(GameObject TriggerPrefab, GameObject ItemPrefab) { foreach (Item items in StartOfRound.Instance.allItemsList.itemsList) { if (((Object)items).name == null || !(((Object)items).name == "WhoopieCushion")) { continue; } GameObject gameObject = ((Component)items.spawnPrefab.transform.Find("Trigger")).gameObject; MonoBehaviour[] components = gameObject.GetComponents<MonoBehaviour>(); MonoBehaviour[] array = components; foreach (MonoBehaviour val in array) { if (((object)val).GetType().Name == "WhoopieCushionTrigger") { object obj = TriggerPrefab.AddComponent(((object)val).GetType()); obj.GetType().GetField("itemScript").SetValue(obj, ItemPrefab.GetComponent<WhoopieCushionItem>()); Plugin.Logger.LogInfo((object)string.Format("implemented component {0} onto {1} with value {2} during runtime since v60 compatibility is {3}", ((object)val).GetType(), TriggerPrefab, obj.GetType().GetField("itemScript").GetValue(obj), Plugin.v60Compatible)); return; } } } } public static void CookieGoldPan() { string text = "CookieGoldPan"; float itemRarity = 1f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.CookieGoldPanWeightDefault = val.weight; GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[3] { GoldScrapLevels.Experimentation, GoldScrapLevels.Assurance, GoldScrapLevels.Vow }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[2] { GoldScrapLevels.Titan, GoldScrapLevels.Adamance }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[4] { GoldScrapLevels.Offense, GoldScrapLevels.March, GoldScrapLevels.Embrion, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void GolderBar() { string text = "GolderBar"; float itemRarity = 0.34f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.GolderBarWeightDefault = val.weight; GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[0]; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[2] { GoldScrapLevels.Experimentation, GoldScrapLevels.March }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[2] { GoldScrapLevels.Titan, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void CuddlyGold() { string text = "CuddlyGold"; float itemRarity = 0.67f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.CuddlyGoldWeightDefault = val.weight; GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[2] { GoldScrapLevels.Experimentation, GoldScrapLevels.Assurance }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[2] { GoldScrapLevels.Vow, GoldScrapLevels.Titan }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[1] { GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void GoldenGrunt() { string text = "GoldenGrunt"; float itemRarity = 0.67f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.GoldenGruntWeightDefault = val.weight; GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[3] { GoldScrapLevels.Experimentation, GoldScrapLevels.Assurance, GoldScrapLevels.Vow }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[5] { GoldScrapLevels.Offense, GoldScrapLevels.March, GoldScrapLevels.Adamance, GoldScrapLevels.Dine, GoldScrapLevels.Embrion }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[3] { GoldScrapLevels.Rend, GoldScrapLevels.Titan, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void Goldkeeper() { string text = "Goldkeeper"; float itemRarity = 1.34f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.GoldkeeperWeightDefault = val.weight; GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[1] { GoldScrapLevels.Dine }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[3] { GoldScrapLevels.Vow, GoldScrapLevels.March, GoldScrapLevels.Titan }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[1] { GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void GoldSpring() { string text = "GoldSpring"; float itemRarity = 1f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.GoldSpringWeightDefault = val.weight; GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[1] { GoldScrapLevels.Embrion }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[2] { GoldScrapLevels.Offense, GoldScrapLevels.Titan }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[2] { GoldScrapLevels.Rend, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void Marigold() { string text = "Marigold"; float itemRarity = 0.67f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.MarigoldWeightDefault = val.weight; GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[1] { GoldScrapLevels.Rend }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[2] { GoldScrapLevels.March, GoldScrapLevels.Titan }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[2] { GoldScrapLevels.Vow, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void GoldenGuardian() { string text = "GoldenGuardian"; float itemRarity = 1f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.GoldenGuardianWeightDefault = val.weight; GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[1] { GoldScrapLevels.March }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[4] { GoldScrapLevels.Rend, GoldScrapLevels.Embrion, GoldScrapLevels.Dine, GoldScrapLevels.Titan }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[1] { GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void GoldTypeEngine() { string text = "GoldTypeEngine"; float itemRarity = 1f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.GoldTypeEngineWeightDefault = val.weight; GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[3] { GoldScrapLevels.Experimentation, GoldScrapLevels.Assurance, GoldScrapLevels.Vow }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[3] { GoldScrapLevels.Dine, GoldScrapLevels.Titan, GoldScrapLevels.Adamance }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[5] { GoldScrapLevels.Offense, GoldScrapLevels.March, GoldScrapLevels.Rend, GoldScrapLevels.Embrion, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void TiltControls() { string text = "TiltControls"; float itemRarity = 1f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.TiltControlsWeightDefault = val.weight; GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[3] { GoldScrapLevels.Experimentation, GoldScrapLevels.Assurance, GoldScrapLevels.Adamance }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[2] { GoldScrapLevels.Vow, GoldScrapLevels.Titan }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[1] { GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void JacobsLadder() { string text = "JacobsLadder"; float itemRarity = 0.67f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.JacobsLadderWeightDefault = val.weight; if (Plugin.Config.configToolsRebalance.Value) { val.isConductiveMetal = false; val.batteryUsage *= 0.75f; Plugin.Logger.LogInfo((object)"Config [Other Tools Balance] is set to TRUE. Rebalancing Jacob's Ladder..."); } GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[3] { GoldScrapLevels.Experimentation, GoldScrapLevels.Assurance, GoldScrapLevels.Vow }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[4] { GoldScrapLevels.Rend, GoldScrapLevels.Dine, GoldScrapLevels.Titan, GoldScrapLevels.Adamance }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[4] { GoldScrapLevels.Embrion, GoldScrapLevels.Offense, GoldScrapLevels.March, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } public static void GoldToyRobot() { string text = "GoldToyRobot"; float itemRarity = 1f * Plugin.Config.configRarityMultiplier.Value; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); Plugin.GoldToyRobotWeightDefault = val.weight; if (Plugin.Config.configToolsRebalance.Value) { val.isConductiveMetal = false; val.spawnPrefab.GetComponent<AnimatedItem>().noiseRange = 30f; Plugin.Logger.LogInfo((object)"Config [Other Tools Balance] is set to TRUE. Rebalancing G.O.L.D...."); } GoldScrapLevels[] levelsToAddMinus = new GoldScrapLevels[2] { GoldScrapLevels.Assurance, GoldScrapLevels.Vow }; GoldScrapLevels[] levelsToAddDefault = new GoldScrapLevels[6] { GoldScrapLevels.Offense, GoldScrapLevels.March, GoldScrapLevels.Dine, GoldScrapLevels.Titan, GoldScrapLevels.Adamance, GoldScrapLevels.Embrion }; GoldScrapLevels[] levelsToAddPlus = new GoldScrapLevels[2] { GoldScrapLevels.Rend, GoldScrapLevels.Artifice }; RegisterGoldScrapVanilla(val, itemRarity, levelsToAddMinus, levelsToAddDefault, levelsToAddPlus); } } public class GoldScrapMethodsRuntime { public static void SetAllItemsRuntime() { SetGoldBoltRuntime(); SetGoldenAirhornRuntime(); SetGoldenEggbeaterRuntime(); SetTalkativeGoldBarRuntime(); SetGoldRegisterRuntime(); SetGoldenBootsRuntime(); SetGoldenHornRuntime(); SetPurifiedMaskRuntime(); SetGoldAxleRuntime(); SetGoldJugRuntime(); SetGoldenBellRuntime(); SetGoldenGlassRuntime(); SetGoldMugRuntime(); SetGoldenFlaskRuntime(); SetDuckOfGoldRuntime(); SetGoldSignRuntime(); SetGoldPuzzleRuntime(); SetComedyGoldRuntime(); SetCookieGoldPanRuntime(); SetGolderBarRuntime(); SetMarigoldRuntime(); SetGoldenGruntRuntime(); SetCuddlyGoldRuntime(); SetGoldkeeperRuntime(); SetGoldSpringRuntime(); SetGoldenGuardianRuntime(); SetGoldTypeEngineRuntime(); SetTiltControlsRuntime(); SetJacobsLadderRuntime(); SetGoldToyRobotRuntime(); SetGoldNuggetRuntime(); } public static void SetGoldBoltRuntime() { string text = "GoldBolt"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); if ((Object)(object)Plugin.GoldBoltMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); } else { component.mesh = Plugin.GoldBoltMesh; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("ShovelPickUp3"); val.dropSFX = Plugin.LoadSillySFX("DropMetalObjectLight1"); } else { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject1; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetGoldenAirhornRuntime() { string text = "GoldenAirhorn"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); NoisemakerProp component2 = val2.GetComponent<NoisemakerProp>(); if ((Object)(object)Plugin.GoldenAirhornMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(0f, 90f, 90f); ((Vector3)(ref val.rotationOffset)).Set(-3.5f, 92.3f, 177.3f); ((Vector3)(ref val.positionOffset)).Set(-0.06f, 0.14f, -0.05f); val.verticalOffset = 0.08f; } else { component.mesh = Plugin.GoldenAirhornMesh; ((Vector3)(ref val.restingRotation)).Set(0f, 90f, 90f); ((Vector3)(ref val.rotationOffset)).Set(-3.5f, 92.3f, 177.3f); ((Vector3)(ref val.positionOffset)).Set(-0.06f, 0.14f, 0.01f); val.verticalOffset = 0.06f; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("FlashlightGrab"); val.dropSFX = Plugin.LoadSillySFX("DropMetalObjectLight1"); component2.noiseSFX[0] = Plugin.LoadSillySFX("Airhorn"); component2.noiseSFXFar[0] = Plugin.LoadSillySFX("AirhornFar"); if (Plugin.Config.configToolsRebalance.Value) { ((GrabbableObject)component2).useCooldown = 5f; } else { ((GrabbableObject)component2).useCooldown = 2f; } component2.maxLoudness = 1f; component2.minLoudness = 0.95f; component2.maxPitch = 1f; component2.minPitch = 0.8f; } else if (!Plugin.Config.configSillyScrap.Value && Plugin.Config.configReplaceSFX.Value) { val.grabSFX = Plugin.SharedSFXFlashlightGrab; val.dropSFX = Plugin.SharedSFXDropMetalObject1; component2.noiseSFX[0] = Plugin.LoadReplaceSFX("AirhornSFX"); component2.noiseSFXFar[0] = Plugin.LoadReplaceSFX("AirhornFarSFX"); if (Plugin.Config.configToolsRebalance.Value) { ((GrabbableObject)component2).useCooldown = 5f; } else { ((GrabbableObject)component2).useCooldown = 0.1f; } component2.maxLoudness = 0.7f; component2.minLoudness = 0.6f; component2.maxPitch = 1f; component2.minPitch = 1f; } else if (!Plugin.Config.configSillyScrap.Value && !Plugin.Config.configReplaceSFX.Value && ((Object)(object)Plugin.SharedSFXAirhornNoise == (Object)null || (Object)(object)Plugin.SharedSFXAirhornFarNoise == (Object)null)) { val.grabSFX = Plugin.SharedSFXFlashlightGrab; val.dropSFX = Plugin.SharedSFXDropMetalObject1; component2.noiseSFX[0] = Plugin.LoadReplaceSFX("AirhornSFX"); component2.noiseSFXFar[0] = Plugin.LoadReplaceSFX("AirhornFarSFX"); if (Plugin.Config.configToolsRebalance.Value) { ((GrabbableObject)component2).useCooldown = 5f; } else { ((GrabbableObject)component2).useCooldown = 0.1f; } component2.maxLoudness = 0.7f; component2.minLoudness = 0.6f; component2.maxPitch = 1f; component2.minPitch = 1f; } else if (!Plugin.Config.configSillyScrap.Value && !Plugin.Config.configReplaceSFX.Value && (Object)(object)Plugin.SharedSFXAirhornNoise != (Object)null && (Object)(object)Plugin.SharedSFXAirhornFarNoise != (Object)null) { val.grabSFX = Plugin.SharedSFXFlashlightGrab; val.dropSFX = Plugin.SharedSFXDropMetalObject1; component2.noiseSFX[0] = Plugin.SharedSFXAirhornNoise; component2.noiseSFXFar[0] = Plugin.SharedSFXAirhornFarNoise; if (Plugin.Config.configToolsRebalance.Value) { ((GrabbableObject)component2).useCooldown = 5f; } else { ((GrabbableObject)component2).useCooldown = 2f; } component2.maxLoudness = 1f; component2.minLoudness = 0.95f; component2.maxPitch = 1f; component2.minPitch = 0.8f; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetGoldenEggbeaterRuntime() { string text = "GoldenEggbeater"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); if ((Object)(object)Plugin.GoldenEggbeaterMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); } else { component.mesh = Plugin.GoldenEggbeaterMesh; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("ShovelPickUp2"); val.dropSFX = Plugin.LoadSillySFX("DropMetalObjectMid3"); } else { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject1; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetTalkativeGoldBarRuntime() { string text = "TalkativeGoldBar"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); AnimatedItem component2 = val2.GetComponent<AnimatedItem>(); if ((Object)(object)Plugin.TalkativeGoldBarMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, -90f); ((Vector3)(ref val.rotationOffset)).Set(120f, -4.2f, -462.81f); ((Vector3)(ref val.positionOffset)).Set(0.15f, 0.16f, -0.08f); val.verticalOffset = 0.04f; } else { component.mesh = Plugin.TalkativeGoldBarMesh; ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, -90f); ((Vector3)(ref val.rotationOffset)).Set(145f, -4.2f, -462.81f); ((Vector3)(ref val.positionOffset)).Set(0.11f, 0.15f, -0.04f); val.verticalOffset = 0.04f; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("FlashlightGrab"); val.dropSFX = Plugin.LoadSillySFX("DropMetalObjectLight2"); component2.grabAudio = Plugin.LoadSillySFX("OldPhone"); component2.noiseLoudness = 0.5f; } else if (!Plugin.Config.configSillyScrap.Value && Plugin.Config.configReplaceSFX.Value) { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject1; component2.grabAudio = Plugin.LoadReplaceSFX("OldPhoneSFX"); component2.noiseLoudness = 0.5f; } else if (!Plugin.Config.configSillyScrap.Value && !Plugin.Config.configReplaceSFX.Value && (Object)(object)Plugin.SharedSFXOldPhoneNoise == (Object)null) { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject1; component2.grabAudio = Plugin.LoadReplaceSFX("OldPhoneSFX"); component2.noiseLoudness = 0.5f; } else if (!Plugin.Config.configSillyScrap.Value && !Plugin.Config.configReplaceSFX.Value && (Object)(object)Plugin.SharedSFXOldPhoneNoise != (Object)null) { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject1; component2.grabAudio = Plugin.SharedSFXOldPhoneNoise; component2.noiseLoudness = 0.2f; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetGoldRegisterRuntime() { string text = "GoldRegister"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); GameObject gameObject = ((Component)val2.transform.GetChild(1)).gameObject; GameObject gameObject2 = ((Component)val2.transform.GetChild(2).GetChild(0)).gameObject; GameObject gameObject3 = ((Component)val2.transform.GetChild(2).GetChild(1)).gameObject; NoisemakerProp component = val2.GetComponent<NoisemakerProp>(); MeshFilter component2 = gameObject.GetComponent<MeshFilter>(); MeshFilter component3 = gameObject2.GetComponent<MeshFilter>(); MeshFilter component4 = gameObject3.GetComponent<MeshFilter>(); if ((Object)(object)Plugin.GoldRegisterMainMesh == (Object)null || (Object)(object)Plugin.GoldRegisterCrankMesh == (Object)null || (Object)(object)Plugin.GoldRegisterDrawerMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component2.mesh = Plugin.LoadSillyMesh(text); } else { component2.mesh = Plugin.GoldRegisterMainMesh; component3.mesh = Plugin.GoldRegisterCrankMesh; component4.mesh = Plugin.GoldRegisterDrawerMesh; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("ShovelPickUp1"); val.dropSFX = Plugin.LoadSillySFX("DropMetalObjectHeavy2"); component.noiseSFX[0] = Plugin.LoadSillySFX("CashRegister"); ((GrabbableObject)component).useCooldown = 1.5f; component.maxLoudness = 1f; component.minLoudness = 0.9f; component.maxPitch = 1f; component.minPitch = 0.95f; } else if (!Plugin.Config.configSillyScrap.Value && Plugin.Config.configReplaceSFX.Value) { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject3; component.noiseSFX[0] = Plugin.LoadReplaceSFX("CashRegisterSFX"); ((GrabbableObject)component).useCooldown = 1f; component.maxLoudness = 1f; component.minLoudness = 0.9f; component.maxPitch = 1f; component.minPitch = 1f; } else if (!Plugin.Config.configSillyScrap.Value && !Plugin.Config.configReplaceSFX.Value && (Object)(object)Plugin.SharedSFXCashRegisterNoise == (Object)null) { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject3; component.noiseSFX[0] = Plugin.LoadReplaceSFX("CashRegisterSFX"); ((GrabbableObject)component).useCooldown = 1f; component.maxLoudness = 1f; component.minLoudness = 0.9f; component.maxPitch = 1f; component.minPitch = 1f; } else if (!Plugin.Config.configSillyScrap.Value && !Plugin.Config.configReplaceSFX.Value && (Object)(object)Plugin.SharedSFXCashRegisterNoise != (Object)null) { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject3; component.noiseSFX[0] = Plugin.SharedSFXCashRegisterNoise; ((GrabbableObject)component).useCooldown = 2.2f; component.maxLoudness = 1f; component.minLoudness = 0.9f; component.maxPitch = 1f; component.minPitch = 0.95f; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetGoldenBootsRuntime() { string text = "GoldenBoots"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); if ((Object)(object)Plugin.GoldenBootsMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 90f); ((Vector3)(ref val.rotationOffset)).Set(-70f, 90f, 180f); ((Vector3)(ref val.positionOffset)).Set(-0.2f, -0.2f, 0.2f); val.verticalOffset = 0.02f; } else { component.mesh = Plugin.GoldenBootsMesh; ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 0f); ((Vector3)(ref val.rotationOffset)).Set(-70f, 90f, 180f); ((Vector3)(ref val.positionOffset)).Set(0.2f, -0.1f, 0.15f); val.verticalOffset = 0.02f; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("GrabGoldenBoots"); val.dropSFX = Plugin.LoadSillySFX("DropGoldenBoots"); } else { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject1; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetGoldenHornRuntime() { string text = "GoldenHorn"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); NoisemakerProp component2 = val2.GetComponent<NoisemakerProp>(); if ((Object)(object)Plugin.GoldenHornMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 0f); ((Vector3)(ref val.rotationOffset)).Set(-196.6f, -71.3f, 0f); ((Vector3)(ref val.positionOffset)).Set(0.01f, 0.38f, 0.02f); val.verticalOffset = 0.06f; } else { component.mesh = Plugin.GoldenHornMesh; ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 0f); ((Vector3)(ref val.rotationOffset)).Set(-196.6f, -71.3f, 0f); ((Vector3)(ref val.positionOffset)).Set(-0.05f, 0.15f, 0.02f); val.verticalOffset = 0.06f; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("FlashlightGrab"); val.dropSFX = Plugin.LoadSillySFX("DropMetalObjectMid3"); component2.noiseSFX[0] = Plugin.LoadSillySFX("Clownhorn"); component2.noiseSFXFar[0] = Plugin.LoadSillySFX("ClownhornFar"); ((GrabbableObject)component2).useCooldown = 0.75f; component2.maxLoudness = 1f; component2.minLoudness = 0.6f; component2.maxPitch = 1f; component2.minPitch = 0.93f; } else if (!Plugin.Config.configSillyScrap.Value && Plugin.Config.configReplaceSFX.Value) { val.grabSFX = Plugin.SharedSFXFlashlightGrab; val.dropSFX = Plugin.SharedSFXDropMetalObject1; component2.noiseSFX[0] = Plugin.LoadReplaceSFX("ClownhornSFX"); component2.noiseSFXFar[0] = Plugin.LoadReplaceSFX("ClownhornFarSFX"); ((GrabbableObject)component2).useCooldown = 0.25f; component2.maxLoudness = 1f; component2.minLoudness = 0.9f; component2.maxPitch = 1f; component2.minPitch = 1f; } else if (!Plugin.Config.configSillyScrap.Value && !Plugin.Config.configReplaceSFX.Value && ((Object)(object)Plugin.SharedSFXClownhornNoise == (Object)null || (Object)(object)Plugin.SharedSFXClownhornFarNoise == (Object)null)) { val.grabSFX = Plugin.SharedSFXFlashlightGrab; val.dropSFX = Plugin.SharedSFXDropMetalObject1; component2.noiseSFX[0] = Plugin.LoadReplaceSFX("ClownhornSFX"); component2.noiseSFXFar[0] = Plugin.LoadReplaceSFX("ClownhornFarSFX"); ((GrabbableObject)component2).useCooldown = 0.25f; component2.maxLoudness = 1f; component2.minLoudness = 0.9f; component2.maxPitch = 1f; component2.minPitch = 1f; } else if (!Plugin.Config.configSillyScrap.Value && !Plugin.Config.configReplaceSFX.Value && (Object)(object)Plugin.SharedSFXClownhornNoise != (Object)null && (Object)(object)Plugin.SharedSFXClownhornFarNoise != (Object)null) { val.grabSFX = Plugin.SharedSFXFlashlightGrab; val.dropSFX = Plugin.SharedSFXDropMetalObject1; component2.noiseSFX[0] = Plugin.SharedSFXClownhornNoise; component2.noiseSFXFar[0] = Plugin.SharedSFXClownhornFarNoise; ((GrabbableObject)component2).useCooldown = 0.3f; component2.maxLoudness = 1f; component2.minLoudness = 0.6f; component2.maxPitch = 1f; component2.minPitch = 0.93f; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetPurifiedMaskRuntime() { string text = "PurifiedMask"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); HauntedMaskItem component2 = val2.GetComponent<HauntedMaskItem>(); component2.maskIsHaunted = false; if ((Object)(object)Plugin.PurifiedMaskMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 0f); ((Vector3)(ref val.rotationOffset)).Set(-86.75f, -59f, -0.05f); ((Vector3)(ref val.positionOffset)).Set(0.06f, 0.19f, -0.25f); val.verticalOffset = 0.1f; } else { component.mesh = Plugin.PurifiedMaskMesh; ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 0f); ((Vector3)(ref val.rotationOffset)).Set(-86.75f, -59f, -0.05f); ((Vector3)(ref val.positionOffset)).Set(0.06f, 0.19f, -0.25f); val.verticalOffset = 0.07f; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("GrabPurifiedMask"); val.dropSFX = Plugin.LoadSillySFX("DropPurifiedMask"); } else { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject1; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetGoldAxleRuntime() { string text = "GoldAxle"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); if ((Object)(object)Plugin.GoldAxleMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); } else { component.mesh = Plugin.GoldAxleMesh; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("ShovelPickUp1"); val.dropSFX = Plugin.LoadSillySFX("DropMetalObjectHeavy1"); } else { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject3; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetGoldJugRuntime() { string text = "GoldJug"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); if ((Object)(object)Plugin.GoldJugMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 0f); ((Vector3)(ref val.rotationOffset)).Set(200f, 20f, -90f); ((Vector3)(ref val.positionOffset)).Set(0.2f, 0.08f, 0.2f); val.verticalOffset = 0.3f; } else { component.mesh = Plugin.GoldJugMesh; ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 0f); ((Vector3)(ref val.rotationOffset)).Set(180f, 17.52f, 0f); ((Vector3)(ref val.positionOffset)).Set(-0.1f, 0.08f, 0.21f); val.verticalOffset = 0.2f; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("GrabGoldJug"); val.dropSFX = Plugin.LoadSillySFX("DropGoldJug"); } else { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject3; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetGoldenBellRuntime() { string text = "GoldenBell"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); AnimatedItem component2 = val2.GetComponent<AnimatedItem>(); if ((Object)(object)Plugin.GoldenBellMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 0f); ((Vector3)(ref val.rotationOffset)).Set(0f, 100f, -29.2f); ((Vector3)(ref val.positionOffset)).Set(0.1f, 0.1f, -0.04f); val.verticalOffset = 0.18f; } else { component.mesh = Plugin.GoldenBellMesh; ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 0f); ((Vector3)(ref val.rotationOffset)).Set(29.5f, 98f, -29.2f); ((Vector3)(ref val.positionOffset)).Set(-0.11f, 0.07f, -0.09f); val.verticalOffset = 0.18f; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("ShovelPickUp3"); val.dropSFX = Plugin.LoadSillySFX("DropBell"); component2.dropAudio = Plugin.LoadSillySFX("DropBell"); } else if (!Plugin.Config.configSillyScrap.Value && Plugin.Config.configReplaceSFX.Value) { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.LoadReplaceSFX("BellSFX"); component2.dropAudio = Plugin.LoadReplaceSFX("BellSFX"); } else if (!Plugin.Config.configSillyScrap.Value && !Plugin.Config.configReplaceSFX.Value && (Object)(object)Plugin.SharedSFXDropBell == (Object)null) { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.LoadReplaceSFX("BellSFX"); component2.dropAudio = Plugin.LoadReplaceSFX("BellSFX"); } else if (!Plugin.Config.configSillyScrap.Value && !Plugin.Config.configReplaceSFX.Value && (Object)(object)Plugin.SharedSFXDropBell != (Object)null) { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropBell; component2.dropAudio = Plugin.SharedSFXDropBell; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetGoldenGlassRuntime() { string text = "GoldenGlass"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); if ((Object)(object)Plugin.GoldenGlassMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(0f, 90f, -90f); ((Vector3)(ref val.rotationOffset)).Set(-10f, 100f, 115f); ((Vector3)(ref val.positionOffset)).Set(-0.04f, 0.08f, 0.025f); val.verticalOffset = 0.05f; } else { component.mesh = Plugin.GoldenGlassMesh; ((Vector3)(ref val.restingRotation)).Set(0f, 90f, -90f); ((Vector3)(ref val.rotationOffset)).Set(0f, 112.5f, 117.2f); ((Vector3)(ref val.positionOffset)).Set(-0.03f, 0.13f, 0.03f); val.verticalOffset = 0.05f; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("ShovelPickUp3"); val.dropSFX = Plugin.LoadSillySFX("DropMetalObjectLight3"); } else { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject1; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetGoldMugRuntime() { string text = "GoldMug"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); if ((Object)(object)Plugin.GoldMugMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 0f); ((Vector3)(ref val.rotationOffset)).Set(180f, -89.5f, -84.9f); ((Vector3)(ref val.positionOffset)).Set(0.02f, 0.19f, -0.08f); val.verticalOffset = 0.07f; } else { component.mesh = Plugin.GoldMugMesh; ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 0f); ((Vector3)(ref val.rotationOffset)).Set(180f, -89.5f, -84.8f); ((Vector3)(ref val.positionOffset)).Set(0.06f, 0.1f, -0.07f); val.verticalOffset = 0.07f; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("ShovelPickUp2"); val.dropSFX = Plugin.LoadSillySFX("DropMetalObjectLight1"); } else { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject1; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetGoldenFlaskRuntime() { string text = "GoldenFlask"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); if ((Object)(object)Plugin.GoldenFlaskMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(25f, 0f, 0f); ((Vector3)(ref val.rotationOffset)).Set(-7f, 96.1f, 0f); ((Vector3)(ref val.positionOffset)).Set(-0.29f, 0.04f, 0.03f); val.verticalOffset = 0.21f; } else { component.mesh = Plugin.GoldenFlaskMesh; ((Vector3)(ref val.restingRotation)).Set(25f, 0f, 0f); ((Vector3)(ref val.rotationOffset)).Set(-7f, 96.1f, 0f); ((Vector3)(ref val.positionOffset)).Set(-0.29f, 0.11f, 0f); val.verticalOffset = 0.21f; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("GrabBottle"); val.dropSFX = Plugin.LoadSillySFX("DropMetalObjectLight3"); } else { val.grabSFX = Plugin.SharedSFXGrabBottle; val.dropSFX = Plugin.SharedSFXDropGlass1; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetDuckOfGoldRuntime() { string text = "DuckOfGold"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); AnimatedItem component2 = val2.GetComponent<AnimatedItem>(); if ((Object)(object)Plugin.DuckOfGoldMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, -90f); ((Vector3)(ref val.rotationOffset)).Set(0f, 90f, 17.16f); ((Vector3)(ref val.positionOffset)).Set(0.06f, 0.1f, -0.15f); val.verticalOffset = 0.1f; } else { component.mesh = Plugin.DuckOfGoldMesh; ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, -90f); ((Vector3)(ref val.rotationOffset)).Set(0f, 90f, 17.16f); ((Vector3)(ref val.positionOffset)).Set(0.06f, 0.19f, -0.03f); val.verticalOffset = 0.01f; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("GrabDuck"); val.dropSFX = Plugin.LoadSillySFX("DropDuck"); component2.dropAudio = Plugin.LoadSillySFX("DropDuck"); } else if (!Plugin.Config.configSillyScrap.Value && Plugin.Config.configReplaceSFX.Value) { val.grabSFX = Plugin.LoadReplaceSFX("DuckSFX"); val.dropSFX = Plugin.LoadReplaceSFX("DropSFX"); component2.dropAudio = Plugin.LoadReplaceSFX("DropSFX"); } else if (!Plugin.Config.configSillyScrap.Value && !Plugin.Config.configReplaceSFX.Value && ((Object)(object)Plugin.SharedSFXGrabDuck == (Object)null || (Object)(object)Plugin.SharedSFXDropDuck == (Object)null)) { val.grabSFX = Plugin.LoadReplaceSFX("DuckSFX"); val.dropSFX = Plugin.LoadReplaceSFX("DropSFX"); component2.dropAudio = Plugin.LoadReplaceSFX("DropSFX"); } else if (!Plugin.Config.configSillyScrap.Value && !Plugin.Config.configReplaceSFX.Value && (Object)(object)Plugin.SharedSFXGrabDuck != (Object)null && (Object)(object)Plugin.SharedSFXDropDuck != (Object)null) { val.grabSFX = Plugin.SharedSFXGrabDuck; val.dropSFX = Plugin.SharedSFXDropDuck; component2.dropAudio = Plugin.SharedSFXGrabDuck; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetGoldSignRuntime() { string text = "GoldSign"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); Shovel component2 = val2.GetComponent<Shovel>(); if ((Object)(object)Plugin.GoldSignMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(0f, 0f, 168f); ((Vector3)(ref val.rotationOffset)).Set(-12.3f, -166.2f, -521.3f); ((Vector3)(ref val.positionOffset)).Set(-0.07f, -0.05f, 0.2f); val.verticalOffset = 0.15f; } else { component.mesh = Plugin.GoldSignMesh; ((Vector3)(ref val.restingRotation)).Set(0f, 90f, -90f); ((Vector3)(ref val.rotationOffset)).Set(-12.3f, -166.2f, -521.3f); ((Vector3)(ref val.positionOffset)).Set(-0.04f, -0.1f, 0.22f); val.verticalOffset = 0.07f; } AudioClip[] array = (AudioClip[])(object)new AudioClip[2]; if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("ShovelPickUp1"); val.dropSFX = Plugin.LoadSillySFX("DropMetalObjectMid1"); array[0] = Plugin.LoadSillySFX("ShovelHit1"); array[1] = Plugin.LoadSillySFX("ShovelHit2"); component2.reelUp = Plugin.LoadSillySFX("ShovelReel"); component2.swing = Plugin.LoadSillySFX("ShovelSwing"); } else if (!Plugin.Config.configSillyScrap.Value && Plugin.Config.configReplaceSFX.Value) { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject2; array[0] = Plugin.LoadReplaceSFX("SignHit0"); array[1] = Plugin.LoadReplaceSFX("SignHit1"); component2.reelUp = Plugin.LoadReplaceSFX("SignReel"); component2.swing = Plugin.LoadReplaceSFX("SignSwing"); } else if (!Plugin.Config.configSillyScrap.Value && !Plugin.Config.configReplaceSFX.Value && ((Object)(object)Plugin.SharedSFXShovelHit0 == (Object)null || (Object)(object)Plugin.SharedSFXShovelHit1 == (Object)null || (Object)(object)Plugin.SharedSFXShovelReel == (Object)null || (Object)(object)Plugin.SharedSFXShovelSwing == (Object)null)) { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject2; array[0] = Plugin.LoadReplaceSFX("SignHit0"); array[1] = Plugin.LoadReplaceSFX("SignHit1"); component2.reelUp = Plugin.LoadReplaceSFX("SignReel"); component2.swing = Plugin.LoadReplaceSFX("SignSwing"); } else if (!Plugin.Config.configSillyScrap.Value && !Plugin.Config.configReplaceSFX.Value && (Object)(object)Plugin.SharedSFXShovelHit0 != (Object)null && (Object)(object)Plugin.SharedSFXShovelHit1 != (Object)null && (Object)(object)Plugin.SharedSFXShovelReel != (Object)null && (Object)(object)Plugin.SharedSFXShovelSwing != (Object)null) { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject2; array[0] = Plugin.SharedSFXShovelHit0; array[1] = Plugin.SharedSFXShovelHit1; component2.reelUp = Plugin.SharedSFXShovelReel; component2.swing = Plugin.SharedSFXShovelSwing; } component2.hitSFX = array; if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetGoldPuzzleRuntime() { string text = "GoldPuzzle"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); if ((Object)(object)Plugin.GoldPuzzleMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(0f, 0f, 90f); ((Vector3)(ref val.rotationOffset)).Set(0f, 0f, 0f); ((Vector3)(ref val.positionOffset)).Set(0f, 0.1f, -0.33f); val.verticalOffset = 0.1f; } else { component.mesh = Plugin.GoldPuzzleMesh; ((Vector3)(ref val.restingRotation)).Set(0f, 0f, 90f); ((Vector3)(ref val.rotationOffset)).Set(0f, 0f, 0f); ((Vector3)(ref val.positionOffset)).Set(0f, 0f, 0f); val.verticalOffset = 0.1f; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("GrabGoldPuzzle"); val.dropSFX = Plugin.LoadSillySFX("DropGoldPuzzle"); val.pocketSFX = Plugin.LoadSillySFX("PocketGoldPuzzle"); } else { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject1; val.pocketSFX = null; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetComedyGoldRuntime() { string text = "ComedyGold"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); WhoopieCushionItem component2 = val2.GetComponent<WhoopieCushionItem>(); if ((Object)(object)Plugin.ComedyGoldMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); } else { component.mesh = Plugin.ComedyGoldMesh; } AudioClip[] array = (AudioClip[])(object)new AudioClip[4]; if (Plugin.Config.configSillyScrap.Value) { val.dropSFX = Plugin.LoadSillySFX("DropMetalObjectLight1"); array[0] = Plugin.LoadSillySFX("Fart1"); if (Plugin.Config.configToolsRebalance.Value) { array[1] = Plugin.LoadSillySFX("Fart4"); } else { array[1] = Plugin.LoadSillySFX("Fart2"); } array[2] = Plugin.LoadSillySFX("Fart3"); array[3] = Plugin.LoadSillySFX("Fart4"); } else if (!Plugin.Config.configSillyScrap.Value && Plugin.Config.configReplaceSFX.Value) { val.dropSFX = Plugin.SharedSFXDropMetalObject1; array[0] = Plugin.LoadReplaceSFX("FartSFX1"); array[1] = Plugin.LoadReplaceSFX("FartSFX2"); array[2] = Plugin.LoadReplaceSFX("FartSFX3"); if (Plugin.Config.configToolsRebalance.Value) { array[3] = Plugin.LoadReplaceSFX("FartSFX2"); } else { array[3] = Plugin.LoadReplaceSFX("FartSFX4"); } } else if (!Plugin.Config.configSillyScrap.Value && !Plugin.Config.configReplaceSFX.Value && ((Object)(object)Plugin.SharedSFXWhoopieCushionNoise0 == (Object)null || (Object)(object)Plugin.SharedSFXWhoopieCushionNoise1 == (Object)null || (Object)(object)Plugin.SharedSFXWhoopieCushionNoise2 == (Object)null || (Object)(object)Plugin.SharedSFXWhoopieCushionNoise3 == (Object)null)) { val.dropSFX = Plugin.SharedSFXDropMetalObject1; array[0] = Plugin.LoadReplaceSFX("FartSFX1"); array[1] = Plugin.LoadReplaceSFX("FartSFX2"); array[2] = Plugin.LoadReplaceSFX("FartSFX3"); if (Plugin.Config.configToolsRebalance.Value) { array[3] = Plugin.LoadReplaceSFX("FartSFX2"); } else { array[3] = Plugin.LoadReplaceSFX("FartSFX4"); } } else if (!Plugin.Config.configSillyScrap.Value && !Plugin.Config.configReplaceSFX.Value && (Object)(object)Plugin.SharedSFXWhoopieCushionNoise0 != (Object)null && (Object)(object)Plugin.SharedSFXWhoopieCushionNoise1 != (Object)null && (Object)(object)Plugin.SharedSFXWhoopieCushionNoise2 != (Object)null && (Object)(object)Plugin.SharedSFXWhoopieCushionNoise3 != (Object)null) { val.dropSFX = Plugin.SharedSFXDropMetalObject1; array[0] = Plugin.SharedSFXWhoopieCushionNoise0; array[1] = Plugin.SharedSFXWhoopieCushionNoise1; if (Plugin.Config.configToolsRebalance.Value) { array[2] = Plugin.SharedSFXWhoopieCushionNoise1; } else { array[2] = Plugin.SharedSFXWhoopieCushionNoise2; } array[3] = Plugin.SharedSFXWhoopieCushionNoise3; } component2.fartAudios = array; if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetCookieGoldPanRuntime() { string text = "CookieGoldPan"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); if ((Object)(object)Plugin.CookieGoldPanMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 90f); ((Vector3)(ref val.rotationOffset)).Set(5.1f, -252.9f, -155.01f); ((Vector3)(ref val.positionOffset)).Set(-0.05f, 0.17f, -0.35f); val.verticalOffset = 0.03f; } else { component.mesh = Plugin.CookieGoldPanMesh; ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 90f); ((Vector3)(ref val.rotationOffset)).Set(5.1f, -252.9f, -155.01f); ((Vector3)(ref val.positionOffset)).Set(-0.02f, 0.17f, -0.26f); val.verticalOffset = 0.03f; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("ShovelPickUp3"); val.dropSFX = Plugin.LoadSillySFX("DropMetalObjectMid3"); } else { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropThinMetal; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetGolderBarRuntime() { string text = "GolderBar"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); if ((Object)(object)Plugin.GolderBarMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 0f); ((Vector3)(ref val.rotationOffset)).Set(0f, 0f, 100f); ((Vector3)(ref val.positionOffset)).Set(0.15f, 0.09f, 0.025f); val.verticalOffset = 0.13f; } else { component.mesh = Plugin.GolderBarMesh; ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 0f); ((Vector3)(ref val.rotationOffset)).Set(-2.43f, 128.71f, -330.4f); ((Vector3)(ref val.positionOffset)).Set(0.04f, 0.15f, -0.09f); val.verticalOffset = 0.07f; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("GrabGolderBar"); val.dropSFX = Plugin.LoadSillySFX("DropGolderBar"); } else { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject3; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetCuddlyGoldRuntime() { string text = "CuddlyGold"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); if ((Object)(object)Plugin.CuddlyGoldMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 0f); ((Vector3)(ref val.rotationOffset)).Set(-35f, 100f, 145f); ((Vector3)(ref val.positionOffset)).Set(-0.05f, 0.02f, -0.04f); val.verticalOffset = 0.01f; } else { component.mesh = Plugin.CuddlyGoldMesh; ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 0f); ((Vector3)(ref val.rotationOffset)).Set(-35f, 100f, 130f); ((Vector3)(ref val.positionOffset)).Set(-0.1f, 0f, -0.02f); val.verticalOffset = 0.01f; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("CuddlyGoldGrab"); val.dropSFX = Plugin.LoadSillySFX("CuddlyGoldDrop"); val.pocketSFX = Plugin.LoadSillySFX("CuddlyGoldPocket"); } else { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject1; val.pocketSFX = null; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetGoldenGruntRuntime() { string text = "GoldenGrunt"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); if ((Object)(object)Plugin.GoldenGruntMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, -90f); ((Vector3)(ref val.rotationOffset)).Set(0f, 90f, 30f); ((Vector3)(ref val.positionOffset)).Set(0.2f, 0.05f, -0.08f); val.verticalOffset = 0.65f; } else { component.mesh = Plugin.GoldenGruntMesh; ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, -90f); ((Vector3)(ref val.rotationOffset)).Set(0f, 90f, 30f); ((Vector3)(ref val.positionOffset)).Set(0.2f, 0f, -0.05f); val.verticalOffset = 0.65f; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("GoldenGruntGrab"); val.dropSFX = Plugin.LoadSillySFX("GoldenGruntDrop"); } else { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject1; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetGoldkeeperRuntime() { string text = "Goldkeeper"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); if ((Object)(object)Plugin.GoldkeeperMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, -90f); ((Vector3)(ref val.rotationOffset)).Set(-10f, 185f, 200f); ((Vector3)(ref val.positionOffset)).Set(0.15f, -0.1f, 0.5f); val.verticalOffset = 0.01f; } else { component.mesh = Plugin.GoldkeeperMesh; ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, -90f); ((Vector3)(ref val.rotationOffset)).Set(-20f, 185f, 200f); ((Vector3)(ref val.positionOffset)).Set(0.15f, -0.2f, 0.5f); val.verticalOffset = 0.01f; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("GoldkeeperGrab"); val.dropSFX = Plugin.LoadSillySFX("GoldkeeperDrop"); } else { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject3; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetGoldSpringRuntime() { string text = "GoldSpring"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); MeshFilter component2 = ((Component)val2.transform.GetChild(1)).GetComponent<MeshFilter>(); if ((Object)(object)Plugin.GoldSpringMesh == (Object)null || (Object)(object)Plugin.GoldSpringHeadMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); } else { component.mesh = Plugin.GoldSpringMesh; component2.mesh = Plugin.GoldSpringHeadMesh; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("GoldSpringGrab"); val.dropSFX = Plugin.LoadSillySFX("GoldSpringDrop"); } else { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject2; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetMarigoldRuntime() { string text = "Marigold"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); if ((Object)(object)Plugin.MarigoldMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, -90f); ((Vector3)(ref val.rotationOffset)).Set(-40f, 160f, 285f); ((Vector3)(ref val.positionOffset)).Set(-0.35f, -0.1f, 0.25f); val.verticalOffset = 0.25f; } else { component.mesh = Plugin.MarigoldMesh; ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, -90f); ((Vector3)(ref val.rotationOffset)).Set(-30f, 210f, 250f); ((Vector3)(ref val.positionOffset)).Set(0.2f, -0.15f, 0.525f); val.verticalOffset = 0.02f; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("MarigoldGrab"); val.dropSFX = Plugin.LoadSillySFX("MarigoldDrop"); } else { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject2; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetGoldenGuardianRuntime() { string text = "GoldenGuardian"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); if ((Object)(object)Plugin.GoldenGuardianMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 180f); ((Vector3)(ref val.rotationOffset)).Set(-15f, 200f, 0f); ((Vector3)(ref val.positionOffset)).Set(0.1f, 0f, -0.05f); val.verticalOffset = 0.6f; } else { component.mesh = Plugin.GoldenGuardianMesh; ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 180f); ((Vector3)(ref val.rotationOffset)).Set(-10f, 190f, 90f); ((Vector3)(ref val.positionOffset)).Set(0f, 0f, -0.5f); val.verticalOffset = 1.1f; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("GoldenGuardianGrab"); val.dropSFX = Plugin.LoadSillySFX("GoldenGuardianDrop"); } else { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject2; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetGoldTypeEngineRuntime() { string text = "GoldTypeEngine"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); if ((Object)(object)Plugin.GoldTypeEngineMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); } else { component.mesh = Plugin.GoldTypeEngineMesh; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("GrabGoldTypeEngine"); val.dropSFX = Plugin.LoadSillySFX("DropGoldTypeEngine"); } else { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject3; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetTiltControlsRuntime() { string text = "TiltControls"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); if ((Object)(object)Plugin.TiltControlsMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadSillyMesh(text); } else { component.mesh = Plugin.TiltControlsMesh; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("GrabTiltControls"); val.dropSFX = Plugin.LoadSillySFX("DropTiltControls"); } else { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject2; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetJacobsLadderRuntime() { string text = "JacobsLadder"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); FlashlightItem component = val2.GetComponent<FlashlightItem>(); MeshFilter component2 = ((Component)val2.transform.GetChild(1)).GetComponent<MeshFilter>(); GameObject gameObject = ((Component)val2.transform.GetChild(2)).gameObject; GameObject gameObject2 = ((Component)val2.transform.GetChild(3)).gameObject; component.flashlightBulb = gameObject.GetComponent<Light>(); component.flashlightBulbGlow = gameObject2.GetComponent<Light>(); component.flashlightBulb.intensity = 400f; component.flashlightBulb.lightShadowCasterMode = (LightShadowCasterMode)2; component.flashlightBulb.shadows = (LightShadows)1; ((Behaviour)component.flashlightBulb).enabled = false; component.flashlightBulbGlow.lightShadowCasterMode = (LightShadowCasterMode)2; component.flashlightBulbGlow.shadows = (LightShadows)1; ((Behaviour)component.flashlightBulbGlow).enabled = false; component.flashlightTypeID = Plugin.JacobsLadderFlashlightID; component.initialIntensity = 400f; if ((Object)(object)Plugin.JacobsLadderMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component2.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(0f, 0f, 90f); ((Vector3)(ref val.rotationOffset)).Set(-90f, 0f, 100f); ((Vector3)(ref val.positionOffset)).Set(0f, 0f, 0f); val.verticalOffset = 0.12f; } else { component2.mesh = Plugin.JacobsLadderMesh; ((Vector3)(ref val.restingRotation)).Set(0f, 0f, 90f); ((Vector3)(ref val.rotationOffset)).Set(-90f, 0f, 100f); ((Vector3)(ref val.positionOffset)).Set(0f, -0.1f, 0f); val.verticalOffset = 0.12f; } AudioClip[] array = (AudioClip[])(object)new AudioClip[2]; if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("FlashlightGrab"); val.dropSFX = Plugin.LoadSillySFX("DropMetalObjectLight3"); val.pocketSFX = Plugin.LoadSillySFX("FlashlightPocket"); component.outOfBatteriesClip = Plugin.LoadSillySFX("FlashlightOut"); component.flashlightFlicker = Plugin.LoadSillySFX("FlashlightFlicker"); array[0] = Plugin.LoadSillySFX("FlashlightClick1"); array[1] = Plugin.LoadSillySFX("FlashlightClick2"); } else { val.grabSFX = Plugin.SharedSFXFlashlightGrab; val.dropSFX = Plugin.SharedSFXDropMetalObject1; val.pocketSFX = Plugin.SharedSFXFlashlightPocket; component.outOfBatteriesClip = Plugin.SharedSFXFlashlightOut; component.flashlightFlicker = Plugin.SharedSFXFlashlightFlicker; array[0] = Plugin.SharedSFXFlashlightClip; array[1] = Plugin.SharedSFXFlashlightClip; } component.flashlightClips = array; if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconFlashlight == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconFlashlight; } } public static void SetGoldToyRobotRuntime() { string text = "GoldToyRobot"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapAssets/" + text + "/" + text + "LCGoldScrapMod.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapAssets/" + text + "/" + text + "Prefab.prefab"); GameObject gameObject = ((Component)val2.transform.GetChild(1)).gameObject; GameObject gameObject2 = ((Component)val2.transform.GetChild(2)).gameObject; AnimatedItem component = val2.GetComponent<AnimatedItem>(); MeshFilter component2 = val2.GetComponent<MeshFilter>(); MeshFilter component3 = gameObject.GetComponent<MeshFilter>(); MeshFilter component4 = gameObject2.GetComponent<MeshFilter>(); if ((Object)(object)Plugin.GoldToyRobotMainMesh == (Object)null || (Object)(object)Plugin.GoldToyRobotMainMesh == (Object)null || (Object)(object)Plugin.GoldToyRobotLeftMesh == (Object)null || Plugin.Config.configSillyScrap.Value) { component2.mesh = Plugin.LoadSillyMesh(text); ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 0f); ((Vector3)(ref val.rotationOffset)).Set(-10f, 89.46f, 110f); ((Vector3)(ref val.positionOffset)).Set(-0.15f, 0.12f, -0.4f); val.verticalOffset = 0.3f; } else { component2.mesh = Plugin.GoldToyRobotMainMesh; component3.mesh = Plugin.GoldToyRobotRightMesh; component4.mesh = Plugin.GoldToyRobotLeftMesh; ((Vector3)(ref val.restingRotation)).Set(-90f, 0f, 0f); ((Vector3)(ref val.rotationOffset)).Set(8f, 89.46f, 110f); ((Vector3)(ref val.positionOffset)).Set(0f, 0.09f, -0.15f); val.verticalOffset = 0.44f; } if (Plugin.Config.configSillyScrap.Value) { val.grabSFX = Plugin.LoadSillySFX("ShovelPickUp1"); val.dropSFX = Plugin.LoadSillySFX("DropMetalObjectMid2"); component.grabAudio = Plugin.LoadSillySFX("RobotToyCheer"); } else if (!Plugin.Config.configSillyScrap.Value && Plugin.Config.configReplaceSFX.Value) { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject2; component.grabAudio = Plugin.LoadReplaceSFX("ToyRobotSFX"); } else if (!Plugin.Config.configSillyScrap.Value && !Plugin.Config.configReplaceSFX.Value && (Object)(object)Plugin.SharedSFXRobotToyCheer == (Object)null) { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject2; component.grabAudio = Plugin.LoadReplaceSFX("ToyRobotSFX"); } else if (!Plugin.Config.configSillyScrap.Value && !Plugin.Config.configReplaceSFX.Value && (Object)(object)Plugin.SharedSFXRobotToyCheer != (Object)null) { val.grabSFX = Plugin.SharedSFXShovelPickUp; val.dropSFX = Plugin.SharedSFXDropMetalObject2; component.grabAudio = Plugin.SharedSFXRobotToyCheer; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } public static void SetGoldNuggetRuntime() { string text = "GoldNugget"; Item val = Plugin.CustomGoldScrapAssets.LoadAsset<Item>("Assets/GoldScrapShop/GoldScrapShopTerminal/" + text + "/" + text + "GoldScrapShop.asset"); GameObject val2 = Plugin.CustomGoldScrapAssets.LoadAsset<GameObject>("Assets/GoldScrapShop/GoldScrapShopTerminal/" + text + "/" + text + "Prefab.prefab"); MeshFilter component = val2.GetComponent<MeshFilter>(); if (Plugin.Config.configSillyScrap.Value) { component.mesh = Plugin.LoadGoldStoreMesh("GoldNugget", "SillyGoldNugget"); ((Vector3)(ref val.restingRotation)).Set(0f, 0f, 0f); ((Vector3)(ref val.rotationOffset)).Set(10f, -90f, -90f); ((Vector3)(ref val.positionOffset)).Set(0f, 0.08f, 0f); val.verticalOffset = 0.01f; } else { component.mesh = Plugin.LoadGoldStoreMesh("GoldNugget", "GoldNugget"); ((Vector3)(ref val.restingRotation)).Set(0f, 0f, 0f); ((Vector3)(ref val.rotationOffset)).Set(-20f, 90f, -90f); ((Vector3)(ref val.positionOffset)).Set(0f, 0.08f, 0f); val.verticalOffset = 0.01f; } if (Plugin.Config.configSillyScrap.Value) { val.dropSFX = Plugin.LoadSillySFX("DropMetalObjectLight1"); } else { val.dropSFX = Plugin.SharedSFXDropMetalObject1; } if (Plugin.Config.configSillyScrap.Value || (Object)(object)Plugin.SharedItemIconScrap == (Object)null) { val.itemIcon = Plugin.SillyItemIcon; } else { val.itemIcon = Plugin.SharedItemIconScrap; } } } public class GoldScrapNetworkHandler : NetworkBehaviour { public static GoldScrapNetworkHandler instance; private void Awake() { instance = this; } [ClientRpc] public void SetGoldNugg