Please disclose if your mod was created primarily using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Farming and Cooking Mod MelanieMelicious v1.3.3
plugins/MelanieMeliciousCooked.dll
Decompiled 3 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Threading.Tasks; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using Dawn; using Dusk; using GameNetcodeStuff; using HarmonyLib; using MelMelCraft; using MelanieMeliciousCooked.NetcodePatcher; using Microsoft.CodeAnalysis; using Newtonsoft.Json; using Unity.Netcode; using UnityEngine; using UnityEngine.Events; [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: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] [CompilerGenerated] internal sealed class <>z__ReadOnlyArray<T> : IEnumerable, ICollection, IList, IEnumerable<T>, IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>, IList<T> { int ICollection.Count => _items.Length; bool ICollection.IsSynchronized => false; object ICollection.SyncRoot => this; object IList.this[int index] { get { return _items[index]; } set { throw new NotSupportedException(); } } bool IList.IsFixedSize => true; bool IList.IsReadOnly => true; int IReadOnlyCollection<T>.Count => _items.Length; T IReadOnlyList<T>.this[int index] => _items[index]; int ICollection<T>.Count => _items.Length; bool ICollection<T>.IsReadOnly => true; T IList<T>.this[int index] { get { return _items[index]; } set { throw new NotSupportedException(); } } public <>z__ReadOnlyArray(T[] items) { _items = items; } IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable)_items).GetEnumerator(); } void ICollection.CopyTo(Array array, int index) { ((ICollection)_items).CopyTo(array, index); } int IList.Add(object value) { throw new NotSupportedException(); } void IList.Clear() { throw new NotSupportedException(); } bool IList.Contains(object value) { return ((IList)_items).Contains(value); } int IList.IndexOf(object value) { return ((IList)_items).IndexOf(value); } void IList.Insert(int index, object value) { throw new NotSupportedException(); } void IList.Remove(object value) { throw new NotSupportedException(); } void IList.RemoveAt(int index) { throw new NotSupportedException(); } IEnumerator<T> IEnumerable<T>.GetEnumerator() { return ((IEnumerable<T>)_items).GetEnumerator(); } void ICollection<T>.Add(T item) { throw new NotSupportedException(); } void ICollection<T>.Clear() { throw new NotSupportedException(); } bool ICollection<T>.Contains(T item) { return ((ICollection<T>)_items).Contains(item); } void ICollection<T>.CopyTo(T[] array, int arrayIndex) { ((ICollection<T>)_items).CopyTo(array, arrayIndex); } bool ICollection<T>.Remove(T item) { throw new NotSupportedException(); } int IList<T>.IndexOf(T item) { return ((IList<T>)_items).IndexOf(item); } void IList<T>.Insert(int index, T item) { throw new NotSupportedException(); } void IList<T>.RemoveAt(int index) { throw new NotSupportedException(); } } [CompilerGenerated] internal sealed class <>z__ReadOnlySingleElementList<T> : IEnumerable, ICollection, IList, IEnumerable<T>, IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>, IList<T> { private sealed class Enumerator : IDisposable, IEnumerator, IEnumerator<T> { object IEnumerator.Current => _item; T IEnumerator<T>.Current => _item; public Enumerator(T item) { _item = item; } bool IEnumerator.MoveNext() { return !_moveNextCalled && (_moveNextCalled = true); } void IEnumerator.Reset() { _moveNextCalled = false; } void IDisposable.Dispose() { } } int ICollection.Count => 1; bool ICollection.IsSynchronized => false; object ICollection.SyncRoot => this; object IList.this[int index] { get { if (index != 0) { throw new IndexOutOfRangeException(); } return _item; } set { throw new NotSupportedException(); } } bool IList.IsFixedSize => true; bool IList.IsReadOnly => true; int IReadOnlyCollection<T>.Count => 1; T IReadOnlyList<T>.this[int index] { get { if (index != 0) { throw new IndexOutOfRangeException(); } return _item; } } int ICollection<T>.Count => 1; bool ICollection<T>.IsReadOnly => true; T IList<T>.this[int index] { get { if (index != 0) { throw new IndexOutOfRangeException(); } return _item; } set { throw new NotSupportedException(); } } public <>z__ReadOnlySingleElementList(T item) { _item = item; } IEnumerator IEnumerable.GetEnumerator() { return new Enumerator(_item); } void ICollection.CopyTo(Array array, int index) { array.SetValue(_item, index); } int IList.Add(object value) { throw new NotSupportedException(); } void IList.Clear() { throw new NotSupportedException(); } bool IList.Contains(object value) { return EqualityComparer<T>.Default.Equals(_item, (T)value); } int IList.IndexOf(object value) { return (!EqualityComparer<T>.Default.Equals(_item, (T)value)) ? (-1) : 0; } void IList.Insert(int index, object value) { throw new NotSupportedException(); } void IList.Remove(object value) { throw new NotSupportedException(); } void IList.RemoveAt(int index) { throw new NotSupportedException(); } IEnumerator<T> IEnumerable<T>.GetEnumerator() { return new Enumerator(_item); } void ICollection<T>.Add(T item) { throw new NotSupportedException(); } void ICollection<T>.Clear() { throw new NotSupportedException(); } bool ICollection<T>.Contains(T item) { return EqualityComparer<T>.Default.Equals(_item, item); } void ICollection<T>.CopyTo(T[] array, int arrayIndex) { array[arrayIndex] = _item; } bool ICollection<T>.Remove(T item) { throw new NotSupportedException(); } int IList<T>.IndexOf(T item) { return (!EqualityComparer<T>.Default.Equals(_item, item)) ? (-1) : 0; } void IList<T>.Insert(int index, T item) { throw new NotSupportedException(); } void IList<T>.RemoveAt(int index) { throw new NotSupportedException(); } } namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } internal static class MelanieCookedConfig { internal static ConfigEntry<bool> noBug; internal static ConfigEntry<bool> save; internal static ConfigEntry<bool> custom; internal static ConfigEntry<bool> enableBurstbush; internal static ConfigEntry<bool> immersion; internal static ConfigEntry<float> beeVolume; internal static ConfigEntry<int> grinder0Cost; internal static ConfigEntry<int> blender0Cost; internal static ConfigEntry<int> crockpot0Cost; internal static ConfigEntry<int> oven0Cost; internal static ConfigEntry<int> oven1Cost; internal static ConfigEntry<int> grill0Cost; internal static ConfigEntry<int> fridge0Cost; internal static ConfigEntry<int> plot0Cost; internal static ConfigEntry<int> plot1Cost; internal static ConfigEntry<int> plot2Cost; internal static ConfigEntry<int> barrel0Cost; internal static ConfigEntry<int> rack0Cost; internal static ConfigEntry<int> apiary0Cost; internal static ConfigEntry<int> seed0Cost; internal static ConfigEntry<int> fertilizer0Cost; internal static ConfigEntry<int> rareGrow; internal static ConfigEntry<int> carrotGrow; internal static ConfigEntry<int> potatoGrow; internal static ConfigEntry<int> wheatGrow; internal static ConfigEntry<int> grape0Grow; internal static ConfigEntry<int> grape1Grow; internal static ConfigEntry<int> tomatoGrow; internal static ConfigEntry<int> alcoholGrow; internal static ConfigEntry<int> burstBerryGrow0; internal static ConfigEntry<int> burstBerryGrow1; internal static ConfigEntry<int> beeGrow0; internal static ConfigEntry<int> burstBushSpawn0; internal static ConfigEntry<string> burstBushSpawn1; internal static ConfigEntry<string> burstBushSpawn2; internal static ConfigEntry<int> seedTomato0Drop; internal static ConfigEntry<float> cookRange0; internal static ConfigEntry<float> cookRange1; internal static ConfigEntry<int> meatMin; internal static ConfigEntry<int> meatMax; internal static ConfigEntry<int> juiceMax; internal static ConfigEntry<int> carrotMax; internal static ConfigEntry<int> potatoMax; internal static ConfigEntry<int> wheatMax; internal static ConfigEntry<int> grape0Max; internal static ConfigEntry<int> grape1Max; internal static ConfigEntry<int> tomatoMax; internal static ConfigEntry<int> alcoholMax; internal static ConfigEntry<int> burstBerry0Max; internal static ConfigEntry<int> burstBerry1Max; internal static ConfigEntry<int> beeMax; internal static ConfigEntry<int> cropMaxLife; internal static ConfigEntry<string> meatGrind; internal static ConfigEntry<string> meatGoop; internal static ConfigEntry<string> meatList; internal static ConfigEntry<string> veggieList; internal static ConfigEntry<string> grainList; internal static ConfigEntry<string> cheeseList; internal static ConfigEntry<string> boomList; internal static ConfigEntry<string> fruitList; internal static ConfigEntry<string> breadList; internal static ConfigEntry<string> honeyList; internal static ConfigEntry<string> fertilizerList; internal static ConfigEntry<string> appleList; internal static ConfigEntry<string> grape0List; internal static ConfigEntry<string> grape1List; internal static ConfigEntry<string> potatoList; internal static void SetupConfig(ConfigFile config) { noBug = config.Bind<bool>("Features", "INSECTOPHOBIA MODE", false, "Do you want to turn OFF potentially fear-inducing depictions of insects? Added because bee item might freak some people out."); save = config.Bind<bool>("Features", "Enable Save System", true, "Toggle if your crops and filled barrels save between sessions."); custom = config.Bind<bool>("Features", "Enable Customization", true, "Toggle custom configuration of ingredients."); enableBurstbush = config.Bind<bool>("Features", "Enable Burstberry Bushes", true, "Toggle burstberry bushes."); immersion = config.Bind<bool>("Features", "Disable Immersion Breaks", false, "Toggle certain default images that some might find don't fit the immersion."); beeVolume = config.Bind<float>("Volume", "Bee Box", 0.25f, "Scale the volume for occupied bee boxes."); grinder0Cost = config.Bind<int>("Prices", "Meat Grinder", 120, "Modify the price for the meat grinder."); blender0Cost = config.Bind<int>("Prices", "Blender", 80, "Modify the price for the blender."); crockpot0Cost = config.Bind<int>("Prices", "Crockpot", 100, "Modify the price for the crockpot."); oven0Cost = config.Bind<int>("Prices", "Mini Oven", 100, "Modify the price for the mini oven."); oven1Cost = config.Bind<int>("Prices", "Oven", 200, "Modify the price for the oven."); grill0Cost = config.Bind<int>("Prices", "Mini Grill", 100, "Modify the price for the grill."); fridge0Cost = config.Bind<int>("Prices", "Fridge", 120, "Modify the price for the fridge."); plot0Cost = config.Bind<int>("Prices", "Small Planter", 100, "Modify the price for small planters."); plot1Cost = config.Bind<int>("Prices", "Trellis Planter", 150, "Modify the price for trellis planters."); plot2Cost = config.Bind<int>("Prices", "Planter Shelf", 325, "Modify the price for planter shelves."); barrel0Cost = config.Bind<int>("Prices", "Fermentation Barrel", 170, "Modify the price for fermentation barrels."); rack0Cost = config.Bind<int>("Prices", "Wine Rack", 180, "Modify the price for the wine rack."); apiary0Cost = config.Bind<int>("Prices", "Bee Box", 100, "Modify the price for bee boxes."); seed0Cost = config.Bind<int>("Prices", "Seeds", 15, "Modify the price for seeds."); fertilizer0Cost = config.Bind<int>("Prices", "Fertilizer", 35, "Modify the price for fertilizer."); rareGrow = config.Bind<int>("Growth Chance", "Rare Crops", 2, "Modify the chance for rare variants of crops (if applicable) to grow."); carrotGrow = config.Bind<int>("Growth Chance", "Carrot", 10, "Modify the chance for carrot plants to produce."); potatoGrow = config.Bind<int>("Growth Chance", "Potato", 15, "Modify the chance for potato plants to produce."); wheatGrow = config.Bind<int>("Growth Chance", "Wheat", 20, "Modify the chance for wheat plants to produce."); grape0Grow = config.Bind<int>("Growth Chance", "Red Grapes", 15, "Modify the chance for red grape plants to produce."); grape1Grow = config.Bind<int>("Growth Chance", "Green Grapes", 20, "Modify the chance for green grape plants to produce."); alcoholGrow = config.Bind<int>("Growth Chance", "Alcohol", 20, "Modify the chance for alcohol to have a successful age cycle per hour."); tomatoGrow = config.Bind<int>("Growth Chance", "Tomato", 10, "Modify the chance for tomato plants to produce."); burstBerryGrow0 = config.Bind<int>("Growth Chance", "Burstberry", 20, "Modify the chance for burstberries to progress growing phase per hour."); burstBerryGrow1 = config.Bind<int>("Growth Chance", "Stable Burstberry", 10, "Modify the chance for burstberries to grow stable."); beeGrow0 = config.Bind<int>("Growth Chance", "Bee Queen", 10, "Modify the chance for bee queens to increase in productivity every in-game hour."); burstBushSpawn0 = config.Bind<int>("Spawn Chance", "Burstberry Bush Global", 2, "Modify the weights for burstberry bushes spawning on any moon."); burstBushSpawn1 = config.Bind<string>("Spawn Chance", "Burstberry Bush By Tag", "lethal_company:forest:20,lethal_company:valley:20", "Modify the weights for burstberry bushes spawning on moons with certain tags."); burstBushSpawn2 = config.Bind<string>("Spawn Chance", "Burstberry Bush By Key", "", "Modify the weights for burstberry bushes spawning on moons by certain keys."); seedTomato0Drop = config.Bind<int>("Resource Chance", "Giant Tomato Seed", 5, "Modify the chances for a giant tomato seed to drop from chopped trees."); cookRange0 = config.Bind<float>("Item Value", "Cooking Value Minimum", 10f, "Directly change the first random range value (usually minimum) for how much value is added when cooking."); cookRange1 = config.Bind<float>("Item Value", "Cooking Value Maximum MULTIPLIER", 0.25f, "Change the multiplier applied to the second random range value (usually maximum) applied to a copy of total dish value."); meatMin = config.Bind<int>("Item Value", "Meat Value Minumum", 0, "Change the minimum value ADDED to items turned to meat."); meatMax = config.Bind<int>("Item Value", "Meat Value Maximum", 30, "Change the maximum value ADDED to items turned to meat."); juiceMax = config.Bind<int>("Item Value", "Juice Value Maximum", 10, "Change the maximum value ADDED to items blended to juice."); carrotMax = config.Bind<int>("Item Value", "Carrot Value Maximum", 30, "Change the maximum value of grown carrots."); potatoMax = config.Bind<int>("Item Value", "Potato Value Maximum", 25, "Change the maximum value of grown potatoes."); wheatMax = config.Bind<int>("Item Value", "Wheat Value Maximum", 20, "Change the maximum value of grown wheat."); grape0Max = config.Bind<int>("Item Value", "Red Grape Value Maximum", 30, "Change the maximum value of grown wheat."); grape1Max = config.Bind<int>("Item Value", "Green Grape Value Maximum", 20, "Change the maximum value of grown wheat."); tomatoMax = config.Bind<int>("Item Value", "Tomato Value Maximum", 30, "Change the maximum value of grown tomatoes."); alcoholMax = config.Bind<int>("Item Value", "Alcohol Value Maximum", 8, "Change the maximum value ADDED to alcoholic beverages on every successful aging cycle."); burstBerry0Max = config.Bind<int>("Item Value", "Burstberry Chunk Value Maximum", 20, "Change the maximum value of foraged burstberry chunks."); burstBerry1Max = config.Bind<int>("Item Value", "Burstberry Value Maximum", 50, "Change the maximum value of foraged burstberry."); beeMax = config.Bind<int>("Item Value", "Total Bee Product Base Value Maximum", 25, "Change the maximum BASE value of overall bee products, BEFORE hive frame and queen multipliers."); cropMaxLife = config.Bind<int>("Item Value", "Crop Lifetime", 3, "Change the maximum age, in days, before a crop dies."); meatGrind = config.Bind<string>("Custom Ingredients", "Grind to Meat", "Ear,Foot,Hand,Heart,Knee,Tongue,Dead Manticoil,Dead Tulip Snake,Dead Snare Flea,Dead Hoarder Bug,Dead Maneater,Dead Thumper,Dead Baboon Hawk,Dead Bunker Spider", "Add more items to be ground into meat! (Use ITEM name; not always the same as scan or prefab name)"); meatGoop = config.Bind<string>("Custom Ingredients", "Cook to Imitation Meat", "Common Enemy Remains,Rare Enemy Remains,UltraRare Enemy Remains,Baboon Hawk Sample,Bracken Sample,Bunker Spider Sample,Eyeless Dog Sample,Forest Keeper Sample,Hoarding Bug Sample,Kidnapper Fox Sample,Maneater Sample,Manticoil Sample,Snare Flea Sample,Spore Lizard Sample,Thumper Sample,Tulip Snake Sample,SampleDriftWoodGiant", "Add more items to be cooked into imitation meat! (Use ITEM name; not always the same as scan or prefab name)"); meatList = config.Bind<string>("Custom Ingredients", "Cook as Meat", "Meat cube,Clam", "Add more items to be considered meat ingredients! (Use ITEM name; not always the same as scan or prefab name)"); veggieList = config.Bind<string>("Custom Ingredients", "Cook as Veggie", "Jar of pickles,Corn", "Add more items to be considered veggie ingredients! (Use ITEM name; not always the same as scan or prefab name)"); grainList = config.Bind<string>("Custom Ingredients", "Cook as Grain", "", "Add more items to be considered grain ingredients! (Use ITEM name; not always the same as scan or prefab name)"); cheeseList = config.Bind<string>("Custom Ingredients", "Cook as Cheese", "Blue cheese,Cheese puff,Chammer,Cheese wedge,Cheese wheel,Mr. Twisty's Twisted Cheese Curls,Scrap-Its,Stinky cheese man", "Add more items to be considered cheese ingredients! (Use ITEM name; not always the same as scan or prefab name)"); boomList = config.Bind<string>("Custom Ingredients", "Cook to Explode", "", "Add more items to explode when cooked! (Use ITEM name; not always the same as scan or prefab name)"); fruitList = config.Bind<string>("Custom Ingredients", "Cook as Fruit", "Apple,Banana,Biomonty,Coconikki,Coconut,Generic apple,Grapes,Mango,Papaya,Pumpkin,Watermelon", "Add more items to today's fruit haul! (Use ITEM name; not always the same as scan or prefab name)"); breadList = config.Bind<string>("Custom Specific Ingredients", "Cook as Bread", "", "This is bread."); honeyList = config.Bind<string>("Custom Ingredients", "Cook as Honey", "", "This is honey."); fertilizerList = config.Bind<string>("Custom Ingredients", "Use as Fertilizer", "Bone-4-20-0,Ribcage-8-40-0,Poop bucket-75-30-75,Bag of Soil-75-75-75", "Make certain items considered fertilizers, and customize their NPK values. Format: Item A-10-10-10,Item B-10-10-10"); appleList = config.Bind<string>("Custom Specific Ingredients", "Cook as Apple", "Apple,Generic apple", "This is apple."); grape0List = config.Bind<string>("Custom Specific Ingredients", "Cook as Red Grapes", "Grape,Grapes", "This is red grape."); grape1List = config.Bind<string>("Custom Specific Ingredients", "Cook as Green Grapes", "", "This is green grape."); potatoList = config.Bind<string>("Custom Specific Ingredients", "Cook as Potato", "", "This is potato."); } } namespace MelanieMeliciousCooked { public class AimGame : MonoBehaviour { internal bool hit = false; [SerializeField] internal GameObject game; [SerializeField] private Collider2D aim; internal static AimGame Instance { get; private set; } private void OnTriggerEnter2D(Collider2D other) { if ((Object)(object)other == (Object)(object)aim) { hit = true; } } private void OnTriggerExit2D(Collider2D other) { if ((Object)(object)other == (Object)(object)aim) { hit = false; } } private void Awake() { Instance = this; game.SetActive(false); } } public class Apiary : Grower { [ES3Serializable] internal class Save { [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private Apiary <__instance>P; public short queenIndex; public bool queen; public short[] hiveIndex; public short hives; public int queenValue; public float queenMulti; public float hiveMulti; public Save(Apiary __instance) { <__instance>P = __instance; queenIndex = -1; queen = false; hiveIndex = new short[3] { -1, -1, -1 }; hives = 0; queenValue = 0; queenMulti = 1f; hiveMulti = 1f; base..ctor(); } internal Save GetInfo() { queenIndex = <__instance>P.queenIndex; queen = <__instance>P.queen; hiveIndex = <__instance>P.hiveIndex; hives = <__instance>P.hives; queenValue = <__instance>P.queenValue; queenMulti = <__instance>P.queenMulti; hiveMulti = <__instance>P.hiveMulti; return this; } } [HideInInspector] public NetworkVariable<bool> queenSync = new NetworkVariable<bool>(false, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); [HideInInspector] public NetworkVariable<short> hiveSync = new NetworkVariable<short>((short)0, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); internal Save save; internal short queenIndex = -1; internal bool queen = false; internal short[] hiveIndex = new short[3] { -1, -1, -1 }; internal short hives = 0; [SerializeField] private GameObject queenSpot; [SerializeField] private Transform[] hiveSpots; [SerializeField] private InteractTrigger trigger; internal int queenValue = 0; internal float queenMulti = 1f; internal float hiveMulti = 1f; private short maxValue; private short grow; private List<Item> queenList = new List<Item>(); private List<Item> hiveList = new List<Item>(); private const string add = "Add Items : [LMB]\n"; private const string tip0 = " : Has Queen\n"; private const string tip1 = "/3 Hive Frames (Minimum 1)\n(Can also add 1 hive)"; private const string fullTip = "Add Items : [LMB]\nFalse : Has Queen\n0/3 Hive Frames (Minimum 1)\n(Can also add 1 hive)"; public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); SyncData(); if (((NetworkBehaviour)this).IsHost) { save = new Save(this); queenList.AddRange(new <>z__ReadOnlySingleElementList<Item>(Plugin.itemList[28])); hiveList.AddRange(new <>z__ReadOnlyArray<Item>((Item[])(object)new Item[2] { Plugin.itemList[31], Plugin.itemList[33] })); HarmonyPatches.growers.Add(this); maxValue = (short)MelanieCookedConfig.beeMax.Value; grow = (short)MelanieCookedConfig.beeGrow0.Value; } } private void SyncData() { queen = queenSync.Value; hives = hiveSync.Value; trigger.hoverTip = "Add Items : [LMB]\n" + queen + " : Has Queen\n" + hives + "/3 Hive Frames (Minimum 1)\n(Can also add 1 hive)"; if (queen && hives == 3) { trigger.interactable = false; } queenSpot.SetActive(queen); for (int i = 0; i < hives; i++) { ((Component)hiveSpots[i]).gameObject.SetActive(true); } } [ServerRpc(RequireOwnership = false)] internal void LoadSaveServerRpc(bool queenLoad, short hiveLoad) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2208851517u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref queenLoad, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, hiveLoad); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2208851517u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; queenSync.Value = queenLoad; hiveSync.Value = hiveLoad; SyncData(); } } } internal override void Produce() { if (Random.Range(0, 99) <= grow) { queenValue += Random.Range(1, 5); } } internal override void Age() { //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) if (!queen || hives == 0) { return; } Bee bee = default(Bee); for (int i = 0; i < hives; i++) { if (hiveIndex[i] != -1) { GameObject val = Object.Instantiate<GameObject>(hiveList[hiveIndex[i]].spawnPrefab, hiveSpots[i].position, hiveSpots[i].rotation, ((Component)this).transform); if (val.TryGetComponent<Bee>(ref bee)) { bee.value = (short)((float)queenValue * queenMulti + (float)Random.Range(5, (int)maxValue) * hiveMulti); NetworkObject component = val.GetComponent<NetworkObject>(); component.Spawn(false); AgeClientRpc(NetworkObjectReference.op_Implicit(component), bee.value, harvest: true); } } } GameObject val2 = Object.Instantiate<GameObject>(queenList[queenIndex].spawnPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation, ((Component)this).transform); NetworkObject component2 = val2.GetComponent<NetworkObject>(); component2.Spawn(false); AgeClientRpc(NetworkObjectReference.op_Implicit(component2), queenValue); DiscardClientRpc(); } [ClientRpc] private void AgeClientRpc(NetworkObjectReference netObjRef, int value, bool harvest = false) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1714685434u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref netObjRef, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, value); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref harvest, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1714685434u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref netObjRef)).TryGet(ref val3, (NetworkManager)null)) { GrabbableObject component = ((Component)val3).GetComponent<GrabbableObject>(); component.SetScrapValue(value); Bee bee = default(Bee); if (harvest && ((Component)val3).TryGetComponent<Bee>(ref bee)) { bee.harvest.SetActive(true); } } } public void Place(PlayerControllerB playerWhoTriggered) { if (!playerWhoTriggered.isHoldingObject) { return; } Bee bee = default(Bee); if (((Component)playerWhoTriggered.currentlyHeldObjectServer).TryGetComponent<Bee>(ref bee)) { if (bee.isQueen || hives != 3) { PlaceServerRpc(bee.isQueen, bee.type, bee.multiplier, (short)playerWhoTriggered.currentlyHeldObjectServer.scrapValue); playerWhoTriggered.DespawnHeldObject(); } } else if (playerWhoTriggered.currentlyHeldObjectServer.itemProperties.itemId == 1531 && hives != 3) { PlaceServerRpc(isQueen: true, 0, 1f, (short)Random.Range(5, 20)); PlaceServerRpc(isQueen: false, 0, 1f, 0); playerWhoTriggered.DespawnHeldObject(); } } [ServerRpc(RequireOwnership = false)] private void PlaceServerRpc(bool isQueen, short type, float multiplier, short value = 0) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1201096395u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref isQueen, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, type); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref multiplier, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, value); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1201096395u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (isQueen) { if (queen) { queenValue += value / 2; } queenSync.Value = true; queen = true; if (type > queenIndex) { queenIndex = type; } if (multiplier > queenMulti) { queenMulti = multiplier; } if (value > queenValue) { queenValue = value; } } else { NetworkVariable<short> obj = hiveSync; short value2 = obj.Value; obj.Value = (short)(value2 + 1); hiveIndex[hives] = type; hiveMulti *= multiplier; } PlaceClientRpc(isQueen); } [ClientRpc] private void PlaceClientRpc(bool isQueen) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(950914400u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref isQueen, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 950914400u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (isQueen) { queenSpot.SetActive(true); queen = true; } else { ((Component)hiveSpots[hives]).gameObject.SetActive(true); hives++; } if (queen && hives == 3) { trigger.interactable = false; } trigger.hoverTip = "Add Items : [LMB]\n" + queen + " : Has Queen\n" + hives + "/3 Hive Frames (Minimum 1)\n(Can also add 1 hive)"; } } [ClientRpc] private void DiscardClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1825899610u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1825899610u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; trigger.interactable = true; trigger.hoverTip = "Add Items : [LMB]\nFalse : Has Queen\n0/3 Hive Frames (Minimum 1)\n(Can also add 1 hive)"; queen = false; hives = 0; queenSpot.SetActive(false); Transform[] array = hiveSpots; foreach (Transform val3 in array) { ((Component)val3).gameObject.SetActive(false); } if (((NetworkBehaviour)this).IsHost) { queenIndex = -1; hiveIndex = new short[3] { -1, -1, -1 }; queenValue = 0; queenMulti = 1f; hiveMulti = 1f; } } } public override void OnDestroy() { ((NetworkBehaviour)this).OnDestroy(); ((NetworkVariableBase)queenSync).Dispose(); ((NetworkVariableBase)hiveSync).Dispose(); if (((NetworkBehaviour)this).IsHost && HarmonyPatches.growers.Contains(this)) { HarmonyPatches.growers.Remove(this); } } protected override void __initializeVariables() { if (queenSync == null) { throw new Exception("Apiary.queenSync cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)queenSync).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)queenSync, "queenSync"); ((NetworkBehaviour)this).NetworkVariableFields.Add((NetworkVariableBase)(object)queenSync); if (hiveSync == null) { throw new Exception("Apiary.hiveSync cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)hiveSync).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)hiveSync, "hiveSync"); ((NetworkBehaviour)this).NetworkVariableFields.Add((NetworkVariableBase)(object)hiveSync); base.__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2208851517u, new RpcReceiveHandler(__rpc_handler_2208851517), "LoadSaveServerRpc"); ((NetworkBehaviour)this).__registerRpc(1714685434u, new RpcReceiveHandler(__rpc_handler_1714685434), "AgeClientRpc"); ((NetworkBehaviour)this).__registerRpc(1201096395u, new RpcReceiveHandler(__rpc_handler_1201096395), "PlaceServerRpc"); ((NetworkBehaviour)this).__registerRpc(950914400u, new RpcReceiveHandler(__rpc_handler_950914400), "PlaceClientRpc"); ((NetworkBehaviour)this).__registerRpc(1825899610u, new RpcReceiveHandler(__rpc_handler_1825899610), "DiscardClientRpc"); base.__initializeRpcs(); } private static void __rpc_handler_2208851517(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool queenLoad = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref queenLoad, default(ForPrimitives)); short hiveLoad = default(short); ByteUnpacker.ReadValueBitPacked(reader, ref hiveLoad); target.__rpc_exec_stage = (__RpcExecStage)1; ((Apiary)(object)target).LoadSaveServerRpc(queenLoad, hiveLoad); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1714685434(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference netObjRef = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref netObjRef, default(ForNetworkSerializable)); int value = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref value); bool harvest = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref harvest, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Apiary)(object)target).AgeClientRpc(netObjRef, value, harvest); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1201096395(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool isQueen = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref isQueen, default(ForPrimitives)); short type = default(short); ByteUnpacker.ReadValueBitPacked(reader, ref type); float multiplier = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref multiplier, default(ForPrimitives)); short value = default(short); ByteUnpacker.ReadValueBitPacked(reader, ref value); target.__rpc_exec_stage = (__RpcExecStage)1; ((Apiary)(object)target).PlaceServerRpc(isQueen, type, multiplier, value); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_950914400(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool isQueen = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref isQueen, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Apiary)(object)target).PlaceClientRpc(isQueen); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1825899610(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Apiary)(object)target).DiscardClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "Apiary"; } } public class Bait : MonoBehaviour { public float multi = 1f; } public class Barrel : Grower { [ES3Serializable] internal class Save { [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] private Barrel <__instance>P; public short index; public short inputSync; public short ogValue; public Save(Barrel __instance) { <__instance>P = __instance; base..ctor(); } internal Save GetInfo() { index = <__instance>P.index.Value; inputSync = <__instance>P.inputSync.Value; ogValue = <__instance>P.ogValue; return this; } } public NetworkVariable<short> index = new NetworkVariable<short>((short)(-1), (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); public NetworkVariable<short> inputSync = new NetworkVariable<short>((short)0, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); internal Save save; internal short ogValue = 0; [SerializeField] private InteractTrigger trigger; private List<Item> ingredients = new List<Item>(); private Item ingredient; private short maxValue; private short input = 0; private const string add = "Add Ingredient : [LMB]\n"; private const string tip = "/4 "; private const string fullTip = "Add Ingredient : [LMB]\n0/4 Ingredients"; public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); ingredients.AddRange(new <>z__ReadOnlyArray<Item>((Item[])(object)new Item[6] { Plugin.itemList[5], Plugin.itemList[6], Plugin.itemList[15], Plugin.itemList[17], Plugin.itemList[23], Plugin.itemList[29] })); if (!((NetworkBehaviour)this).IsHost) { SyncData(); return; } save = new Save(this); HarmonyPatches.growers.Add(this); maxValue = (short)MelanieCookedConfig.alcoholMax.Value; } private void SyncData() { input = inputSync.Value; if (index.Value != -1) { ingredient = ingredients[index.Value]; if (input == 4) { trigger.interactable = false; return; } trigger.hoverTip = string.Format("{0}{1}{2}{3}", "Add Ingredient : [LMB]\n", input, "/4 ", ingredient.itemName); } else { trigger.hoverTip = "Add Ingredient : [LMB]\n0/4 Ingredients"; } } [ServerRpc(RequireOwnership = false)] internal void LoadSaveServerRpc(short indexLoad, short inputLoad) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(872338705u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, indexLoad); BytePacker.WriteValueBitPacked(val2, inputLoad); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 872338705u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; index.Value = indexLoad; inputSync.Value = inputLoad; SyncData(); } } } internal override void Age() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) if (input < 4) { return; } Ingredient val = default(Ingredient); if (ingredient.spawnPrefab.TryGetComponent<Ingredient>(ref val)) { GameObject val2; if (val.ingredient.Contains(12)) { val2 = Object.Instantiate<GameObject>(Plugin.itemList[22].spawnPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation, ((Component)this).transform); } else if (val.ingredient.Contains(4)) { val2 = Object.Instantiate<GameObject>(Plugin.itemList[21].spawnPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation, ((Component)this).transform); } else if (val.ingredient.Contains(13)) { val2 = Object.Instantiate<GameObject>(Plugin.itemList[18].spawnPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation, ((Component)this).transform); } else if (val.ingredient.Contains(14)) { val2 = Object.Instantiate<GameObject>(Plugin.itemList[19].spawnPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation, ((Component)this).transform); } else if (val.ingredient.Contains(15)) { val2 = Object.Instantiate<GameObject>(Plugin.itemList[20].spawnPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation, ((Component)this).transform); } else { if (!val.ingredient.Contains(18)) { return; } val2 = Object.Instantiate<GameObject>(Plugin.itemList[32].spawnPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation, ((Component)this).transform); } NetworkObject component = val2.GetComponent<NetworkObject>(); component.Spawn(false); AgeClientRpc(NetworkObjectReference.op_Implicit(component), ogValue + Random.Range(5, (int)maxValue)); } ingredient = null; DiscardClientRpc(); } [ClientRpc] private void AgeClientRpc(NetworkObjectReference netObjRef, int value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4080424806u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref netObjRef, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, value); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4080424806u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref netObjRef)).TryGet(ref val3, (NetworkManager)null)) { GrabbableObject component = ((Component)val3).GetComponent<GrabbableObject>(); component.SetScrapValue(value); } } } public void Place(PlayerControllerB playerWhoTriggered) { //IL_0065: Unknown result type (might be due to invalid IL or missing references) if (!playerWhoTriggered.isHoldingObject) { return; } GrabbableObject currentlyHeldObjectServer = playerWhoTriggered.currentlyHeldObjectServer; if ((Object)(object)ingredient == (Object)null) { if (!ingredients.Contains(currentlyHeldObjectServer.itemProperties)) { return; } } else if ((Object)(object)currentlyHeldObjectServer.itemProperties != (Object)(object)ingredient) { return; } PlaceServerRpc(NetworkObjectReference.op_Implicit(((Component)currentlyHeldObjectServer).GetComponent<NetworkObject>()), (short)currentlyHeldObjectServer.scrapValue); playerWhoTriggered.DespawnHeldObject(); } [ServerRpc(RequireOwnership = false)] private void PlaceServerRpc(NetworkObjectReference netObjRef, short value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3891749198u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref netObjRef, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, value); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3891749198u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ogValue += value; PlaceClientRpc(netObjRef); } } } [ClientRpc] private void PlaceClientRpc(NetworkObjectReference netObjRef) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1516274574u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref netObjRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1516274574u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref netObjRef)).TryGet(ref val3, (NetworkManager)null)) { GrabbableObject component = ((Component)val3).GetComponent<GrabbableObject>(); ingredient = component.itemProperties; input++; if (input == 4) { trigger.interactable = false; } else { trigger.hoverTip = string.Format("{0}{1}{2}{3}", "Add Ingredient : [LMB]\n", input, "/4 ", ingredient.itemName); } if (((NetworkBehaviour)this).IsHost) { inputSync.Value = input; index.Value = (short)ingredients.IndexOf(component.itemProperties); } } } public void Discard() { DiscardServerRpc(); } [ServerRpc(RequireOwnership = false)] private void DiscardServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3241937993u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3241937993u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DiscardClientRpc(); } } } [ClientRpc] private void DiscardClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2912601765u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2912601765u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; trigger.interactable = true; trigger.hoverTip = "Add Ingredient : [LMB]\n0/4 Ingredients"; input = 0; ingredient = null; if (((NetworkBehaviour)this).IsHost) { index.Value = -1; ogValue = 0; inputSync.Value = 0; } } } public override void OnDestroy() { ((NetworkBehaviour)this).OnDestroy(); ((NetworkVariableBase)index).Dispose(); ((NetworkVariableBase)inputSync).Dispose(); if (((NetworkBehaviour)this).IsHost && HarmonyPatches.growers.Contains(this)) { HarmonyPatches.growers.Remove(this); } } protected override void __initializeVariables() { if (index == null) { throw new Exception("Barrel.index cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)index).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)index, "index"); ((NetworkBehaviour)this).NetworkVariableFields.Add((NetworkVariableBase)(object)index); if (inputSync == null) { throw new Exception("Barrel.inputSync cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)inputSync).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)inputSync, "inputSync"); ((NetworkBehaviour)this).NetworkVariableFields.Add((NetworkVariableBase)(object)inputSync); base.__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(872338705u, new RpcReceiveHandler(__rpc_handler_872338705), "LoadSaveServerRpc"); ((NetworkBehaviour)this).__registerRpc(4080424806u, new RpcReceiveHandler(__rpc_handler_4080424806), "AgeClientRpc"); ((NetworkBehaviour)this).__registerRpc(3891749198u, new RpcReceiveHandler(__rpc_handler_3891749198), "PlaceServerRpc"); ((NetworkBehaviour)this).__registerRpc(1516274574u, new RpcReceiveHandler(__rpc_handler_1516274574), "PlaceClientRpc"); ((NetworkBehaviour)this).__registerRpc(3241937993u, new RpcReceiveHandler(__rpc_handler_3241937993), "DiscardServerRpc"); ((NetworkBehaviour)this).__registerRpc(2912601765u, new RpcReceiveHandler(__rpc_handler_2912601765), "DiscardClientRpc"); base.__initializeRpcs(); } private static void __rpc_handler_872338705(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { short indexLoad = default(short); ByteUnpacker.ReadValueBitPacked(reader, ref indexLoad); short inputLoad = default(short); ByteUnpacker.ReadValueBitPacked(reader, ref inputLoad); target.__rpc_exec_stage = (__RpcExecStage)1; ((Barrel)(object)target).LoadSaveServerRpc(indexLoad, inputLoad); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4080424806(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference netObjRef = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref netObjRef, default(ForNetworkSerializable)); int value = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref value); target.__rpc_exec_stage = (__RpcExecStage)1; ((Barrel)(object)target).AgeClientRpc(netObjRef, value); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3891749198(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference netObjRef = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref netObjRef, default(ForNetworkSerializable)); short value = default(short); ByteUnpacker.ReadValueBitPacked(reader, ref value); target.__rpc_exec_stage = (__RpcExecStage)1; ((Barrel)(object)target).PlaceServerRpc(netObjRef, value); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1516274574(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference netObjRef = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref netObjRef, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Barrel)(object)target).PlaceClientRpc(netObjRef); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3241937993(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Barrel)(object)target).DiscardServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2912601765(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Barrel)(object)target).DiscardClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "Barrel"; } } public class Bee : NetworkBehaviour { public short type = 0; public bool isQueen; public float multiplier = 1f; public short value = 0; [SerializeField] internal GameObject harvest; public void SpawnItem() { SpawnItemServerRpc(29); SpawnItemServerRpc(30); } [ServerRpc(RequireOwnership = false)] private void SpawnItemServerRpc(int itemList) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1347203381u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, itemList); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1347203381u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; GameObject val3 = Object.Instantiate<GameObject>(Plugin.itemList[itemList].spawnPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation, ((Component)this).transform.parent); val3.GetComponent<NetworkObject>().Spawn(false); SpawnItemClientRpc(NetworkObjectReference.op_Implicit(val3.GetComponent<NetworkObject>())); } } } [ClientRpc] private void SpawnItemClientRpc(NetworkObjectReference netObjRef) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(96840184u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref netObjRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 96840184u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref netObjRef)).TryGet(ref val3, (NetworkManager)null)) { ((Component)val3).GetComponent<GrabbableObject>().SetScrapValue(value / 2); } ((Component)this).GetComponent<GrabbableObject>().SetScrapValue(0); harvest.SetActive(false); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1347203381u, new RpcReceiveHandler(__rpc_handler_1347203381), "SpawnItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(96840184u, new RpcReceiveHandler(__rpc_handler_96840184), "SpawnItemClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1347203381(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int itemList = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref itemList); target.__rpc_exec_stage = (__RpcExecStage)1; ((Bee)(object)target).SpawnItemServerRpc(itemList); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_96840184(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference netObjRef = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref netObjRef, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Bee)(object)target).SpawnItemClientRpc(netObjRef); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "Bee"; } } public class Blender : Refine { public override void OnNetworkSpawn() { ((Refine)this).OnNetworkSpawn(); base.recipeList = Plugin.blender.ToArray(); base.refineMax = MelanieCookedConfig.juiceMax.Value; } protected override void __initializeVariables() { ((Refine)this).__initializeVariables(); } protected override void __initializeRpcs() { ((Refine)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "Blender"; } } public class Bobber : MonoBehaviour { [CompilerGenerated] private sealed class <StartFish>d__8 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Bobber <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <StartFish>d__8(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; <>4__this.isBiting = true; AimGame.Instance.game.SetActive(true); <>4__this.anim.SetInteger("play", 1); <>4__this.fisher.anim.Play(<>4__this.fisher.bite); HUDManager.Instance.ShakeCamera((ScreenShakeType)0); <>2__current = (object)new WaitForSeconds(1.5f); <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this.isBiting = false; AimGame.Instance.game.SetActive(false); <>4__this.anim.SetInteger("play", 0); <>4__this.fisher.anim.Play(<>4__this.fisher.lose); <>2__current = (object)new WaitForSeconds(0.4f); <>1__state = 3; return true; case 3: <>1__state = -1; if ((Object)(object)((GrabbableObject)<>4__this.fisher).playerHeldBy != (Object)null) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); ((GrabbableObject)<>4__this.fisher).playerHeldBy.playerBodyAnimator.SetTrigger("Damage"); ((GrabbableObject)<>4__this.fisher).playerHeldBy.PlayQuickSpecialAnimation(0.7f); } break; } if (!<>4__this.isBiting) { <>2__current = (object)new WaitForSeconds((float)Random.Range(5, 16)); <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public Fisher fisher; internal bool isBiting = false; private bool isFishing = false; [SerializeField] private Rigidbody rb; [SerializeField] private LineRenderer line; [SerializeField] private Animator anim; private const string play = "play"; public void OnTriggerEnter(Collider other) { QuicksandTrigger val = default(QuicksandTrigger); if (!isFishing && ((Component)other).TryGetComponent<QuicksandTrigger>(ref val) && val.isWater) { isFishing = true; rb.isKinematic = true; ((Behaviour)anim).enabled = true; ((MonoBehaviour)this).StopAllCoroutines(); ((MonoBehaviour)this).StartCoroutine(StartFish()); } } [IteratorStateMachine(typeof(<StartFish>d__8))] internal IEnumerator StartFish() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <StartFish>d__8(0) { <>4__this = this }; } private void Update() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) line.SetPositions((Vector3[])(object)new Vector3[2] { ((Component)this).transform.position, fisher.line.position }); } private void Start() { line.widthMultiplier = 0.02f; } } public class BurstBerry : NetworkBehaviour { [SerializeField] private Animator animator; [SerializeField] private GameObject spawn0; [SerializeField] private GameObject spawn1; [SerializeField] private Collider range; private const string play = "play"; private short grow0; private short grow1; private short maxValue0; private short maxValue1; private bool grown = false; public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); if (((NetworkBehaviour)this).IsHost) { maxValue0 = (short)MelanieCookedConfig.burstBerry0Max.Value; maxValue1 = (short)MelanieCookedConfig.burstBerry1Max.Value; grow0 = (short)MelanieCookedConfig.burstBerryGrow0.Value; grow1 = (short)MelanieCookedConfig.burstBerryGrow1.Value; HarmonyPatches.burstBushes.Add(this); } } public void SpawnItem() { SpawnItemServerRpc(); } [ServerRpc(RequireOwnership = false)] private void SpawnItemServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1816177754u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1816177754u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; GameObject val3 = Object.Instantiate<GameObject>(spawn0, ((Component)this).transform.position, ((Component)this).transform.rotation, ((Component)this).transform); val3.GetComponent<NetworkObject>().Spawn(false); AnimateClientRpc(2); SpawnItemClientRpc(NetworkObjectReference.op_Implicit(val3.GetComponent<NetworkObject>()), Random.Range(maxValue0 / 2, (int)maxValue0)); } } } [ClientRpc] private void SpawnItemClientRpc(NetworkObjectReference netObjRef, int value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2932696052u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref netObjRef, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, value); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2932696052u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref netObjRef)).TryGet(ref val3, (NetworkManager)null)) { ((Component)val3).GetComponent<GrabbableObject>().SetScrapValue(value); } } } public void Boom() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; Bounds bounds = range.bounds; if (((Bounds)(ref bounds)).Contains(((Component)localPlayerController).transform.position)) { localPlayerController.DamagePlayer(30, true, true, (CauseOfDeath)16, 0, false, default(Vector3)); } if (!((NetworkBehaviour)this).IsHost) { return; } Collider[] array = Physics.OverlapSphere(((Component)this).transform.position, 6f, 2621448, (QueryTriggerInteraction)2); Collider[] array2 = array; foreach (Collider val in array2) { float num = Vector3.Distance(((Component)this).transform.position, ((Component)val).transform.position); if (((Component)val).gameObject.layer == 19) { EnemyAICollisionDetect componentInChildren = ((Component)val).GetComponentInChildren<EnemyAICollisionDetect>(); if ((Object)(object)componentInChildren != (Object)null && ((NetworkBehaviour)componentInChildren.mainScript).IsOwner) { componentInChildren.mainScript.HitFromExplosion((float)((double)num * 1.5)); } } } } internal void Produce() { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) if (!grown && Random.Range(0, 99) <= grow0) { if (Random.Range(0, 99) > grow1) { AnimateClientRpc(1); } else { GameObject val = Object.Instantiate<GameObject>(spawn1, ((Component)this).transform.position, ((Component)this).transform.rotation, ((Component)this).transform); val.GetComponent<NetworkObject>().Spawn(false); SpawnItemClientRpc(NetworkObjectReference.op_Implicit(val.GetComponent<NetworkObject>()), Random.Range(maxValue1 / 2, (int)maxValue1)); AnimateClientRpc(3); } grown = true; } } [ClientRpc] private void AnimateClientRpc(int set) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(251502498u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, set); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 251502498u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; animator.SetInteger("play", set); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1816177754u, new RpcReceiveHandler(__rpc_handler_1816177754), "SpawnItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(2932696052u, new RpcReceiveHandler(__rpc_handler_2932696052), "SpawnItemClientRpc"); ((NetworkBehaviour)this).__registerRpc(251502498u, new RpcReceiveHandler(__rpc_handler_251502498), "AnimateClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1816177754(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((BurstBerry)(object)target).SpawnItemServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2932696052(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference netObjRef = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref netObjRef, default(ForNetworkSerializable)); int value = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref value); target.__rpc_exec_stage = (__RpcExecStage)1; ((BurstBerry)(object)target).SpawnItemClientRpc(netObjRef, value); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_251502498(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int set = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref set); target.__rpc_exec_stage = (__RpcExecStage)1; ((BurstBerry)(object)target).AnimateClientRpc(set); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "BurstBerry"; } } public class Crockpot : Crafter { public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); base.recipeList = Plugin.crockpot.ToArray(); base.craftMin = MelanieCookedConfig.cookRange0.Value; base.craftMax = MelanieCookedConfig.cookRange1.Value; } protected override void __initializeVariables() { ((Crafter)this).__initializeVariables(); } protected override void __initializeRpcs() { ((Crafter)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "Crockpot"; } } public class Fisher : GrabbableObject { [CompilerGenerated] private sealed class <>c__DisplayClass21_0 { public NetworkObject netObj; internal bool <SpawnItem>b__0() { return netObj.IsSpawned; } } [CompilerGenerated] private sealed class <SpawnItem>d__21 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public NetworkObject netObj; public int value; public Fisher <>4__this; private <>c__DisplayClass21_0 <>8__1; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <SpawnItem>d__21(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass21_0(); <>8__1.netObj = netObj; <>2__current = (object)new WaitUntil((Func<bool>)(() => <>8__1.netObj.IsSpawned)); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = (object)new WaitForEndOfFrame(); <>1__state = 2; return true; case 2: <>1__state = -1; <>2__current = (object)new WaitForEndOfFrame(); <>1__state = 3; return true; case 3: <>1__state = -1; if ((Object)(object)((GrabbableObject)<>4__this).playerHeldBy != (Object)null) { ((Component)<>8__1.netObj).GetComponent<GrabbableObject>().targetFloor