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.Text; using AdvancedDealing; using AdvancedDealing.Economy; using AdvancedDealing.Localization; using AdvancedDealing.Messaging; using AdvancedDealing.Messaging.Messages; using AdvancedDealing.NPCs.Behaviour; using AdvancedDealing.Persistence; using AdvancedDealing.Persistence.Datas; using AdvancedDealing.Persistence.IO; using AdvancedDealing.UI; using AdvancedDealing.Utils; using HarmonyLib; using Il2CppFishNet; using Il2CppGameKit.Utilities; using Il2CppInterop.Runtime.InteropTypes; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppScheduleOne; using Il2CppScheduleOne.Core.Items.Framework; using Il2CppScheduleOne.DevUtilities; using Il2CppScheduleOne.Dialogue; using Il2CppScheduleOne.Economy; using Il2CppScheduleOne.GameTime; using Il2CppScheduleOne.ItemFramework; using Il2CppScheduleOne.Map; using Il2CppScheduleOne.Messaging; using Il2CppScheduleOne.Money; using Il2CppScheduleOne.NPCs; using Il2CppScheduleOne.NPCs.Behaviour; using Il2CppScheduleOne.Networking; using Il2CppScheduleOne.Persistence; using Il2CppScheduleOne.PlayerScripts; using Il2CppScheduleOne.Product; using Il2CppScheduleOne.Storage; using Il2CppScheduleOne.UI; using Il2CppScheduleOne.UI.Phone; using Il2CppScheduleOne.UI.Phone.Messages; using Il2CppSteamworks; using Il2CppSystem; using Il2CppSystem.Collections.Generic; using Il2CppSystem.Text; using MelonLoader; using MelonLoader.Preferences; using MelonLoader.Utils; using Microsoft.CodeAnalysis; using Newtonsoft.Json; using UnityEngine; using UnityEngine.AI; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: MelonInfo(typeof(global::AdvancedDealing.AdvancedDealing), "AdvancedDealing", "1.5.1", "ManZune & UrbanSide Community", "https://github.com/UrbanSide/AdvancedDealing-Community")] [assembly: MelonGame("TVGS", "Schedule I")] [assembly: MelonColor(255, 113, 195, 230)] [assembly: MelonPlatformDomain(/*Could not decode attribute arguments.*/)] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("ManZune; UrbanSide Community")] [assembly: AssemblyConfiguration("Il2Cpp")] [assembly: AssemblyDescription("Community-maintained Schedule I dealer automation mod with localization and separate product/cash dead drops")] [assembly: AssemblyFileVersion("1.5.1.0")] [assembly: AssemblyInformationalVersion("1.5.1")] [assembly: AssemblyProduct("AdvancedDealing")] [assembly: AssemblyTitle("AdvancedDealing")] [assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/UrbanSide/AdvancedDealing-Community")] [assembly: AssemblyVersion("1.5.1.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace AdvancedDealing { public class AdvancedDealing : MelonMod { public bool IsInitialized { get; private set; } public SaveModifier SaveModifier { get; private set; } public NetworkSynchronizer NetworkSynchronizer { get; private set; } public override void OnSceneWasInitialized(int buildIndex, string sceneName) { if (sceneName == "Menu") { if (!IsInitialized) { ModConfig.Initialize(); LocalizationManager.Initialize(ModConfig.Language); ConflictChecker.CheckForConflicts(); SaveModifier = new SaveModifier(); NetworkSynchronizer = new NetworkSynchronizer(); Logger.Msg("AdvancedDealing v1.5.1 initialized"); IsInitialized = true; } if (SaveModifier.SavegameLoaded) { SaveModifier.ClearModifications(); } } else if (sceneName == "Main") { SaveModifier.LoadModifications(); } } } public static class ModConfig { private static MelonPreferences_Category generalCategory; private static bool isInitialized; public static string Language { get { return generalCategory.GetEntry("Language").Value; } set { generalCategory.GetEntry("Language").Value = value; } } public static bool Debug { get { return generalCategory.GetEntry("Debug").Value; } set { generalCategory.GetEntry("Debug").Value = value; } } public static bool SkipMovement { get { return generalCategory.GetEntry("SkipMovement").Value; } set { generalCategory.GetEntry("SkipMovement").Value = value; } } public static bool NotifyOnAction { get { return generalCategory.GetEntry("NotifyOnAction").Value; } set { generalCategory.GetEntry("NotifyOnAction").Value = value; } } public static bool CustomersSearchAndSort { get { return generalCategory.GetEntry("CustomersSearchAndSort").Value; } set { generalCategory.GetEntry("CustomersSearchAndSort").Value = value; } } public static bool AccessInventory { get { if (NetworkSynchronizer.IsSyncing && NetworkSynchronizer.Instance.SessionData != null) { return NetworkSynchronizer.Instance.SessionData.AccessInventory; } return generalCategory.GetEntry("AccessInventory").Value; } set { generalCategory.GetEntry("AccessInventory").Value = value; } } public static bool SettingsMenu { get { if (NetworkSynchronizer.IsSyncing && NetworkSynchronizer.Instance.SessionData != null) { return NetworkSynchronizer.Instance.SessionData.SettingsMenu; } return generalCategory.GetEntry("SettingsMenu").Value; } set { generalCategory.GetEntry("SettingsMenu").Value = value; } } public static float NegotiationModifier { get { if (NetworkSynchronizer.IsSyncing && NetworkSynchronizer.Instance.SessionData != null) { return NetworkSynchronizer.Instance.SessionData.NegotiationModifier; } return generalCategory.GetEntry("NegotiationModifier").Value; } set { generalCategory.GetEntry("NegotiationModifier").Value = value; } } public static void Initialize() { if (isInitialized) { return; } generalCategory = MelonPreferences.CreateCategory("AdvancedDealing_01_General", "AdvancedDealing - General Settings", false, true); string text = Path.Combine(MelonEnvironment.UserDataDirectory, "AdvancedDealing.cfg"); generalCategory.SetFilePath(text, true, false); CreateEntries(); if (!File.Exists(text)) { foreach (MelonPreferences_Entry entry in generalCategory.Entries) { entry.ResetToDefault(); } generalCategory.SaveToFile(false); } isInitialized = true; } private static void CreateEntries() { generalCategory.CreateEntry("Language", "auto", "Language (Needs Reload)", "Localization code: auto, en-US, ru-RU, or a custom JSON file name", false, false, (ValueValidator)null, (string)null); generalCategory.CreateEntry("Debug", false, "Enable Debug Mode", "Enables debugging for this mod", false, false, (ValueValidator)null, (string)null); generalCategory.CreateEntry("SkipMovement", false, "Skip Movement (Instant Delivery)", "Skips all movement actions for dealers", false, false, (ValueValidator)null, (string)null); generalCategory.CreateEntry("NotifyOnAction", true, "Notify On Actions", "Sends notifications after some actions got triggered", false, false, (ValueValidator)null, (string)null); generalCategory.CreateEntry("CustomersSearchAndSort", true, "Search And Sort Customers (Needs Reload)", "Enable customers searching and sorting by region and alphabetical", false, false, (ValueValidator)null, (string)null); generalCategory.CreateEntry("AccessInventory", false, "Access Dealer Inventories Remotely", "Enables the option to access the dealer inventory via text message", false, false, (ValueValidator)null, (string)null); generalCategory.CreateEntry("SettingsMenu", false, "Enable Dealer Settings Menu", "Allows access to the dealer settings menu via text message", false, false, (ValueValidator)null, (string)null); generalCategory.CreateEntry("NegotiationModifier", 0.5f, "Negotiation Modifier (Higher = Better Chance)", "Modifier used to calculate the negotiation success.", false, false, (ValueValidator)(object)new ValueRange(0f, 1f), (string)null); } } public static class ModInfo { public const string NAME = "AdvancedDealing"; public const string VERSION = "1.5.1"; public const string AUTHOR = "ManZune & UrbanSide Community"; public const string DOWNLOAD_LINK = "https://github.com/UrbanSide/AdvancedDealing-Community"; } } namespace AdvancedDealing.Utils { public static class ConflictChecker { public static bool DisableMoreItemSlots { get; private set; } public static void CheckForConflicts() { bool flag = false; if (MelonBase.FindMelon("Bread's Storage Tweak Mod", "BreadCh4n") != null) { flag = true; DisableMoreItemSlots = true; Logger.Msg("ConflictChecker", "Bread's Storage Tweaks found: More item slots feature disabled."); } if (!flag) { Logger.Msg("ConflictChecker", "No known conflicting mods found."); } } } public static class Logger { public static void Msg(string msg) { Msg(null, msg); } public static void Msg(string prefix, string msg) { if (prefix != null) { msg = "[" + prefix + "] " + msg; } MelonLogger.Msg(msg); } public static void Error(string msg) { Error(null, msg, null); } public static void Error(string prefix, string msg) { Error(prefix, msg, null); } public static void Error(string msg, Exception ex) { Error(null, msg, ex); } public static void Error(string prefix, string msg, Exception ex) { if (prefix != null) { msg = "[" + prefix + "] " + msg; } if (ex != null) { MelonLogger.Error(msg, ex); } else { MelonLogger.Error(msg); } } public static void Debug(string msg) { Debug(null, msg); } public static void Debug(string prefix, string msg) { if (ModConfig.Debug) { if (prefix != null) { msg = "[" + prefix + "] " + msg; } MelonLogger.Msg(ConsoleColor.Cyan, msg); } } public static void Warning(string msg) { Warning(null, msg); } public static void Warning(string prefix, string msg) { if (prefix != null) { msg = "[" + prefix + "] " + msg; } MelonLogger.Warning(msg); } } } namespace AdvancedDealing.UI { public class CustomerSelector { public RectTransform Content; public InputField Searchbar; private readonly List _entries = new List(); public bool UICreated { get; private set; } public void BuildUI() { //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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0129: 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) if (!UICreated) { Transform transform = ((Component)PlayerSingleton.Instance.CustomerSelector).transform; Content = PlayerSingleton.Instance.CustomerSelector.EntriesContainer; Transform obj = transform.Find("Shade/Content/Scroll View"); RectTransform val = ((obj != null) ? ((Component)obj).GetComponent() : null); val.sizeDelta = new Vector2(val.sizeDelta.x, val.sizeDelta.y - 100f); GameObject val2 = Object.Instantiate(((Component)((Component)PlayerSingleton.Instance.CounterofferInterface).transform.Find("Shade/Content/Selection/SearchInput")).gameObject, ((Transform)val).parent); val2.SetActive(true); ((Object)val2).name = "Searchbar"; Searchbar = val2.GetComponent(); ((UnityEventBase)Searchbar.onEndEdit).RemoveAllListeners(); ((UnityEventBase)Searchbar.onValueChanged).RemoveAllListeners(); ((UnityEvent)(object)Searchbar.onValueChanged).AddListener(UnityAction.op_Implicit((Action)OnSearchValueChanged)); Searchbar.contentType = (ContentType)0; RectTransform component = ((Component)Searchbar).GetComponent(); component.offsetMax = new Vector2(-25f, -80f); component.offsetMin = new Vector2(25f, -130f); Text component2 = ((Component)((Transform)component).Find("Text Area/Placeholder")).GetComponent(); component2.text = LocalizationManager.Get("ui.customers.search_placeholder"); Logger.Debug("CustomerSelector", "Customer selector UI created"); UICreated = true; } } public void SortCustomers() { for (int i = 0; i < PlayerSingleton.Instance.CustomerSelector.customerEntries.Count; i++) { RectTransform val = PlayerSingleton.Instance.CustomerSelector.customerEntries[i]; Customer val2 = PlayerSingleton.Instance.CustomerSelector.entryToCustomer[val]; if ((Object)(object)val2.AssignedDealer != (Object)null) { _entries.Remove(val); } else { _entries.Add(val); } } List collection = _entries.OrderBy((RectTransform e) => ((Component)((Transform)e).Find("Name")).GetComponent().text).ToList(); _entries.Clear(); _entries.AddRange(collection); for (int num = 0; num < _entries.Count; num++) { RectTransform val3 = _entries[num]; ((Transform)val3).SetAsLastSibling(); } } private void OnSearchValueChanged(string value) { for (int i = 0; i < _entries.Count; i++) { RectTransform val = _entries[i]; Text component = ((Component)((Transform)val).Find("Name")).GetComponent(); if (component.text.Contains(value, StringComparison.OrdinalIgnoreCase) || value == null || value == string.Empty) { ((Component)val).gameObject.SetActive(true); } else { ((Component)val).gameObject.SetActive(false); } } } } public class CustomersScrollView { public const int MAX_ENTRIES = 24; public GameObject Container; public GameObject Viewport; public GameObject AssignButton; public List CustomerEntries = new List(); public Text TitleLabel; public bool UICreated { get; private set; } public void BuildUI() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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_00be: Expected O, but got Unknown //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_012c: 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_018b: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Expected O, but got Unknown Container = ((Component)((Component)PlayerSingleton.Instance).transform.Find("Container/Background/Content/Container")).gameObject; GameObject val = new GameObject("Scroll"); RectTransform val2 = val.AddComponent(); ((Transform)val2).SetParent(Container.transform.parent, false); val2.anchorMin = new Vector2(0f, 0f); val2.anchorMax = new Vector2(1f, 1f); val2.pivot = new Vector2(0.5f, 0.5f); val2.anchoredPosition = Vector2.zero; val2.sizeDelta = new Vector2(0f, 0f); Viewport = new GameObject("Viewport"); RectTransform val3 = Viewport.AddComponent(); ((Transform)val3).SetParent((Transform)(object)val2, false); val3.anchorMin = new Vector2(0f, 0f); val3.anchorMax = new Vector2(1f, 1f); val3.pivot = new Vector2(0.5f, 0.5f); val3.anchoredPosition = Vector2.zero; val3.sizeDelta = new Vector2(0f, 0f); val3.offsetMax = new Vector2(0f, -90f); Viewport.AddComponent().showMaskGraphic = false; Viewport.AddComponent(); RectTransform component = Container.GetComponent(); ((Transform)component).SetParent((Transform)(object)val3, true); component.pivot = new Vector2(0.5f, 1f); VerticalLayoutGroup component2 = Container.GetComponent(); ((LayoutGroup)component2).padding = new RectOffset(40, 40, 0, 20); ContentSizeFitter val4 = Container.AddComponent(); val4.horizontalFit = (FitMode)0; val4.verticalFit = (FitMode)2; ScrollRect val5 = val.AddComponent(); val5.viewport = val3; val5.content = component; val5.horizontal = false; val5.vertical = true; val5.movementType = (MovementType)1; val5.inertia = true; val5.elasticity = 0.1f; val5.verticalNormalizedPosition = 1f; val5.scrollSensitivity = 8f; TitleLabel = ((Component)Container.transform.Find("CustomerTitle")).GetComponent(); AssignButton = ((Component)PlayerSingleton.Instance.AssignCustomerButton).gameObject; CreateCustomerEntries(); Logger.Debug("CustomersScrollView", "Customers scroll view UI created"); UICreated = true; } private void CreateCustomerEntries() { Il2CppReferenceArray customerEntries = PlayerSingleton.Instance.CustomerEntries; Il2CppReferenceArray val = new Il2CppReferenceArray(24L); int length = ((Il2CppArrayBase)(object)customerEntries).Length; if (length == 24) { return; } for (int i = 0; i < 24; i++) { if (i < length) { ((Il2CppArrayBase)(object)val)[i] = ((Il2CppArrayBase)(object)customerEntries)[i]; CustomerEntries.Add(((Component)((Il2CppArrayBase)(object)customerEntries)[i]).gameObject); continue; } RectTransform val2 = ((IEnumerable)customerEntries).Last(); RectTransform val3 = Object.Instantiate(val2, ((Transform)val2).parent); ((Object)val3).name = $"CustomerEntry ({i})"; ((Component)val3).gameObject.SetActive(false); ((Il2CppArrayBase)(object)val)[i] = val3; CustomerEntries.Add(((Component)val3).gameObject); } PlayerSingleton.Instance.CustomerEntries = val; } } public enum DeadDropPurpose { ProductPickup, CashDelivery } public class DeadDropSelector { public GameObject Container; public Text TitleLabel; public Transform Content; public GameObject Details; public GameObject DeadDropButton; public Text ButtonLabel; private readonly List _selectables = new List(); private DealerExtension _dealer; private GameObject _selectableTemplate; public DeadDropPurpose Purpose { get; } public string EmptySelectionLabel => LocalizationManager.Get("ui.dead_drop.none"); public bool UICreated { get; private set; } public bool IsOpen { get; private set; } public DeadDropSelector(DeadDropPurpose purpose) { Purpose = purpose; } public void Open(DealerExtension dealerExtension) { if (dealerExtension == null) { return; } IsOpen = true; _dealer = dealerExtension; foreach (DeadDrop deadDrop in DeadDropExtension.GetDeadDropsByDistance(((Component)Player.Local).transform)) { GameObject val = _selectables.Find((GameObject x) => ((Component)x.transform.Find("Name")).GetComponent().text == deadDrop.DeadDropName); if (val != null) { val.transform.SetAsLastSibling(); } } Container.SetActive(true); } public void Close() { IsOpen = false; Container.SetActive(false); } private void OnSelected(string guid, string name) { if (_dealer == null) { Close(); return; } if (Purpose == DeadDropPurpose.CashDelivery) { _dealer.CashDeadDrop = guid; if (string.IsNullOrWhiteSpace(guid)) { _dealer.DeliverCash = false; } } else { _dealer.ProductDeadDrop = guid; } ButtonLabel.text = name; _dealer.HasChanged = true; Logger.Debug("DeadDropSelector", $"{Purpose} dead drop for {((NPC)_dealer.Dealer).fullName} selected: {guid ?? "None"}"); if (NetworkSynchronizer.IsSyncing) { NetworkSynchronizer.Instance.SendData(_dealer.FetchData()); } Close(); } public void BuildUI() { //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Expected O, but got Unknown //IL_00a9: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) if (!UICreated) { GameObject gameObject = ((Component)PlayerSingleton.Instance.CustomerSelector).gameObject; Container = Object.Instantiate(gameObject, gameObject.transform.parent); ((Object)Container).name = ((Purpose == DeadDropPurpose.CashDelivery) ? "CashDeadDropSelector" : "ProductDeadDropSelector"); Container.SetActive(true); RectTransform component = ((Component)Container.transform.Find("Shade/Content/Scroll View/Viewport/Content")).gameObject.GetComponent(); GameObject val = new GameObject("Content"); RectTransform val2 = val.AddComponent(); ((Transform)val2).SetParent(((Transform)component).parent, false); val2.anchorMin = component.anchorMin; val2.anchorMax = component.anchorMax; val2.pivot = component.pivot; val2.anchoredPosition = component.anchoredPosition; val2.sizeDelta = component.sizeDelta; TitleLabel = ((Component)Container.transform.Find("Shade/Content/Title")).GetComponent(); TitleLabel.text = ((Purpose == DeadDropPurpose.CashDelivery) ? LocalizationManager.Get("ui.dead_drop.cash.select_title") : LocalizationManager.Get("ui.dead_drop.product.select_title")); Content = (Transform)(object)val2; Object.Destroy((Object)(object)((Component)component).gameObject); ((Component)Container.transform.Find("Shade/Content/Scroll View")).gameObject.GetComponent().content = val2; ContentSizeFitter val3 = val.AddComponent(); val3.horizontalFit = (FitMode)0; val3.verticalFit = (FitMode)2; VerticalLayoutGroup val4 = val.AddComponent(); ((HorizontalOrVerticalLayoutGroup)val4).childControlHeight = false; ((HorizontalOrVerticalLayoutGroup)val4).childControlWidth = true; ((HorizontalOrVerticalLayoutGroup)val4).childForceExpandHeight = false; ((HorizontalOrVerticalLayoutGroup)val4).childForceExpandWidth = true; ((HorizontalOrVerticalLayoutGroup)val4).childScaleHeight = false; ((HorizontalOrVerticalLayoutGroup)val4).childScaleWidth = false; CreateSelectable(null, EmptySelectionLabel); for (int i = 0; i <= DeadDrop.DeadDrops.Count - 1; i++) { CreateSelectable(((object)DeadDrop.DeadDrops[i].GUID/*cast due to .constrained prefix*/).ToString(), DeadDrop.DeadDrops[i].DeadDropName); } CreateButton(); Logger.Debug("DeadDropSelector", $"{Purpose} dead-drop selector UI created"); UICreated = true; } } private void CreateButton() { //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) GameObject gameObject = ((Component)((Component)PlayerSingleton.Instance).transform.Find("Container/Background/Content/Scroll/Viewport/Container/Details")).gameObject; Details = Object.Instantiate(gameObject, gameObject.transform.parent); Details.SetActive(true); ((Object)Details).name = ((Purpose == DeadDropPurpose.CashDelivery) ? "Details (Advanced Dealing - Cash Dead Drop)" : "Details (Advanced Dealing - Product Dead Drop)"); Details.transform.SetSiblingIndex((Purpose == DeadDropPurpose.CashDelivery) ? 6 : 5); GameObject gameObject2 = ((Component)Details.transform.Find("Container")).gameObject; for (int num = gameObject2.transform.childCount - 1; num > 0; num--) { Object.Destroy((Object)(object)((Component)gameObject2.transform.GetChild(num)).gameObject); } DeadDropButton = ((Component)gameObject2.transform.GetChild(0)).gameObject; ((Object)DeadDropButton).name = ((Purpose == DeadDropPurpose.CashDelivery) ? "Cash Dead Drop" : "Product Dead Drop"); ((Component)DeadDropButton.transform.Find("Title")).GetComponent().text = ((Purpose == DeadDropPurpose.CashDelivery) ? LocalizationManager.Get("ui.dead_drop.cash.label") : LocalizationManager.Get("ui.dead_drop.product.label")); RectTransform component = ((Component)DeadDropButton.transform.Find("Value")).GetComponent(); component.offsetMax = new Vector2(-30f, -45f); ButtonLabel = ((Component)component).GetComponent(); ButtonLabel.text = EmptySelectionLabel; ((Graphic)ButtonLabel).color = new Color(0.6f, 1f, 1f, 1f); ButtonLabel.resizeTextForBestFit = true; ButtonLabel.resizeTextMaxSize = 28; ((UnityEvent)Details.AddComponent