using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using Photon.Pun; using REPOLib.Modules; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("")] [assembly: AssemblyCompany("XiaoHai")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("TrashBox")] [assembly: AssemblyTitle("TrashBox")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace TrashBox { [BepInPlugin("com.REPO.XiaoHai.TrashBox", "TrashBox", "1.3")] public class Plugin : BaseUnityPlugin { private const string AssetBundleFileName = "trashbox"; public GameObject? TrashPrefab; public AudioClip? Trash2Money; public ConfigEntry? recoveryRatioMin; public ConfigEntry? recoveryRatioMax; internal static Plugin instance { get; private set; } internal static ManualLogSource logger => ((BaseUnityPlugin)instance).Logger; internal Harmony? Harmony { get; set; } private void Awake() { instance = this; ((Component)this).gameObject.transform.parent = null; ((Object)((Component)this).gameObject).hideFlags = (HideFlags)61; recoveryRatioMin = ((BaseUnityPlugin)this).Config.Bind("General", "RecoveryRatioMin", 0.3f, "The minimum ratio of item value recovered when trashing items."); recoveryRatioMax = ((BaseUnityPlugin)this).Config.Bind("General", "RecoveryRatioMax", 0.8f, "The maximum ratio of item value recovered when trashing items."); LoadAB(); Patch(); ((BaseUnityPlugin)this).Logger.LogInfo((object)$"{((BaseUnityPlugin)this).Info.Metadata.GUID} v{((BaseUnityPlugin)this).Info.Metadata.Version} has loaded!"); } internal void Patch() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0026: Expected O, but got Unknown if (Harmony == null) { Harmony val = new Harmony(((BaseUnityPlugin)this).Info.Metadata.GUID); Harmony val2 = val; Harmony = val; } Harmony.PatchAll(); } internal void Unpatch() { Harmony? harmony = Harmony; if (harmony != null) { harmony.UnpatchSelf(); } } private void Update() { } private IEnumerable EnumerateAssetBundleDirectories() { List directories = new List(); HashSet seen = new HashSet(StringComparer.OrdinalIgnoreCase); AddDirectory(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location)); AddDirectory(Paths.PluginPath); if (!string.IsNullOrWhiteSpace(Paths.PluginPath) && Directory.Exists(Paths.PluginPath)) { try { foreach (string item in Directory.EnumerateDirectories(Paths.PluginPath, "*", SearchOption.AllDirectories)) { AddDirectory(item); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("扫描插件目录失败: " + ex.Message)); } } return directories; void AddDirectory(string? dir) { if (!string.IsNullOrWhiteSpace(dir) && Directory.Exists(dir)) { string fullPath = Path.GetFullPath(dir); if (seen.Add(fullPath)) { directories.Add(fullPath); } } } } private string? FindAssetBundlePath() { string fileName = Path.GetFileName(((BaseUnityPlugin)this).Info.Location); List list = EnumerateAssetBundleDirectories().ToList(); foreach (string item in list) { string text = Path.Combine(item, "trashbox"); string path = Path.Combine(item, fileName); if (File.Exists(text) && File.Exists(path)) { return text; } } foreach (string item2 in list) { string text2 = Path.Combine(item2, "trashbox"); if (File.Exists(text2)) { return text2; } } return null; } private void LoadAB() { string text = FindAssetBundlePath(); if (string.IsNullOrWhiteSpace(text)) { ((BaseUnityPlugin)this).Logger.LogError((object)("未找到 AssetBundle 'trashbox'。请确保它和 " + Path.GetFileName(((BaseUnityPlugin)this).Info.Location) + " 位于 BepInEx/plugins 下的同一目录。")); return; } ((BaseUnityPlugin)this).Logger.LogInfo((object)("从以下路径加载 AssetBundle: " + text)); AssetBundle val = AssetBundle.LoadFromFile(text); if ((Object)(object)val == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)("AssetBundle 加载失败: " + text)); return; } TrashPrefab = val.LoadAsset("TrashBox.prefab"); Trash2Money = val.LoadAsset("trashBox.wav"); if ((Object)(object)TrashPrefab != (Object)null) { logger.LogInfo((object)"TrashBox Prefab 加载成功."); if ((Object)(object)TrashPrefab.GetComponent() == (Object)null) { TrashPrefab.AddComponent(); } NetworkPrefabs.RegisterNetworkPrefab(TrashPrefab); Utilities.FixAudioMixerGroups(TrashPrefab); } else { logger.LogError((object)"电视机预制体加载失败."); } } } [HarmonyPatch] public static class Patch { [HarmonyPatch(typeof(LevelGenerator))] public class LevelGeneratorPatch { [HarmonyPatch("GenerateDone")] [HarmonyPostfix] private static void AfterLevelGenerated(LevelGenerator __instance) { //IL_0091: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)Plugin.instance.TrashPrefab == (Object)null || !ShouldRunCustomLogic() || !SemiFunc.IsMasterClientOrSingleplayer()) { return; } Plugin.logger.LogInfo((object)"在关卡生成后放置垃圾桶."); GameObject val = GameObject.Find("cctv"); if ((Object)(object)val != (Object)null) { if (SemiFunc.IsMultiplayer()) { GameObject val2 = PhotonNetwork.InstantiateRoomObject(((Object)Plugin.instance.TrashPrefab).name, Vector3.zero, Quaternion.identity, (byte)0, (object[])null); } else { GameObject val2 = Object.Instantiate(Plugin.instance.TrashPrefab, Vector3.zero, Quaternion.identity); } } } private static bool ShouldRunCustomLogic() { RunManager instance = RunManager.instance; return (Object)(object)instance != (Object)null && instance.levels.Contains(instance.levelCurrent) && (Object)(object)instance.levelCurrent != (Object)(object)instance.levelTutorial && !instance.levelShop.Contains(instance.levelCurrent) && (Object)(object)instance.levelCurrent != (Object)(object)instance.levelLobbyMenu; } } } public class TrashBox : MonoBehaviour { [CompilerGenerated] private sealed class d__28 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public TrashBox <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__28(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0084: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = <>4__this.MoveLocalY(<>4__this.dangBan, 0f, 1f); <>1__state = 1; return true; case 1: <>1__state = -1; if (<>4__this.trashSound != null) { <>4__this.trashSound.Play(<>4__this.dangBan.transform.position, 1f, 1f, 1f, 1f); } 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(); } } [CompilerGenerated] private sealed class d__31 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GameObject go; public float targetY; public float duration; public TrashBox <>4__this; private Transform 5__1; private float 5__2; private float 5__3; private Vector3 5__4; private float 5__5; private Vector3 5__6; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__31(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_003b: 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_0091: 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_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = go.transform; 5__2 = 5__1.localPosition.y; 5__3 = 0f; break; case 1: <>1__state = -1; break; } if (5__3 < duration) { 5__3 += Time.deltaTime; 5__5 = Mathf.Clamp01(5__3 / duration); 5__6 = 5__1.localPosition; 5__6.y = Mathf.Lerp(5__2, targetY, 5__5); 5__1.localPosition = 5__6; <>2__current = null; <>1__state = 1; return true; } 5__4 = 5__1.localPosition; 5__4.y = targetY; 5__1.localPosition = 5__4; 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(); } } [CompilerGenerated] private sealed class d__30 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public TrashBox <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__30(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = <>4__this.MoveLocalY(<>4__this.dangBan, 0.6f, 2f); <>1__state = 1; return true; case 1: <>1__state = -1; 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(); } } [CompilerGenerated] private sealed class d__25 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public TrashBox <>4__this; private float 5__1; private float 5__2; private float 5__3; private float 5__4; private List 5__5; private List.Enumerator <>s__6; private ItemAttributes 5__7; private PhysGrabObject 5__8; private float 5__9; private float 5__10; private float 5__11; private StatsManager 5__12; private int 5__13; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__25(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__5 = null; <>s__6 = default(List.Enumerator); 5__7 = null; 5__8 = null; 5__12 = null; <>1__state = -2; } private bool MoveNext() { //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Expected O, but got Unknown //IL_0532: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.busy = true; if ((Object)(object)<>4__this.pv != (Object)null) { if (SemiFunc.IsMultiplayer()) { <>4__this.pv.RPC("RPC_Close", (RpcTarget)0, Array.Empty()); } else { <>4__this.RPC_Close(); } } else if ((Object)(object)<>4__this.dangBan != (Object)null) { <>2__current = <>4__this.MoveLocalY(<>4__this.dangBan, 0f, 1f); <>1__state = 1; return true; } goto IL_0137; case 1: <>1__state = -1; if (<>4__this.trashSound != null) { <>4__this.trashSound.Play(<>4__this.dangBan.transform.position, 1f, 1f, 1f, 1f); } goto IL_0137; case 2: <>1__state = -1; 5__1 = 0f; 5__2 = 0f; if (SemiFunc.IsMasterClientOrSingleplayer()) { 5__3 = 0.5f; 5__4 = 0.5f; if (Plugin.instance.recoveryRatioMin != null && Plugin.instance.recoveryRatioMax != null) { 5__3 = Mathf.Min(Plugin.instance.recoveryRatioMin.Value, Plugin.instance.recoveryRatioMax.Value); 5__4 = Mathf.Max(Plugin.instance.recoveryRatioMin.Value, Plugin.instance.recoveryRatioMax.Value); } 5__5 = new List(<>4__this.insideSet); <>s__6 = 5__5.GetEnumerator(); try { while (<>s__6.MoveNext()) { 5__7 = <>s__6.Current; if (!Object.op_Implicit((Object)(object)5__7)) { continue; } 5__8 = ((Component)5__7).GetComponent(); ReleaseGrabbers(5__8); if (Object.op_Implicit((Object)(object)ShopManager.instance)) { ShopManager.instance.ShoppingListItemRemove(5__7); } 5__9 = GetItemCurrencyValue(5__7); 5__10 = Random.Range(5__3, 5__4); 5__11 = 5__9 * 5__10; 5__1 += 5__9; 5__2 += 5__11; Plugin.logger.LogInfo((object)$"垃圾桶回收物品: {((Object)5__7).name},原始价值: {5__9},本次比例: {5__10:F2},回收价值: {5__11}"); try { 5__12 = StatsManager.instance; if ((Object)(object)5__12 != (Object)null) { if (!string.IsNullOrEmpty(5__7.instanceName)) { 5__12.ItemRemove(5__7.instanceName); } else if (Object.op_Implicit((Object)(object)5__7.item)) { 5__13 = 5__12.GetItemPurchased(5__7.item); 5__12.SetItemPurchase(5__7.item, Mathf.Max(0, 5__13 - 1)); } } 5__12 = null; } catch { } if ((Object)(object)5__8 != (Object)null) { 5__8.DestroyPhysGrabObject(); } else if (SemiFunc.IsMultiplayer()) { PhotonNetwork.Destroy(((Component)5__7).gameObject); } else { Object.Destroy((Object)(object)((Component)5__7).gameObject); } 5__8 = null; 5__7 = null; } } finally { ((IDisposable)<>s__6).Dispose(); } <>s__6 = default(List.Enumerator); Plugin.logger.LogInfo((object)$"垃圾桶回收完成,物品数: {5__5.Count},原始总值: {5__1},生成金额: {5__2}"); 5__5 = null; } if (SemiFunc.IsMasterClientOrSingleplayer() && (Object)(object)<>4__this.moneyPoint != (Object)null && 5__2 > 0f) { SpawnMoney(<>4__this.moneyPoint.transform.position, 5__2); } if ((Object)(object)<>4__this.pv != (Object)null) { if (SemiFunc.IsMultiplayer()) { <>4__this.pv.RPC("RPC_Open", (RpcTarget)0, Array.Empty()); } else { <>4__this.RPC_Open(); } } else if ((Object)(object)<>4__this.dangBan != (Object)null) { <>2__current = <>4__this.MoveLocalY(<>4__this.dangBan, 0.6f, 2f); <>1__state = 3; return true; } break; case 3: { <>1__state = -1; break; } IL_0137: <>2__current = (object)new WaitForSeconds(<>4__this.processDuration); <>1__state = 2; return true; } <>4__this.insideSet.Clear(); <>4__this.lastSeenTimes.Clear(); <>4__this.busy = false; 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(); } } private GameObject? moneyPoint; private GameObject? dangBan; private Collider? trashCollider; private bool busy; private float dangBanDefaultY; private readonly List candidates = new List(); private readonly HashSet insideSet = new HashSet(); private readonly Dictionary originalScales = new Dictionary(); private readonly Dictionary scaleVelocities = new Dictionary(); private readonly Dictionary lastSeenTimes = new Dictionary(); [SerializeField] private float collectWindow = 3f; [SerializeField] private float processDuration = 3f; [SerializeField] private float insideScaleMultiplier = 0.5f; [SerializeField] private float scaleSmoothTime = 0.12f; [SerializeField] private float insideExitGraceTime = 0.2f; private float collectTimer; private Sound? trashSound; private PhotonView? pv; private void Awake() { //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Expected O, but got Unknown //IL_015b: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.Find("cctv"); if ((Object)(object)val != (Object)null) { Plugin.logger.LogInfo((object)"tv不为空!."); SetTransform(val, ((Component)this).gameObject); } else { Plugin.logger.LogInfo((object)"tv为空!."); } Transform obj = ((Component)this).transform.Find("MoneyPoint"); moneyPoint = ((obj != null) ? ((Component)obj).gameObject : null); Transform obj2 = ((Component)this).transform.Find("DangBan"); dangBan = ((obj2 != null) ? ((Component)obj2).gameObject : null); Transform obj3 = ((Component)this).transform.Find("Collider/TrashCollider"); GameObject val2 = ((obj3 != null) ? ((Component)obj3).gameObject : null); if ((Object)(object)val2 != (Object)null) { trashCollider = val2.GetComponentInChildren(); } if ((Object)(object)moneyPoint == (Object)null || (Object)(object)dangBan == (Object)null || (Object)(object)trashCollider == (Object)null) { Plugin.logger.LogError((object)"TrashBox initialization failed: Missing components."); Object.Destroy((Object)(object)((Component)this).gameObject); } else { dangBanDefaultY = dangBan.transform.localPosition.y; } if ((Object)(object)Plugin.instance.Trash2Money != (Object)null) { trashSound = new Sound(); trashSound.Type = (AudioType)6; trashSound.SpatialBlend = 1f; trashSound.Volume = 1f; trashSound.Pitch = 1f; trashSound.Sounds = (AudioClip[])(object)new AudioClip[1] { Plugin.instance.Trash2Money }; } pv = ((Component)this).GetComponent(); } public static void SetTransform(GameObject cctv, GameObject tb) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0049: 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) tb.transform.SetParent(cctv.transform, false); tb.transform.localPosition = new Vector3(0.58f, -4.28f, -0.19f); tb.transform.localRotation = Quaternion.Euler(90f, 180f, 0f); tb.transform.localScale = new Vector3(2f, 2f, 1.5f); } public static void SpawnMoney(Vector3 position, float recycleValue) { //IL_0078: 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_0065: 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) GameObject surplusValuableSmall = AssetManager.instance.surplusValuableSmall; int num = Mathf.Max(1000, Mathf.RoundToInt(Mathf.Round(recycleValue / 100f) * 100f)); Plugin.logger.LogInfo((object)$"生成回收钱袋,价值: {num}"); GameObject val = ((!SemiFunc.IsMultiplayer()) ? Object.Instantiate(surplusValuableSmall, position, Quaternion.identity) : PhotonNetwork.InstantiateRoomObject("Valuables/" + ((Object)surplusValuableSmall).name, position, Quaternion.identity, (byte)0, (object[])null)); ValuableObject component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.dollarValueOverride = num; } } private void Update() { //IL_00c8: Unknown result type (might be due to invalid IL or missing references) if (!SemiFunc.IsMasterClientOrSingleplayer() || busy || (Object)(object)trashCollider == (Object)null) { return; } candidates.Clear(); GatherItemAttrsInside(candidates); float time = Time.time; bool flag = false; for (int i = 0; i < candidates.Count; i++) { ItemAttributes val = candidates[i]; lastSeenTimes[val] = time; if (!insideSet.Contains(val)) { insideSet.Add(val); flag = true; } if (!originalScales.ContainsKey(val)) { originalScales[val] = ((Component)val).transform.localScale; } } foreach (ItemAttributes item in new List(insideSet)) { float value; if (!Object.op_Implicit((Object)(object)item)) { insideSet.Remove(item); originalScales.Remove(item); scaleVelocities.Remove(item); lastSeenTimes.Remove(item); } else if (!lastSeenTimes.TryGetValue(item, out value) || !(time - value <= insideExitGraceTime)) { insideSet.Remove(item); lastSeenTimes.Remove(item); } } UpdateItemScaleTransitions(); if (flag) { collectTimer = collectWindow; } if (insideSet.Count == 0) { if (collectTimer > 0f) { collectTimer -= Time.deltaTime; } } else if (collectTimer > 0f) { collectTimer -= Time.deltaTime; } else if (insideSet.Count > 0) { ((MonoBehaviour)this).StartCoroutine(ProcessDebounced()); } } private void UpdateItemScaleTransitions() { //IL_007e: 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_0075: 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) //IL_00a6: 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) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) foreach (KeyValuePair item in new List>(originalScales)) { ItemAttributes key = item.Key; if (!Object.op_Implicit((Object)(object)key)) { originalScales.Remove(key); scaleVelocities.Remove(key); lastSeenTimes.Remove(key); continue; } Vector3 val = (insideSet.Contains(key) ? (item.Value * insideScaleMultiplier) : item.Value); Vector3 value; Vector3 value2 = (scaleVelocities.TryGetValue(key, out value) ? value : Vector3.zero); ((Component)key).transform.localScale = Vector3.SmoothDamp(((Component)key).transform.localScale, val, ref value2, scaleSmoothTime); scaleVelocities[key] = value2; if (!insideSet.Contains(key) && Vector3.Distance(((Component)key).transform.localScale, item.Value) < 0.01f) { ((Component)key).transform.localScale = item.Value; originalScales.Remove(key); scaleVelocities.Remove(key); } } } private static float GetItemCurrencyValue(ItemAttributes attr) { try { attr.GetValue(); } catch { } return Mathf.Max(1000f, (float)attr.value * 1000f); } private void GatherItemAttrsInside(List list) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)trashCollider == (Object)null) { return; } Bounds bounds = trashCollider.bounds; Collider[] array = Physics.OverlapBox(((Bounds)(ref bounds)).center, ((Bounds)(ref bounds)).extents, ((Component)trashCollider).transform.rotation); Collider[] array2 = array; foreach (Collider val in array2) { ItemAttributes componentInParent = ((Component)val).GetComponentInParent(); if (Object.op_Implicit((Object)(object)componentInParent) && !list.Contains(componentInParent)) { list.Add(componentInParent); } } } [IteratorStateMachine(typeof(d__25))] private IEnumerator ProcessDebounced() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__25(0) { <>4__this = this }; } private static void ReleaseGrabbers(PhysGrabObject? physGrabObject) { if ((Object)(object)physGrabObject == (Object)null || physGrabObject.playerGrabbing.Count == 0) { return; } PhotonView component = ((Component)physGrabObject).GetComponent(); int num = (((Object)(object)component != (Object)null) ? component.ViewID : (-1)); foreach (PhysGrabber item in physGrabObject.playerGrabbing.ToList()) { if (Object.op_Implicit((Object)(object)item)) { item.ReleaseObject(num, 0.1f); } } } [PunRPC] private void RPC_Close() { if (Object.op_Implicit((Object)(object)dangBan)) { ((MonoBehaviour)this).StartCoroutine(CloseCo()); } } [IteratorStateMachine(typeof(d__28))] private IEnumerator CloseCo() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__28(0) { <>4__this = this }; } [PunRPC] private void RPC_Open() { if (Object.op_Implicit((Object)(object)dangBan)) { ((MonoBehaviour)this).StartCoroutine(OpenCo()); } } [IteratorStateMachine(typeof(d__30))] private IEnumerator OpenCo() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__30(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__31))] private IEnumerator MoveLocalY(GameObject go, float targetY, float duration) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__31(0) { <>4__this = this, go = go, targetY = targetY, duration = duration }; } } }