Decompiled source of ExtraCityEdit v0.4.2
CustomStreetEdit.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Text.Json; using AssetBundleLoader; using BepInEx; using BepInEx.Core.Logging.Interpolation; using BepInEx.Logging; using HarmonyLib; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppSystem.Collections.Generic; using Microsoft.CodeAnalysis; using SOD.Common.BepInEx; using SOD.Common.BepInEx.Configuration; using SOD.Common.Extensions; using TMPro; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.UI; using UniverseLib; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("CustomStreetEdit")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("CustomStreetEdit")] [assembly: AssemblyTitle("CustomStreetEdit")] [assembly: AssemblyVersion("1.0.0.0")] 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; } } } public class ECE_CityData { public string cityName; public bool usingUDB; public int extraFloors; public bool isFlooded; public static void Constructor(string cityName, bool usingUDB, int extraFloors, bool isFlooded) { string cityName2 = cityName; if (!ECE_DataList.dataList.Exists((ECE_CityData city) => city.cityName == cityName2)) { ECE_DataList.dataList.Add(new ECE_CityData { cityName = cityName2, usingUDB = usingUDB, extraFloors = extraFloors, isFlooded = isFlooded }); } } } public class ECE_DataList { public static Dictionary<NewBuilding, List<ECE_Renaming>> renamingDictionary = new Dictionary<NewBuilding, List<ECE_Renaming>>(); public static List<ECE_CityData> dataList = new List<ECE_CityData>(); } public class ECE_Renaming { public NewAddress address; public int index; } [HarmonyPatch(typeof(BlueprintsCreator), "StartLoading")] internal class ECE_DataLoading { public static void Postfix() { //IL_0120: 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_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: 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) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) PluginController<ExtraCityEdit, Configs>.Log.LogInfo((object)"ECE_dataloading happened"); foreach (ECE_CityData data in ECE_DataList.dataList) { if (!(data.cityName == CityConstructor.Instance.currentData.cityName) || !data.usingUDB) { continue; } int num; if (data.isFlooded) { num = data.extraFloors * -1 - 1; CityControls.Instance.lowestFloor = data.extraFloors * -1 - 2; CityControls.Instance.basementWaterLevel = -10.75f + (float)data.extraFloors * -5.5f; CityControls.Instance.basementWaterTransform.localPosition = new Vector3(0f, -9.6f + (float)data.extraFloors * -5.5f, 0f); } else { num = data.extraFloors * -1; CityControls.Instance.lowestFloor = -999; CityControls.Instance.basementWaterLevel = -999f; CityControls.Instance.basementWaterTransform.localPosition = new Vector3(0f, -999f, 0f); } Enumerator<AddressPreset> enumerator2 = Toolbox.Instance.allAddressPresets.GetEnumerator(); while (enumerator2.MoveNext()) { AddressPreset current2 = enumerator2.Current; if (((SoCustomComparison)current2).presetName == "PowerRoom") { current2.minMaxFloors = Vector2Int.op_Implicit(new Vector2Int(-999, 999)); } if (((SoCustomComparison)current2).presetName == "WeaponsDealer") { current2.minMaxFloors = Vector2Int.op_Implicit(new Vector2Int(num, 999)); } if (((SoCustomComparison)current2).presetName == "BlackmarketSyncClinic") { current2.minMaxFloors = Vector2Int.op_Implicit(new Vector2Int(num, 999)); } if (((SoCustomComparison)current2).presetName == "BuildingBathroomsAbandoned") { current2.minMaxFloors = Vector2Int.op_Implicit(new Vector2Int(-999, -2)); } if (((SoCustomComparison)current2).presetName == "GamblingDen") { current2.minMaxFloors = Vector2Int.op_Implicit(new Vector2Int(num, 999)); } if (((SoCustomComparison)current2).presetName == "BlackmarketTrader") { current2.minMaxFloors = Vector2Int.op_Implicit(new Vector2Int(num, 999)); } if (((SoCustomComparison)current2).presetName == "Apartment") { current2.minMaxFloors = Vector2Int.op_Implicit(new Vector2Int(num, 999)); } if (((SoCustomComparison)current2).presetName == "Slum") { current2.minMaxFloors = Vector2Int.op_Implicit(new Vector2Int(num, 999)); } } } } } [HarmonyPatch(typeof(CityEditorController), "FinishLoading")] internal class ECE_DataSaving { public static string cityName; public static Dictionary<NewBuilding, int> extraFloorsDict = new Dictionary<NewBuilding, int>(); public static int extraFloors; public static bool usingUDB; public static bool isFlooded = true; public static void DictionaryAdd(NewBuilding building, int ebf) { if (!extraFloorsDict.ContainsKey(building)) { extraFloorsDict.Add(building, ebf); } else { extraFloorsDict[building] = ebf; } } public static void Postfix() { PluginController<ExtraCityEdit, Configs>.Log.LogInfo((object)"ECE_datasaving happened"); cityName = CityData.Instance.cityName; extraFloors = extraFloorsDict.Values.DefaultIfEmpty(0).Max(); usingUDB = extraFloors > 0; ECE_CityData.Constructor(cityName, usingUDB, extraFloors, isFlooded); File.WriteAllText(Path.Combine(Paths.PluginPath, "truedartt-ExtraCityEdit/CityDatas/" + cityName + ".json"), JsonSerializer.Serialize(ECE_DataList.dataList.Find((ECE_CityData city) => city.cityName == cityName), new JsonSerializerOptions { WriteIndented = true, IncludeFields = true })); } } public interface Configs { [Binding(true, "Alleyways Enabled", "alleyways.enabled")] bool AlleyWaysEnabledConfig { get; set; } } [BepInPlugin("truedartt.extracityedit", "ExtraCityEdit", "0.4.2")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class ExtraCityEdit : PluginController<ExtraCityEdit, Configs> { [HarmonyPatch(typeof(MainMenuController), "Start")] public class AlphaCore { private static ToggleController? _toggleController; private static ToggleController? _cityEditorController; public static bool enableAlleywayWalls => _toggleController.isOn; public static bool CityEditorController => _cityEditorController.isOn; public static void Postfix() { GameObject val = GameObject.Find("MenuCanvas"); if ((Object)(object)val == (Object)null) { PluginController<ExtraCityEdit, Configs>.Log.LogError((object)"MenuCanvas not found."); return; } Transform val2 = val.transform.Find("MainMenu/GenerateCityPanel/GenerateNewCityComponents"); if ((Object)(object)val2 == (Object)null) { PluginController<ExtraCityEdit, Configs>.Log.LogError((object)"GenerateNewCityComponents container not found."); return; } Transform obj = val2.Find("CityEditorToggle"); GameObject val3 = ((obj != null) ? ((Component)obj).gameObject : null); if ((Object)(object)val3 == (Object)null) { PluginController<ExtraCityEdit, Configs>.Log.LogError((object)"CityEditorToggle template not found."); return; } _cityEditorController = val3.GetComponent<ToggleController>(); GameObject val4 = Object.Instantiate<GameObject>(val3); val4.transform.SetParent(val2, false); val4.transform.SetSiblingIndex(6); val4.SetActive(true); Transform val5 = val4.transform.Find("LabelText"); if ((Object)(object)val5 == (Object)null) { PluginController<ExtraCityEdit, Configs>.Log.LogError((object)"LabelText missing on newToggle."); return; } MenuAutoTextController component = ((Component)val5).GetComponent<MenuAutoTextController>(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } TMP_Text component2 = ((Component)val5).GetComponent<TMP_Text>(); if ((Object)(object)component2 != (Object)null) { component2.text = "Alleyway Walls Enabled"; } else { PluginController<ExtraCityEdit, Configs>.Log.LogError((object)"textComponent missing on newToggle."); } _toggleController = val4.GetComponent<ToggleController>(); if ((Object)(object)_toggleController != (Object)null) { _toggleController.playerPrefsID = ""; if (((PluginController<ExtraCityEdit, Configs>)(object)PluginController<ExtraCityEdit, Configs>.Instance).Config.AlleyWaysEnabledConfig) { _toggleController.SetOn(); } else { _toggleController.SetOff(); } } else { PluginController<ExtraCityEdit, Configs>.Log.LogError((object)"ToggleController missing on newToggle."); } } } [HarmonyPatch(typeof(NewBuilding), "Setup")] public class BetaCore { private static Dictionary<BuildingPreset, bool> ogpresets = new Dictionary<BuildingPreset, bool>(); private static bool enableWallsForEditor; public static Dictionary<BuildingPreset, bool> OgPresets => ogpresets; public static bool EnableWallsForEditor => enableWallsForEditor; public static void Postfix(NewBuilding __instance) { Enumerator<BuildingPreset> enumerator = HighlanderSingleton<CityBuildings>.Instance.buildingPresets.GetEnumerator(); while (enumerator.MoveNext()) { BuildingPreset current = enumerator.Current; if (!ogpresets.ContainsKey(current)) { ogpresets.Add(current, current.enableAlleywayWalls); } } if (!AlphaCore.enableAlleywayWalls) { __instance.preset.enableAlleywayWalls = false; enableWallsForEditor = false; } else { foreach (BuildingPreset key in ogpresets.Keys) { if ((SoCustomComparison)(object)__instance.preset == (SoCustomComparison)(object)key) { __instance.preset.enableAlleywayWalls = ogpresets[key]; break; } } enableWallsForEditor = false; } ((PluginController<ExtraCityEdit, Configs>)(object)PluginController<ExtraCityEdit, Configs>.Instance).Config.AlleyWaysEnabledConfig = AlphaCore.enableAlleywayWalls; } } [HarmonyPatch(typeof(PrototypeDebugPanel), "Awake")] public class GammaCore { private static string path = Path.Combine(Paths.PluginPath, "truedartt-ExtraCityEdit/extrastuff"); private static AssetBundle bundle = BundleLoader.LoadBundle(path, false, false); private static Sprite whiteSquare = bundle.LoadAsset<Sprite>("whitesquare"); private static Sprite newTexture; private static Sprite disabledCross; private static GameObject newMenu; private static GameObject SpriteObject; private static Image ColorBG; private static Image ColorBG2; private static Image ColorBG3; private static Image ColorBG4; private static int partPicked; private static int colorPartPicked; private static TMP_Dropdown ResetSelection; private static CityEditorBuildingEdit mainController; private static CityEditorStreetEdit mainController2; private static MaterialGroupPreset materialPart; private static GameObject colorBlending; private static List<MaterialGroupPreset> mat = EnumerableExtensions.ToList<MaterialGroupPreset>(Toolbox.Instance.allMaterialGroups); private static Transform ColorPicker; private static TMP_Dropdown matSelectionDropdown; private static TMP_Dropdown LandValueDropdown; private static TMP_Dropdown EchelonFloorDropdown; private static TMP_Dropdown DesignDropdown; private static TMP_Dropdown GrubinessDropdown; private static TMP_Dropdown StreetTypeDropdown; private static TMP_Dropdown districtDropdown; private static TMP_Dropdown districtTypeDropdown; private static TMP_Dropdown ultraDeepBasementDropdown; private static TMP_Dropdown basementFloodedDropdown; private static List<StreetController> blackList; private static float manualcount; private static Camera cam; private static Dictionary<StreetController, List<NewTile>> tiles; private static List<GameObject> tileButtonsStreet; private static TextMeshProUGUI districtNameText; private static ButtonController breakStreetButtonCTRL; private static Dictionary<NewTile, GameObject> selectedTiles = new Dictionary<NewTile, GameObject>(); private static List<NewTile> tileList; private static List<DistrictController> districtList = new List<DistrictController>(); private static Dictionary<DistrictController, Color> districtColor = new Dictionary<DistrictController, Color>(); private static Dictionary<DistrictController, List<StreetController>> districtStreet = new Dictionary<DistrictController, List<StreetController>>(); private static Dictionary<GameObject, StreetController> streetButtons = new Dictionary<GameObject, StreetController>(); private static Dictionary<StreetController, List<GameObject>> streetButtonsInverse = new Dictionary<StreetController, List<GameObject>>(); private static Dictionary<GameObject, CityTile> buildingButtons = new Dictionary<GameObject, CityTile>(); private static dynamic? selectedThing; private static int currentDummyDistrict = 0; private static int antiDoubleCheck = 0; private static Dictionary<StreetController, int> streetType = new Dictionary<StreetController, int>(); private static Dictionary<BuildingPreset, int> defaultBasementFloors = new Dictionary<BuildingPreset, int>(); private static List<Color> ColorSelection = new List<Color> { new Color(0f, 0f, 0f, 1f), new Color(0.4627f, 0.1804f, 0.1529f, 1f), new Color(0.5294f, 0.298f, 0.2824f, 1f), new Color(0.302f, 0.2392f, 0.2196f, 1f), new Color(0.4392f, 0.2078f, 0.1333f, 1f), new Color(0.8431f, 0.6549f, 0.6471f, 1f), new Color(0.8784f, 0.349f, 0.349f, 1f), new Color(1f, 1f, 1f, 1f), new Color(0.6235f, 0.3961f, 0.3412f, 1f), new Color(0.949f, 0.6431f, 0.6392f, 1f), new Color(0.3725f, 0.2235f, 0.1373f, 1f), new Color(0.4392f, 0.3216f, 0.2509f, 1f), new Color(0.7725f, 0.4706f, 0.3843f, 1f), new Color(0.5176f, 0.3373f, 0.2392f, 1f), new Color(0.8863f, 0.2824f, 0.2f, 1f), new Color(0.5137f, 0.298f, 0.1843f, 1f), new Color(0.7373f, 0.3333f, 0.1961f, 1f), new Color(0.5569f, 0.3216f, 0.1843f, 1f), new Color(0.4667f, 0.2078f, 0f, 1f), new Color(0.4431f, 0.2824f, 0.149f, 1f), new Color(0.7451f, 0.4314f, 0.2784f, 1f), new Color(0.5686f, 0.4667f, 0.3804f, 1f), new Color(0.6549f, 0.349f, 0.1373f, 1f), new Color(0.4863f, 0.4196f, 0.3333f, 1f), new Color(0.5098f, 0.3216f, 0.1843f, 1f), new Color(0.9137f, 0.6353f, 0.5059f, 1f), new Color(0.749f, 0.5804f, 0.4471f, 1f), new Color(0.7451f, 0.5137f, 0.3333f, 1f), new Color(0.4863f, 0.4196f, 0.2863f, 1f), new Color(0.8275f, 0.6941f, 0.5725f, 1f), new Color(0.1882f, 0.1686f, 0.1059f, 1f), new Color(0.5294f, 0.4784f, 0.3608f, 1f), new Color(0.9765f, 0.8667f, 0.7804f, 1f), new Color(0.8588f, 0.4706f, 0.149f, 1f), new Color(0.6706f, 0.3961f, 0f, 1f), new Color(0.6196f, 0.5882f, 0.5137f, 1f), new Color(0.5961f, 0.5569f, 0.4667f, 1f), new Color(0.9412f, 0.8353f, 0.6863f, 1f), new Color(0.9059f, 0.7216f, 0.4627f, 1f), new Color(0.8627f, 0.6157f, 0.2275f, 1f), new Color(0.698f, 0.5412f, 0.1373f, 1f), new Color(0.8824f, 0.6627f, 0.2196f, 1f), new Color(0.8667f, 0.8157f, 0.6863f, 1f), new Color(0.9059f, 0.7333f, 0.3333f, 1f), new Color(0.7412f, 0.7294f, 0.6941f, 1f), new Color(0.9804f, 0.9333f, 0.7961f, 1f), new Color(0.8431f, 0.7725f, 0.1647f, 1f), new Color(0.8941f, 0.8627f, 0.4941f, 1f), new Color(0.6706f, 0.6667f, 0.6078f, 1f), new Color(0.7882f, 0.7882f, 0.2902f, 1f), new Color(0.7686f, 0.7686f, 0.2902f, 1f), new Color(0.8118f, 0.8118f, 0.6941f, 1f), new Color(0.9137f, 0.9098f, 0.7804f, 1f), new Color(0.3961f, 0.4431f, 0.2824f, 1f), new Color(0.9216f, 0.9373f, 0.7255f, 1f), new Color(0.5961f, 0.6706f, 0.4f, 1f), new Color(0.8039f, 0.8784f, 0.4745f, 1f), new Color(0.3765f, 0.4667f, 0.2745f, 1f), new Color(0.7059f, 0.7647f, 0.5569f, 1f), new Color(0.8784f, 0.9255f, 0.7255f, 1f), new Color(0.9451f, 0.9569f, 0.9216f, 1f), new Color(0.4392f, 0.4745f, 0.4235f, 1f), new Color(0.5882f, 0.7059f, 0.4941f, 1f), new Color(0.8039f, 0.9059f, 0.6902f, 1f), new Color(0.7804f, 0.8431f, 0.7216f, 1f), new Color(0.3843f, 0.5294f, 0.3569f, 1f), new Color(0.1843f, 0.2353f, 0.1961f, 1f), new Color(0.2509f, 0.3922f, 0.2824f, 1f), new Color(0.6392f, 0.7451f, 0.6627f, 1f), new Color(0.4863f, 0.7373f, 0.5373f, 1f), new Color(0.298f, 0.4863f, 0.4f, 1f), new Color(0.8157f, 0.8588f, 0.8314f, 1f), new Color(0.5098f, 0.6863f, 0.6039f, 1f), new Color(0.7647f, 0.8784f, 0.8627f, 1f), new Color(0.3804f, 0.4863f, 0.5059f, 1f), new Color(0.6235f, 0.9059f, 0.8627f, 1f), new Color(0.1373f, 0.5176f, 0.5843f, 1f), new Color(0.0824f, 0.149f, 0.1961f, 1f), new Color(0.5569f, 0.6706f, 0.6941f, 1f), new Color(0.3373f, 0.6824f, 0.7373f, 1f), new Color(0.1333f, 0.149f, 0.1647f, 1f), new Color(0.2039f, 0.2667f, 0.349f, 1f), new Color(0.2392f, 0.8157f, 0.9098f, 1f), new Color(0.2863f, 0.5373f, 0.6549f, 1f), new Color(0.4667f, 0.7216f, 0.8078f, 1f), new Color(0.1843f, 0.2549f, 0.3412f, 1f), new Color(0.1137f, 0.1686f, 0.251f, 1f), new Color(0.4392f, 0.5569f, 0.6392f, 1f), new Color(0.7843f, 0.9059f, 0.9451f, 1f), new Color(0.5765f, 0.7412f, 0.8196f, 1f), new Color(0.1647f, 0.302f, 0.4745f, 1f), new Color(0.3059f, 0.4392f, 0.6157f, 1f), new Color(0.6039f, 0.7059f, 0.7961f, 1f), new Color(0.2078f, 0.2078f, 0.2824f, 1f), new Color(0.4078f, 0.3961f, 0.5922f, 1f), new Color(0.8039f, 0.7843f, 0.8627f, 1f), new Color(0.1804f, 0.1373f, 0.2078f, 1f), new Color(0.4902f, 0.349f, 0.6078f, 1f), new Color(0.6471f, 0.4863f, 0.702f, 1f), new Color(0.4863f, 0.4275f, 0.4549f, 1f), new Color(0.502f, 0.2745f, 0.3686f, 1f), new Color(0.4863f, 0.3608f, 0.4f, 1f), new Color(0.1569f, 0.1176f, 0.1176f, 1f), new Color(0.3922f, 0.2078f, 0.2353f, 1f), new Color(0.7569f, 0.3804f, 0.4549f, 1f), new Color(0.8039f, 0.3569f, 0.4431f, 1f), new Color(0.5804f, 0.1137f, 0.1333f, 1f), new Color(0.6627f, 0.4863f, 0.4863f, 1f), new Color(0.6667f, 0.1686f, 0.2078f, 1f), new Color(0.9294f, 0.3529f, 0.4627f, 1f), new Color(0.7882f, 0.6784f, 0.6824f, 1f), new Color(0.7843f, 0.1529f, 0.1647f, 1f) }; public static GameObject advancedSettings => newMenu; public static CityEditorBuildingEdit core => mainController; public static Image BGDelegate => ColorBG; public static GameObject SpriteDelegate => SpriteObject; public static TMP_Dropdown ResetDelegate => ResetSelection; public static TMP_Dropdown ResetDelegate2 => LandValueDropdown; public static TMP_Dropdown EchelonDelegate => EchelonFloorDropdown; public static Transform ColorPickerDelegate => ColorPicker; public static TMP_Dropdown DesignDelegate => DesignDropdown; public static TMP_Dropdown GrubinessDelegate => GrubinessDropdown; public static TMP_Dropdown StreetTypeDelegate => StreetTypeDropdown; public static TMP_Dropdown UltraDeepBasementDelegate => ultraDeepBasementDropdown; public static TMP_Dropdown DistrictTypeDelegate => districtTypeDropdown; public static TMP_Dropdown DistrictDelegate => districtDropdown; public static Camera CityEditorCam => cam; public static TextMeshProUGUI DistrictNameDelegate => districtNameText; public static List<GameObject> StreetTileButtons => tileButtonsStreet; public static List<NewTile> TileList => tileList; public static Dictionary<NewTile, GameObject> SelectedTiles => selectedTiles; public static Dictionary<GameObject, StreetController> StreetButtons => streetButtons; public static Dictionary<StreetController, List<GameObject>> StreetButtonsInverse => streetButtonsInverse; public static Dictionary<GameObject, CityTile> BuildingButtons => buildingButtons; public static Dictionary<DistrictController, Color> DistrictColor => districtColor; public static Dictionary<BuildingPreset, int> DefaultBasementFloors => defaultBasementFloors; public static Dictionary<StreetController, int> StreetType => streetType; public static dynamic SelectedThing { get { return selectedThing; } set { selectedThing = value; } } public static void Postfix() { //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_0993: Unknown result type (might be due to invalid IL or missing references) //IL_09b8: Unknown result type (might be due to invalid IL or missing references) //IL_0a83: Unknown result type (might be due to invalid IL or missing references) //IL_0adc: Unknown result type (might be due to invalid IL or missing references) //IL_0b35: Unknown result type (might be due to invalid IL or missing references) //IL_0c01: Unknown result type (might be due to invalid IL or missing references) //IL_0c20: Unknown result type (might be due to invalid IL or missing references) //IL_0c8b: Unknown result type (might be due to invalid IL or missing references) //IL_0cba: Unknown result type (might be due to invalid IL or missing references) //IL_0d1d: Unknown result type (might be due to invalid IL or missing references) //IL_0d3e: Unknown result type (might be due to invalid IL or missing references) //IL_0d6c: Unknown result type (might be due to invalid IL or missing references) //IL_0ecc: Unknown result type (might be due to invalid IL or missing references) //IL_0ef3: Unknown result type (might be due to invalid IL or missing references) //IL_0fa6: Unknown result type (might be due to invalid IL or missing references) //IL_0fcc: Unknown result type (might be due to invalid IL or missing references) //IL_183c: Unknown result type (might be due to invalid IL or missing references) //IL_1906: Unknown result type (might be due to invalid IL or missing references) //IL_1daa: Unknown result type (might be due to invalid IL or missing references) newTexture = bundle.LoadAsset<Sprite>("newTextureV2"); disabledCross = bundle.LoadAsset<Sprite>("disabledCross"); GameObject val = GameObject.Find("PrototypeBuilderCanvas/CityEditorPanel/ButtonComponents"); if ((Object)(object)val == (Object)null) { PluginController<ExtraCityEdit, Configs>.Log.LogError((object)"ButtonComponents not found."); return; } Transform val2 = val.transform.Find("Phase"); GameObject gameObject = ((Component)val2.Find("LoadingProgress")).gameObject; gameObject.SetActive(false); if ((Object)(object)val2 == (Object)null) { PluginController<ExtraCityEdit, Configs>.Log.LogError((object)"TileEditButtons not found."); return; } Transform obj = val.transform.Find("SubTools/TileEditButtons/SwapButton"); GameObject val3 = ((obj != null) ? ((Component)obj).gameObject : null); if ((Object)(object)val3 == (Object)null) { PluginController<ExtraCityEdit, Configs>.Log.LogError((object)"SwapButton not found."); return; } GameObject val4 = Object.Instantiate<GameObject>(val3); val4.transform.SetParent(val2, false); val4.transform.SetSiblingIndex(0); ((Object)val4.transform).name = "OpenButton"; val4.SetActive(true); ButtonController core = ((Component)val4.transform).GetComponent<ButtonController>(); if ((Object)(object)core == (Object)null) { PluginController<ExtraCityEdit, Configs>.Log.LogError((object)"ButtonController missing on openButton."); return; } core.useAutomaticText = false; core.SetInteractable(val3.GetComponent<ButtonController>().interactable); TextMeshProUGUI component = ((Component)val4.transform.Find("Text")).GetComponent<TextMeshProUGUI>(); if ((Object)(object)component != (Object)null) { ((TMP_Text)component).text = "Advanced Settings"; } else { PluginController<ExtraCityEdit, Configs>.Log.LogError((object)"TextMeshProUGUI component missing on openButton."); } Button component2 = ((Component)val4.transform).GetComponent<Button>(); if ((Object)(object)component2 == (Object)null) { PluginController<ExtraCityEdit, Configs>.Log.LogError((object)"Button missing on openButton."); return; } GameObject template2 = GameObject.Find("PrototypeBuilderCanvas/CityEditorPanel"); newMenu = Object.Instantiate<GameObject>(template2); ((UnityEvent)component2.onClick).AddListener(UnityAction.op_Implicit((Action)delegate { //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Expected O, but got Unknown newMenu.SetActive(true); core.SetInteractable(false); ((Component)((Component)ResetSelection).transform.parent).GetComponent<DropdownController>().SetInteractalbe(false); ((Component)((Component)LandValueDropdown).transform.parent).GetComponent<DropdownController>().SetInteractalbe(false); ((Component)((Component)EchelonFloorDropdown).transform.parent).GetComponent<DropdownController>().SetInteractalbe(false); ((Component)((Component)DesignDropdown).transform.parent).GetComponent<DropdownController>().SetInteractalbe(false); ((Component)((Component)GrubinessDropdown).transform.parent).GetComponent<DropdownController>().SetInteractalbe(false); ((Component)((Component)matSelectionDropdown).transform.parent).GetComponent<DropdownController>().SetInteractalbe(false); ((Component)((Component)ultraDeepBasementDropdown).transform.parent).GetComponent<DropdownController>().SetInteractalbe(false); ((Component)((Component)ResetSelection).transform).GetComponent<RectTransform>().sizeDelta = new Vector2(400f, 52f); ((Component)((Component)LandValueDropdown).transform).GetComponent<RectTransform>().sizeDelta = new Vector2(400f, 52f); ((Component)((Component)EchelonFloorDropdown).transform).GetComponent<RectTransform>().sizeDelta = new Vector2(400f, 52f); ((Component)((Component)DesignDropdown).transform).GetComponent<RectTransform>().sizeDelta = new Vector2(400f, 52f); ((Component)((Component)GrubinessDropdown).transform).GetComponent<RectTransform>().sizeDelta = new Vector2(400f, 52f); ((Component)((Component)matSelectionDropdown).transform).GetComponent<RectTransform>().sizeDelta = new Vector2(400f, 52f); ((Component)((Component)ultraDeepBasementDropdown).transform).GetComponent<RectTransform>().sizeDelta = new Vector2(400f, 52f); mainController2.ResetSelection(); Enumerator<BuildingPreset> enumerator19 = HighlanderSingleton<CityBuildings>.Instance.buildingPresets.GetEnumerator(); bool flag = default(bool); while (enumerator19.MoveNext()) { BuildingPreset current19 = enumerator19.Current; if (!defaultBasementFloors.ContainsKey(current19)) { ManualLogSource log = PluginController<ExtraCityEdit, Configs>.Log; BepInExInfoLogInterpolatedStringHandler val60 = new BepInExInfoLogInterpolatedStringHandler(43, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val60).AppendLiteral("Adding default basement floors for preset: "); ((BepInExLogInterpolatedStringHandler)val60).AppendFormatted<string>(((Object)current19).name); } log.LogInfo(val60); if (current19.basementLayouts.Count > 0) { defaultBasementFloors.Add(current19, current19.basementLayouts[0].floorsWithThisSetting); } else { defaultBasementFloors.Add(current19, 0); } } } })); ((Object)newMenu).name = "AdvancedSettings"; newMenu.SetActive(false); newMenu.transform.SetParent(template2.transform.parent, false); ((Transform)((Component)newMenu.transform).GetComponent<RectTransform>()).position = new Vector3(667f, 1080f, 0f); Transform val5 = newMenu.transform.Find("Header/PanelTitle"); ((Behaviour)((Component)val5).GetComponent<MenuAutoTextController>()).enabled = false; ((TMP_Text)((Component)val5).GetComponent<TextMeshProUGUI>()).text = "Advanced Settings"; Transform val6 = newMenu.transform.Find("ButtonComponents/SizeDropdown"); if ((Object)(object)val6 == (Object)null) { PluginController<ExtraCityEdit, Configs>.Log.LogError((object)"SizeDropdown not found."); return; } val6.SetSiblingIndex(0); ((Component)val6).GetComponent<DropdownController>().playerPrefsID = ""; ((Behaviour)((Component)val6.Find("LabelText")).GetComponent<MenuAutoTextController>()).enabled = false; ((TMP_Text)((Component)val6.Find("LabelText")).GetComponent<TextMeshProUGUI>()).text = "Building"; ((Component)val6).gameObject.SetActive(true); TMP_Dropdown component3 = ((Component)val6.Find("Dropdown")).GetComponent<TMP_Dropdown>(); if ((Object)(object)component3 == (Object)null) { PluginController<ExtraCityEdit, Configs>.Log.LogError((object)"TMP_Dropdown 1 not found."); return; } component3.ClearOptions(); component3.AddOptions(EnumerableExtensions.ToListIl2Cpp<string>((IEnumerable<string>)new List<string> { "Select Part", "Walls", "Floors", "Ceilings", "Miscellaneous", "Miscellaneous2" })); component3.value = -1; ResetSelection = component3; Transform val7 = newMenu.transform.Find("ButtonComponents/SizeDropdown"); if ((Object)(object)val7 == (Object)null) { PluginController<ExtraCityEdit, Configs>.Log.LogError((object)"SizeDropdown not found."); return; } Transform val8 = Object.Instantiate<Transform>(val7, newMenu.transform.Find("ButtonComponents")); ((Object)val8).name = "MaterialDropdown"; if ((Object)(object)val8 == (Object)null) { PluginController<ExtraCityEdit, Configs>.Log.LogError((object)"SizeDropdown not found."); return; } List<string> list = new List<string> { "LargeDiamondPanelled(W)", "FloorTiles(FC)", "WoodenPanelling(W)", "Brick(WX)", "MarbleFloor(FC)", "CarpetKubrick02(F)", "LargeDiamond(W)", "Rooster(W)", "EchelonMarbleTiled(W)", "WoodenFence(X)", "CarpetKubrick01(F)", "WoodenFenceJoin(X)", "SquareTilesHalf(W)", "BigForal(W)", "LinoTilesSmall(F)", "AlleyBlockWall(WX)", "WoodenFloorPainted(FC)", "RusticBrick(W)", "MarbleTiled(W)", "SmallFloral(W)", "StripedWallpaper(W)", "DecoCurved(W)", "WhiteExteriorBrick(WX)", "FloorTilesHex(FC)", "PathFloor(FX)", "ConcreteFloor(WFC)", "StripedWallpaperPaneling(W)", "WoodenFloorRough(FC)", "Carpet(FC)", "FloorTilesFloral(FC)", "CeilingTiles(C)", "FurDeLis(W)", "DinerExteriorUnlit(X)", "WoodenFenceEntrance(X)", "CarpetTurkish(FC)", "LinoPlain(FC)", "FancyFloorTiles(WFC)", "RetroFlowers(W)", "MetroTiles(FC)", "CarpetOval(FC)", "SmallFloralPanelled(W)", "WoodenFloorVarnished(FC)", "BigFloralPanelled(W)", "DecoCurvedPanelled(W)", "LinoTilesCross(FC)", "LightMetal(W)", "TartanWallpaper(W)", "LinoTilesLarge(FC)", "Deco(W)", "LinoTilesTiny(FC)", "SpotCarpet(FC)", "OldBrick(W)", "RetroFlowersPanelled(W)", "DecoPanelled(W)", "JazzChaos(WFC)", "Grass(X)", "ConcreteFloorLight(WFC)", "LinoTilesDiamond(FC)", "SquareTiles(W)", "Marble(W)", "CoatedConcrete(WFC)", "PlainWall(WFC)", "WoodenFloorParquet(FC)", "PlasterCeiling(C)", "FurDeListPanelled(W)" }; val8.SetSiblingIndex(1); ((Component)val8).GetComponent<DropdownController>().playerPrefsID = ""; ((Component)val8).gameObject.SetActive(true); ((Behaviour)((Component)val8.Find("LabelText")).GetComponent<MenuAutoTextController>()).enabled = false; ((TMP_Text)((Component)val8.Find("LabelText")).GetComponent<TextMeshProUGUI>()).text = "Material"; matSelectionDropdown = ((Component)val8.Find("Dropdown")).GetComponent<TMP_Dropdown>(); if ((Object)(object)matSelectionDropdown == (Object)null) { PluginController<ExtraCityEdit, Configs>.Log.LogError((object)"TMP_Dropdown 2 not found."); return; } matSelectionDropdown.ClearOptions(); matSelectionDropdown.AddOptions(EnumerableExtensions.ToListIl2Cpp<string>((IEnumerable<string>)list)); mainController = ((Component)HighlanderSingleton<CityEditorController>.Instance).gameObject.GetComponent<CityEditorBuildingEdit>(); Transform val9 = Object.Instantiate<Transform>(val7, newMenu.transform.Find("ButtonComponents")); ((Object)val9).name = "ColorSelection"; val9.SetSiblingIndex(2); ((Component)val9).GetComponent<DropdownController>().playerPrefsID = ""; ((Component)val9.Find("Dropdown")).gameObject.SetActive(false); ((Behaviour)((Component)val9.Find("LabelText")).GetComponent<MenuAutoTextController>()).enabled = false; ((TMP_Text)((Component)val9.Find("LabelText")).GetComponent<TextMeshProUGUI>()).text = "Color"; Transform val10 = newMenu.transform.Find("ButtonComponents/Phase/OpenButton"); Transform ColorButton = Object.Instantiate<Transform>(val10, val9); ((Object)ColorButton).name = "ColorButtonMain"; ((Component)ColorButton.Find("Text")).gameObject.SetActive(false); ((Component)ColorButton).GetComponent<ButtonController>().glowOnHighlight = false; ((Component)ColorButton).GetComponent<RectTransform>().sizeDelta = new Vector2(52f, 52f); ((Transform)((Component)ColorButton).GetComponent<RectTransform>()).position = new Vector3(253f, 824f, 0f); ((Component)ColorButton.Find("Border")).gameObject.SetActive(false); ((UnityEventBase)((Component)ColorButton).GetComponent<Button>().onClick).RemoveAllListeners(); ColorBG = ((Component)ColorButton).GetComponent<Image>(); ColorBG.sprite = disabledCross; ColorBG.overrideSprite = disabledCross; ColorBG.pixelsPerUnitMultiplier = 10f; Transform ColorButton2 = Object.Instantiate<Transform>(ColorButton, val9); ((Object)ColorButton2).name = "ColorButton2"; ColorBG2 = ((Component)ColorButton2).GetComponent<Image>(); ((Transform)((Component)ColorButton2).GetComponent<RectTransform>()).position = new Vector3(368.666f, 824f, 0f); Transform ColorButton3 = Object.Instantiate<Transform>(ColorButton, val9); ((Object)ColorButton3).name = "ColorButton3"; ColorBG3 = ((Component)ColorButton3).GetComponent<Image>(); ((Transform)((Component)ColorButton3).GetComponent<RectTransform>()).position = new Vector3(484.333f, 824f, 0f); Transform ColorButton4 = Object.Instantiate<Transform>(ColorButton, val9); ((Object)ColorButton4).name = "ColorButton4"; ColorBG4 = ((Component)ColorButton4).GetComponent<Image>(); ((Transform)((Component)ColorButton4).GetComponent<RectTransform>()).position = new Vector3(600f, 824f, 0f); ColorPicker = Object.Instantiate<Transform>(val9, GameObject.Find("PrototypeBuilderCanvas").transform); ((Object)ColorPicker).name = "ColorPicker"; ((Component)ColorPicker).gameObject.SetActive(false); ((Component)ColorPicker.Find("ColorButtonMain")).gameObject.SetActive(false); ((Component)ColorPicker.Find("ColorButton2")).gameObject.SetActive(false); ((Component)ColorPicker.Find("ColorButton3")).gameObject.SetActive(false); ((Component)ColorPicker.Find("ColorButton4")).gameObject.SetActive(false); ((Transform)((Component)ColorPicker).GetComponent<RectTransform>()).position = new Vector3(950f, 920f, 0f); ((Component)ColorPicker).GetComponent<RectTransform>().sizeDelta = new Vector2(450f, 850f); ((Graphic)((Component)ColorPicker).GetComponent<Image>()).raycastTarget = true; Transform header2 = Object.Instantiate<Transform>(newMenu.transform.Find("Header"), ColorPicker); ((Object)header2).name = "Header"; ((Transform)((Component)header2).GetComponent<RectTransform>()).position = new Vector3(950f, 920f, 0f); ((Component)((Component)header2).transform.Find("LineBreak")).GetComponent<RectTransform>().sizeDelta = new Vector2(-20f, 2f); Transform val11 = ColorPicker.Find("ColorButtonMain"); ((Component)val11).GetComponent<Image>().sprite = newTexture; ((Component)val11).GetComponent<Image>().overrideSprite = newTexture; ((Component)val11).GetComponent<Image>().pixelsPerUnitMultiplier = 11.9f; ((Component)val11).GetComponent<RectTransform>().sizeDelta = new Vector2(39f, 39f); ((Transform)((Component)val11).GetComponent<RectTransform>()).position = new Vector3(775f, 835f, 0f); ((Component)newMenu.transform.Find("ButtonComponents/Phase")).GetComponent<RectTransform>().sizeDelta = new Vector2(596f, 60f); ((Component)newMenu.transform.Find("ButtonComponents/Phase/OpenButton")).gameObject.SetActive(false); ((Component)newMenu.transform.Find("ButtonComponents/Phase/Finalize")).gameObject.SetActive(false); ((Component)newMenu.transform.Find("ButtonComponents/Phase/Back")).gameObject.SetActive(false); Transform ReturnButton = Object.Instantiate<Transform>(val10, newMenu.transform.Find("ButtonComponents/Phase")); ((Object)ReturnButton).name = "Return"; ((Component)ReturnButton).gameObject.SetActive(true); ((TMP_Text)((Component)ReturnButton.Find("Text")).GetComponent<TextMeshProUGUI>()).text = "Close menu"; ((UnityEventBase)((Component)ReturnButton).GetComponent<Button>().onClick).RemoveAllListeners(); ((UnityEvent)((Component)ReturnButton).GetComponent<Button>().onClick).AddListener(UnityAction.op_Implicit((Action)delegate { newMenu.gameObject.SetActive(false); core.SetInteractable(true); })); int num = 8; int num2 = 775; int num3 = 835; int num4 = 50; int num5 = 775; for (int i = 0; i < ColorSelection.Count; i++) { Transform val12 = Object.Instantiate<Transform>(val11, ColorPicker); ((Transform)((Component)val12).GetComponent<RectTransform>()).position = new Vector3((float)num2, (float)num3, 0f); Image swatchColor = ((Component)val12).GetComponent<Image>(); ((Graphic)swatchColor).color = ColorSelection[i]; ((Component)val12).gameObject.SetActive(true); ((UnityEvent)((Component)val12).GetComponent<Button>().onClick).AddListener(UnityAction.op_Implicit((Action)delegate { //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_04ae: Unknown result type (might be due to invalid IL or missing references) //IL_04d7: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_050a: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) NewBuilding building12 = mainController.currentlySelectedTile.building; (int, int) tuple3 = (colorPartPicked, partPicked); (int, int) tuple4 = tuple3; ColourSchemePreset val55; ColourSchemePreset val56; ColourSchemePreset val57; ColourSchemePreset val58; ColourSchemePreset val59; switch (tuple4.Item1) { case 1: switch (tuple4.Item2) { case 1: break; case 2: goto IL_01b9; case 3: goto IL_0281; case 4: goto IL_0349; case 5: goto IL_0499; default: goto IL_0517; } building12.defaultWallKey.mainColour = ((Graphic)swatchColor).color; ((Graphic)ColorBG).color = ((Graphic)swatchColor).color; break; case 2: switch (tuple4.Item2) { case 1: break; case 2: goto IL_01eb; case 3: goto IL_02b3; case 4: goto IL_039c; case 5: goto IL_04ed; default: goto IL_0517; } building12.defaultWallKey.colour1 = ((Graphic)swatchColor).color; ((Graphic)ColorBG2).color = ((Graphic)swatchColor).color; break; case 3: switch (tuple4.Item2) { case 1: break; case 2: goto IL_021d; case 3: goto IL_02e5; case 4: goto IL_03ef; default: goto IL_0517; } building12.defaultWallKey.colour2 = ((Graphic)swatchColor).color; ((Graphic)ColorBG3).color = ((Graphic)swatchColor).color; break; case 4: switch (tuple4.Item2) { case 1: break; case 2: goto IL_024f; case 3: goto IL_0317; case 4: goto IL_0442; default: goto IL_0517; } building12.defaultWallKey.colour3 = ((Graphic)swatchColor).color; ((Graphic)ColorBG4).color = ((Graphic)swatchColor).color; break; default: goto IL_0517; IL_0442: val55 = Object.Instantiate<ColourSchemePreset>(building12.colourScheme); val55.secondary2 = ((Graphic)swatchColor).color; ((Object)val55).name = ((Object)building12.colourScheme).name; ((Graphic)ColorBG4).color = ((Graphic)swatchColor).color; building12.colourScheme = val55; break; IL_0317: building12.ceilingMatKey.colour3 = ((Graphic)swatchColor).color; ((Graphic)ColorBG4).color = ((Graphic)swatchColor).color; break; IL_024f: building12.floorMatKey.colour3 = ((Graphic)swatchColor).color; ((Graphic)ColorBG4).color = ((Graphic)swatchColor).color; break; IL_0349: val56 = Object.Instantiate<ColourSchemePreset>(building12.colourScheme); val56.primary1 = ((Graphic)swatchColor).color; ((Object)val56).name = ((Object)building12.colourScheme).name; ((Graphic)ColorBG).color = ((Graphic)swatchColor).color; building12.colourScheme = val56; break; IL_03ef: val57 = Object.Instantiate<ColourSchemePreset>(building12.colourScheme); val57.secondary1 = ((Graphic)swatchColor).color; ((Object)val57).name = ((Object)building12.colourScheme).name; ((Graphic)ColorBG3).color = ((Graphic)swatchColor).color; building12.colourScheme = val57; break; IL_02e5: building12.ceilingMatKey.colour2 = ((Graphic)swatchColor).color; ((Graphic)ColorBG3).color = ((Graphic)swatchColor).color; break; IL_021d: building12.floorMatKey.colour2 = ((Graphic)swatchColor).color; ((Graphic)ColorBG3).color = ((Graphic)swatchColor).color; break; IL_0281: building12.ceilingMatKey.mainColour = ((Graphic)swatchColor).color; ((Graphic)ColorBG).color = ((Graphic)swatchColor).color; break; IL_04ed: building12.wood = ((Graphic)swatchColor).color; ((Graphic)ColorBG2).color = ((Graphic)swatchColor).color; break; IL_039c: val58 = Object.Instantiate<ColourSchemePreset>(building12.colourScheme); val58.primary2 = ((Graphic)swatchColor).color; ((Object)val58).name = ((Object)building12.colourScheme).name; ((Graphic)ColorBG2).color = ((Graphic)swatchColor).color; building12.colourScheme = val58; break; IL_02b3: building12.ceilingMatKey.colour1 = ((Graphic)swatchColor).color; ((Graphic)ColorBG2).color = ((Graphic)swatchColor).color; break; IL_01eb: building12.floorMatKey.colour1 = ((Graphic)swatchColor).color; ((Graphic)ColorBG2).color = ((Graphic)swatchColor).color; break; IL_01b9: building12.floorMatKey.mainColour = ((Graphic)swatchColor).color; ((Graphic)ColorBG).color = ((Graphic)swatchColor).color; break; IL_0517: PluginController<ExtraCityEdit, Configs>.Log.LogError((object)"Something not selected"); break; IL_0499: val59 = Object.Instantiate<ColourSchemePreset>(building12.colourScheme); val59.neutral = ((Graphic)swatchColor).color; ((Object)val59).name = ((Object)building12.colourScheme).name; ((Graphic)ColorBG).color = ((Graphic)swatchColor).color; building12.colourScheme = val59; break; } ((Component)ColorPicker).gameObject.SetActive(false); ((Component)ReturnButton).GetComponent<ButtonController>().SetInteractable(true); })); num2 += num4; if (num2 == num5 + num4 * num) { num2 = num5; num3 -= num4; } } Transform val13 = Object.Instantiate<Transform>(val10, ColorPicker); ((Component)val13).gameObject.SetActive(true); ((Component)((Component)val13).transform).GetComponent<RectTransform>().sizeDelta = new Vector2(390f, 52f); ((Transform)((Component)((Component)val13).transform).GetComponent<RectTransform>()).position = new Vector3(950f, 130f, 0f); ((TMP_Text)((Component)((Component)val13).transform).GetComponentInChildren<TextMeshProUGUI>()).text = "Cancel"; ((UnityEvent)((Component)((Component)val13).transform).GetComponent<Button>().onClick).AddListener(UnityAction.op_Implicit((Action)delegate { ((Component)ColorPicker).gameObject.SetActive(false); ((Component)ReturnButton).GetComponent<ButtonController>().SetInteractable(true); })); Transform val14 = Object.Instantiate<Transform>(val7, newMenu.transform.Find("ButtonComponents")); val14.SetSiblingIndex(3); ((Object)val14).name = "LandValueDropdown"; LandValueDropdown = ((Component)val14.Find("Dropdown")).GetComponent<TMP_Dropdown>(); ((TMP_Text)((Component)((Component)val14).transform.Find("LabelText")).GetComponent<TextMeshProUGUI>()).text = "Land Value"; LandValueDropdown.ClearOptions(); LandValueDropdown.AddOptions(EnumerableExtensions.ToListIl2Cpp<string>((IEnumerable<string>)new List<string> { "Very Low", "Low", "Medium", "High", "Very High" })); ((UnityEventBase)LandValueDropdown.onValueChanged).RemoveAllListeners(); ((UnityEvent<int>)(object)LandValueDropdown.onValueChanged).AddListener(UnityAction<int>.op_Implicit((Action<int>)delegate(int value) { CityTile currentlySelectedTile = mainController.currentlySelectedTile; switch (value) { case 0: currentlySelectedTile.landValue = (LandValue)0; break; case 1: currentlySelectedTile.landValue = (LandValue)1; break; case 2: currentlySelectedTile.landValue = (LandValue)2; break; case 3: currentlySelectedTile.landValue = (LandValue)3; break; case 4: currentlySelectedTile.landValue = (LandValue)4; break; } })); Transform val15 = Object.Instantiate<Transform>(val7, newMenu.transform.Find("ButtonComponents")); val15.SetSiblingIndex(4); ((Object)val15).name = "EchelonFloorDropdown"; ((TMP_Text)((Component)((Component)val15).transform.Find("LabelText")).GetComponent<TextMeshProUGUI>()).text = "Echelons"; EchelonFloorDropdown = ((Component)((Component)val15).transform.Find("Dropdown")).GetComponent<TMP_Dropdown>(); EchelonFloorDropdown.ClearOptions(); EchelonFloorDropdown.AddOptions(EnumerableExtensions.ToListIl2Cpp<string>((IEnumerable<string>)new List<string> { "Ground Floor", "1st Floor", "2nd Floor", "3rd Floor", "4th Floor", "5th Floor", "6th Floor", "7th Floor", "8th Floor", "9th Floor", "10th Floor", "11th Floor", "12th Floor", "13th Floor", "14th Floor", "15th Floor", "16th Floor", "17th Floor", "18th Floor", "19th Floor", "Disable" })); ((UnityEventBase)EchelonFloorDropdown.onValueChanged).RemoveAllListeners(); ((UnityEvent<int>)(object)EchelonFloorDropdown.onValueChanged).AddListener(UnityAction<int>.op_Implicit((Action<int>)delegate(int value) { NewBuilding building11 = mainController.currentlySelectedTile.building; BuildingPreset val54 = Object.Instantiate<BuildingPreset>(building11.preset); val54.buildingFeaturesEchelonFloors = true; ((Object)val54).name = ((Object)building11.preset).name; val54.echelonFloorStart = value; building11.preset = val54; })); Transform val16 = Object.Instantiate<Transform>(val7, newMenu.transform.Find("ButtonComponents")); val16.SetSiblingIndex(5); ((Object)val16).name = "DesignDropdown"; ((TMP_Text)((Component)((Component)val16).transform.Find("LabelText")).GetComponent<TextMeshProUGUI>()).text = "Design"; DesignDropdown = ((Component)val16.Find("Dropdown")).GetComponent<TMP_Dropdown>(); DesignDropdown.ClearOptions(); DesignDropdown.AddOptions(EnumerableExtensions.ToListIl2Cpp<string>((IEnumerable<string>)new List<string> { "Industrial", "Street", "Basement", "Early Century", "80s Modern", "60s 70s", "Mid Century" })); ((UnityEventBase)DesignDropdown.onValueChanged).RemoveAllListeners(); ((UnityEvent<int>)(object)DesignDropdown.onValueChanged).AddListener(UnityAction<int>.op_Implicit((Action<int>)delegate(int value) { NewBuilding building10 = mainController.currentlySelectedTile.building; building10.designStyle = Toolbox.Instance.allDesignStyles[value]; })); Transform val17 = Object.Instantiate<Transform>(val7, newMenu.transform.Find("ButtonComponents")); val17.SetSiblingIndex(6); ((Object)val17).name = "GrubinessDropdown"; ((TMP_Text)((Component)((Component)val17).transform.Find("LabelText")).GetComponent<TextMeshProUGUI>()).text = "Cleanliness"; GrubinessDropdown = ((Component)val17.Find("Dropdown")).GetComponent<TMP_Dropdown>(); GrubinessDropdown.ClearOptions(); GrubinessDropdown.AddOptions(EnumerableExtensions.ToListIl2Cpp<string>((IEnumerable<string>)new List<string> { "Clean", "Mostly Clean", "Dirty", "Very Dirty", "Janitor is on vacation" })); ((UnityEventBase)GrubinessDropdown.onValueChanged).RemoveAllListeners(); ((UnityEvent<int>)(object)GrubinessDropdown.onValueChanged).AddListener(UnityAction<int>.op_Implicit((Action<int>)delegate(int value) { NewBuilding building9 = mainController.currentlySelectedTile.building; building9.ceilingMatKey.grubiness = (float)value / 4f; building9.floorMatKey.grubiness = (float)value / 4f; building9.defaultWallKey.grubiness = (float)value / 4f; })); Transform val18 = Object.Instantiate<Transform>(val7, newMenu.transform.Find("ButtonComponents")); val18.SetSiblingIndex(7); ((Object)val18).name = "UDBDropdown"; ((TMP_Text)((Component)((Component)val18).transform.Find("LabelText")).GetComponent<TextMeshProUGUI>()).text = "Extra Basements"; ultraDeepBasementDropdown = ((Component)val18.Find("Dropdown")).GetComponent<TMP_Dropdown>(); ultraDeepBasementDropdown.ClearOptions(); ultraDeepBasementDropdown.AddOptions(EnumerableExtensions.ToListIl2Cpp<string>((IEnumerable<string>)new List<string> { "None (Regular basement)", "1 Extra B. Floor", "2 Extra B. Floors", "3 Extra B. Floors" })); ((UnityEventBase)ultraDeepBasementDropdown.onValueChanged).RemoveAllListeners(); ((UnityEvent<int>)(object)ultraDeepBasementDropdown.onValueChanged).AddListener(UnityAction<int>.op_Implicit((Action<int>)delegate(int value) { NewBuilding selectedTile = mainController.currentlySelectedTile.building; BuildingPreset val53 = Object.Instantiate<BuildingPreset>(selectedTile.preset); ((Object)val53).name = ((Object)selectedTile.preset).name; int num15 = defaultBasementFloors[defaultBasementFloors.Keys.ToList().Find((BuildingPreset preset) => ((Object)preset).name == ((Object)selectedTile.preset).name)]; val53.basementLayouts[0].floorsWithThisSetting = num15 + value; selectedTile.preset = val53; ECE_DataSaving.DictionaryAdd(selectedTile, value); })); Transform val19 = Object.Instantiate<Transform>(val7, newMenu.transform.Find("ButtonComponents")); val19.SetSiblingIndex(8); ((Object)val19).name = "UDBFloodedDropdown"; ((TMP_Text)((Component)((Component)val19).transform.Find("LabelText")).GetComponent<TextMeshProUGUI>()).text = "Flooded Basements"; basementFloodedDropdown = ((Component)val19.Find("Dropdown")).GetComponent<TMP_Dropdown>(); basementFloodedDropdown.ClearOptions(); basementFloodedDropdown.AddOptions(EnumerableExtensions.ToListIl2Cpp<string>((IEnumerable<string>)new List<string> { "Enabled", "Disabled" })); ((UnityEventBase)basementFloodedDropdown.onValueChanged).RemoveAllListeners(); ((UnityEvent<int>)(object)basementFloodedDropdown.onValueChanged).AddListener(UnityAction<int>.op_Implicit((Action<int>)delegate(int value) { switch (value) { case 0: ECE_DataSaving.isFlooded = true; break; case 1: ECE_DataSaving.isFlooded = false; break; } })); Transform val20 = Object.Instantiate<Transform>(((Component)ReturnButton).transform.parent, newMenu.transform.Find("ButtonComponents")); ((Object)val20).name = "ButtonBG1"; val20.SetSiblingIndex(9); ((Component)val20.FindChild("Return")).gameObject.SetActive(false); Transform val21 = Object.Instantiate<Transform>(val10, val20); ((Object)val21).name = "DrawStreetsLaunch"; ((Component)val21).gameObject.SetActive(true); ((TMP_Text)((Component)val21.FindChild("Text")).GetComponent<TextMeshProUGUI>()).text = "Redraw Districts"; Button component4 = ((Component)val21).GetComponent<Button>(); ((UnityEventBase)component4.onClick).RemoveAllListeners(); mainController2 = ((Component)HighlanderSingleton<CityEditorController>.Instance).gameObject.GetComponent<CityEditorStreetEdit>(); GameObject DrawDistrictsMenu = Object.Instantiate<GameObject>(newMenu, newMenu.transform.parent); ((Object)DrawDistrictsMenu).name = "DrawStreetMenu"; DrawDistrictsMenu.SetActive(false); ((TMP_Text)((Component)DrawDistrictsMenu.transform.FindChild("Header/PanelTitle")).GetComponent<TextMeshProUGUI>()).text = "Redraw Districts"; DrawDistrictsMenu.GetComponent<RectTransform>().sizeDelta = new Vector2(668f, 444f); ((Graphic)((Component)DrawDistrictsMenu.transform.FindChild("Background")).GetComponent<Image>()).raycastTarget = true; Transform val22 = DrawDistrictsMenu.transform.FindChild("ButtonComponents"); val22.DetachChildren(); Transform val23 = Object.Instantiate<Transform>(val7, newMenu.transform.Find("ButtonComponents")); ((Object)val23).name = "StreetTypeSelector"; val23.SetSiblingIndex(9); ((TMP_Text)((Component)((Component)val23).transform.FindChild("LabelText")).GetComponent<TextMeshProUGUI>()).text = "Street Type"; StreetTypeDropdown = ((Component)val23.Find("Dropdown")).GetComponent<TMP_Dropdown>(); ((Component)StreetTypeDropdown).GetComponent<RectTransform>().sizeDelta = new Vector2(400f, 52f); StreetTypeDropdown.ClearOptions(); StreetTypeDropdown.AddOptions(EnumerableExtensions.ToListIl2Cpp<string>((IEnumerable<string>)new List<string> { "Street", "Backstreet", "Alley" })); ((UnityEventBase)StreetTypeDropdown.onValueChanged).RemoveAllListeners(); ((UnityEvent<int>)(object)StreetTypeDropdown.onValueChanged).AddListener(UnityAction<int>.op_Implicit((Action<int>)delegate(int value) { StreetController currentlySelectedStreet = mainController2.currentlySelectedStreet; Transform val49 = ((Component)currentlySelectedStreet).gameObject.transform.Find("Room(Clone)"); switch (value) { case 0: { for (int num11 = 1; num11 < val49.childCount; num11++) { Object.Destroy((Object)(object)((Component)val49.GetChild(num11)).gameObject); } StreetAdd(currentlySelectedStreet, 0); currentlySelectedStreet.streetSections.Clear(); currentlySelectedStreet.isAlley = false; currentlySelectedStreet.isBackstreet = false; currentlySelectedStreet.SetAsStreet(); currentlySelectedStreet.Redecorate(); currentlySelectedStreet.LoadStreetTiles(); currentlySelectedStreet.LoadSections(); foreach (StreetController item in EnumerableExtensions.ToList<StreetController>(currentlySelectedStreet.GetNeighboringStreets())) { Transform val51 = ((Component)item).gameObject.transform.Find("Room(Clone)"); if (!item.isAlley) { for (int num12 = 1; num12 < val51.childCount; num12++) { Object.Destroy((Object)(object)((Component)val51.GetChild(num12)).gameObject); } item.streetSections.Clear(); item.Redecorate(); item.LoadStreetTiles(); item.LoadSections(); } } blackList.Clear(); break; } case 1: { for (int num13 = 1; num13 < val49.childCount; num13++) { Object.Destroy((Object)(object)((Component)val49.GetChild(num13)).gameObject); } StreetAdd(currentlySelectedStreet, 1); currentlySelectedStreet.streetSections.Clear(); currentlySelectedStreet.isAlley = false; currentlySelectedStreet.isBackstreet = true; currentlySelectedStreet.SetAsBackstreet(); currentlySelectedStreet.Redecorate(); currentlySelectedStreet.LoadStreetTiles(); currentlySelectedStreet.LoadSections(); foreach (StreetController item2 in EnumerableExtensions.ToList<StreetController>(currentlySelectedStreet.GetNeighboringStreets())) { Transform val52 = ((Component)item2).gameObject.transform.Find("Room(Clone)"); if (!item2.isAlley) { for (int num14 = 1; num14 < val52.childCount; num14++) { Object.Destroy((Object)(object)((Component)val52.GetChild(num14)).gameObject); } item2.streetSections.Clear(); item2.Redecorate(); item2.LoadStreetTiles(); item2.LoadSections(); } } blackList.Clear(); break; } case 2: { for (int num9 = 1; num9 < val49.childCount; num9++) { Object.Destroy((Object)(object)((Component)val49.GetChild(num9)).gameObject); } StreetAdd(currentlySelectedStreet, 2); currentlySelectedStreet.streetSections.Clear(); currentlySelectedStreet.isAlley = true; currentlySelectedStreet.isBackstreet = false; currentlySelectedStreet.SetAsAlley(); currentlySelectedStreet.Redecorate(); currentlySelectedStreet.LoadStreetTiles(); currentlySelectedStreet.LoadSections(); foreach (StreetController item3 in EnumerableExtensions.ToList<StreetController>(currentlySelectedStreet.GetNeighboringStreets())) { Transform val50 = ((Component)item3).gameObject.transform.Find("Room(Clone)"); if (!item3.isAlley) { for (int num10 = 1; num10 < val50.childCount; num10++) { Object.Destroy((Object)(object)((Component)val50.GetChild(num10)).gameObject); } item3.streetSections.Clear(); item3.Redecorate(); item3.LoadStreetTiles(); item3.LoadSections(); } } blackList.Clear(); break; } } })); Transform val24 = Object.Instantiate<Transform>(val20, val22); ((Object)val24).name = "DistrictNameButton"; Transform val25 = val24.FindChild("DrawStreetsLaunch"); ((Object)val25).name = "StreetNameButton"; districtNameText = ((Component)val25.FindChild("Text")).GetComponent<TextMeshProUGUI>(); ((TMP_Text)districtNameText).text = "[SELECT A STREET / BUILDING]"; ((UnityEventBase)((Component)val25).GetComponent<Button>().onClick).RemoveAllListeners(); Transform val26 = Object.Instantiate<Transform>(val7, val22); ((Object)val26).name = "DistrictSelector"; districtDropdown = ((Component)val26.Find("Dropdown")).GetComponent<TMP_Dropdown>(); ((TMP_Text)((Component)((Component)val26).transform.Find("LabelText")).GetComponent<TextMeshProUGUI>()).text = "District"; districtDropdown.ClearOptions(); Transform val27 = Object.Instantiate<Transform>(val7, val22); ((Object)val27).name = "DistrictTypeSelector"; districtTypeDropdown = ((Component)val27.Find("Dropdown")).GetComponent<TMP_Dropdown>(); ((TMP_Text)((Component)((Component)val27).transform.Find("LabelText")).GetComponent<TextMeshProUGUI>()).text = "District Type"; districtTypeDropdown.ClearOptions(); districtTypeDropdown.AddOptions(EnumerableExtensions.ToListIl2Cpp<string>((IEnumerable<string>)new List<string> { "Residential [Poor]", "Red Light [Very poor]", "Industrial [Very poor]", "Chinatown [Rich]", "Commercial [Very rich]" })); Transform val28 = Object.Instantiate<Transform>(val20, val22); ((Object)val28).name = "DistrictApplyButton"; Transform val29 = val28.FindChild("DrawStreetsLaunch"); ((Object)val29).name = "DistrictApplyButton"; ((TMP_Text)((Component)val29.FindChild("Text")).GetComponent<TextMeshProUGUI>()).text = "Apply Districts"; ((UnityEventBase)((Component)val29).GetComponent<Button>().onClick).RemoveAllListeners(); ((UnityEvent<int>)(object)component3.onValueChanged).AddListener(UnityAction<int>.op_Implicit((Action<int>)delegate(int value) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: 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_0100: 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_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_046a: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04d5: Unknown result type (might be due to invalid IL or missing references) //IL_0515: Unknown result type (might be due to invalid IL or missing references) //IL_052c: Unknown result type (might be due to invalid IL or missing references) //IL_0543: Unknown result type (might be due to invalid IL or missing references) //IL_04fe: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Invalid comparison between Unknown and I4 //IL_0882: Unknown result type (might be due to invalid IL or missing references) //IL_08d4: Unknown result type (might be due to invalid IL or missing references) //IL_08ed: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_0c77: Unknown result type (might be due to invalid IL or missing references) //IL_0cdd: Unknown result type (might be due to invalid IL or missing references) //IL_0d43: Unknown result type (might be due to invalid IL or missing references) //IL_0da9: Unknown result type (might be due to invalid IL or missing references) //IL_092d: Unknown result type (might be due to invalid IL or missing references) //IL_0944: Unknown result type (might be due to invalid IL or missing references) //IL_095b: Unknown result type (might be due to invalid IL or missing references) //IL_0916: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Invalid comparison between Unknown and I4 //IL_0e69: Unknown result type (might be due to invalid IL or missing references) //IL_0eb0: Unknown result type (might be due to invalid IL or missing references) //IL_0ef7: Unknown result type (might be due to invalid IL or missing references) //IL_0f3e: Unknown result type (might be due to invalid IL or missing references) //IL_05a4: Unknown result type (might be due to invalid IL or missing references) //IL_05a9: Unknown result type (might be due to invalid IL or missing references) //IL_05b8: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05cc: Unknown result type (might be due to invalid IL or missing references) //IL_05d1: Unknown result type (might be due to invalid IL or missing references) //IL_05d3: Unknown result type (might be due to invalid IL or missing references) //IL_05d7: Invalid comparison between Unknown and I4 //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_0fe1: Unknown result type (might be due to invalid IL or missing references) //IL_1047: Unknown result type (might be due to invalid IL or missing references) //IL_10d0: Unknown result type (might be due to invalid IL or missing references) //IL_1124: Unknown result type (might be due to invalid IL or missing references) //IL_05f9: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Invalid comparison between Unknown and I4 //IL_068d: Unknown result type (might be due to invalid IL or missing references) //IL_0691: Invalid comparison between Unknown and I4 //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_09bc: Unknown result type (might be due to invalid IL or missing references) //IL_09c1: Unknown result type (might be due to invalid IL or missing references) //IL_09d0: Unknown result type (might be due to invalid IL or missing references) //IL_09d5: Unknown result type (might be due to invalid IL or missing references) //IL_09e4: Unknown result type (might be due to invalid IL or missing references) //IL_09e9: Unknown result type (might be due to invalid IL or missing references) //IL_09eb: Unknown result type (might be due to invalid IL or missing references) //IL_09ef: Invalid comparison between Unknown and I4 //IL_06b3: Unknown result type (might be due to invalid IL or missing references) //IL_0a11: Unknown result type (might be due to invalid IL or missing references) //IL_0747: Unknown result type (might be due to invalid IL or missing references) //IL_074b: Invalid comparison between Unknown and I4 //IL_0aa5: Unknown result type (might be due to invalid IL or missing references) //IL_0aa9: Invalid comparison between Unknown and I4 //IL_076d: Unknown result type (might be due to invalid IL or missing references) //IL_0acb: Unknown result type (might be due to invalid IL or missing references) //IL_0b5f: Unknown result type (might be due to invalid IL or missing references) //IL_0b63: Invalid comparison between Unknown and I4 //IL_0b85: Unknown result type (might be due to invalid IL or missing references) if (value == 1 && (Object)(object)mainController.currentlySelectedTile != (Object)null) { NewBuilding building4 = mainController.currentlySelectedTile.building; materialPart = building4.defaultWallMaterial; ((Selectable)matSelectionDropdown).interactable = true; partPicked = 1; ((Graphic)ColorBG).color = building4.defaultWallKey.mainColour; ColorBG.sprite = newTexture; ColorBG.overrideSprite = newTexture; ((Component)ColorButton).GetComponent<ButtonController>().SetInteractable(true); ColorBG.pixelsPerUnitMultiplier = 9f; if (((Graphic)ColorBG).color == new Color(0f, 0f, 0f, 0f)) { ((Graphic)ColorBG).color = new Color(1f, 1f, 1f, 1f); } ((Graphic)ColorBG2).color = building4.defaultWallKey.colour1; ((Graphic)ColorBG3).color = building4.defaultWallKey.colour2; ((Graphic)ColorBG4).color = building4.defaultWallKey.colour3; { foreach (MaterialGroupPreset item4 in mat) { if ((SoCustomComparison)(object)item4 == (SoCustomComparison)(object)materialPart) { matSelectionDropdown.value = mat.IndexOf(item4); MaterialColour colour4 = item4.variations[0].colour1; MaterialColour colour5 = item4.variations[0].colour2; MaterialColour colour6 = item4.variations[0].colour3; if ((int)colour4 == 15) { ((Graphic)ColorBG2).color = new Color(1f, 1f, 1f, 1f); ColorBG2.sprite = disabledCross; ColorBG2.overrideSprite = disabledCross; ColorBG2.pixelsPerUnitMultiplier = 10f; ((Component)ColorButton2).GetComponent<ButtonController>().SetInteractable(false); } else { ColorBG2.sprite = newTexture; ColorBG2.overrideSprite = newTexture; ColorBG2.pixelsPerUnitMultiplier = 9f; ((Component)ColorButton2).GetComponent<ButtonController>().SetInteractable(true); } if ((int)colour5 == 15) { ((Graphic)ColorBG3).color = new Color(1f, 1f, 1f, 1f); ColorBG3.sprite = disabledCross; ColorBG3.overrideSprite = disabledCross; ColorBG3.pixelsPerUnitMultiplier = 10f; ((Component)ColorButton3).GetComponent<ButtonController>().SetInteractable(false); } else { ColorBG3.sprite = newTexture; ColorBG3.overrideSprite = newTexture; ColorBG3.pixelsPerUnitMultiplier = 9f; ((Component)ColorButton3).GetComponent<ButtonController>().SetInteractable(true); } if ((int)colour6 == 15) { ((Graphic)ColorBG4).color = new Color(1f, 1f, 1f, 1f); ColorBG4.sprite = disabledCross; ColorBG4.overrideSprite = disabledCross; ColorBG4.pixelsPerUnitMultiplier = 10f; ((Component)ColorButton4).GetComponent<ButtonController>().SetInteractable(false); } else { ColorBG4.sprite = newTexture; ColorBG4.overrideSprite = newTexture; ColorBG4.pixelsPerUnitMultiplier = 9f; ((Component)ColorButton4).GetComponent<ButtonController>().SetInteractable(true); } } } return; } } if (value == 2 && (Object)(object)mainController.currentlySelectedTile != (Object)null) { NewBuilding building5 = mainController.currentlySelectedTile.building; materialPart = building5.floorMaterial; ((Selectable)matSelectionDropdown).interactable = true; partPicked = 2; ((Graphic)ColorBG).color = building5.floorMatKey.mainColour; ColorBG.sprite = newTexture; ColorBG.overrideSprite = newTexture; ((Component)ColorButton).GetComponent<ButtonController>().SetInteractable(true); ColorBG.pixelsPerUnitMultiplier = 9f; if (((Graphic)ColorBG).color == new Color(0f, 0f, 0f, 0f)) { ((Graphic)ColorBG).color = new Color(1f, 1f, 1f, 1f); } ((Graphic)ColorBG2).color = building5.floorMatKey.colour1; ((Graphic)ColorBG3).color = building5.floorMatKey.colour2; ((Graphic)ColorBG4).color = building5.floorMatKey.colour3; { foreach (MaterialGroupPreset item5 in mat) { if ((SoCustomComparison)(object)item5 == (SoCustomComparison)(object)materialPart) { matSelectionDropdown.value = mat.IndexOf(item5); MaterialColour colour7 = item5.variations[0].colour1; MaterialColour colour8 = item5.variations[0].colour2; MaterialColour colour9 = item5.variations[0].colour3; if ((int)colour7 == 15) { ((Graphic)ColorBG2).color = new Color(1f, 1f, 1f, 1f); ColorBG2.sprite = disabledCross; ColorBG2.overrideSprite = disabledCross; ColorBG2.pixelsPerUnitMultiplier = 10f; ((Component)ColorButton2).GetComponent<ButtonController>().SetInteractable(false); } else { ColorBG2.sprite = newTexture; ColorBG2.overrideSprite = newTexture; ColorBG2.pixelsPerUnitMultiplier = 9f; ((Component)ColorButton2).GetComponent<ButtonController>().SetInteractable(true); } if ((int)colour8 == 15) { ((Graphic)ColorBG3).color = new Color(1f, 1f, 1f, 1f); ColorBG3.sprite = disabledCross; ColorBG3.overrideSprite = disabledCross; ColorBG3.pixelsPerUnitMultiplier = 10f; ((Component)ColorButton3).GetComponent<ButtonController>().SetInteractable(false); } else { ColorBG3.sprite = newTexture; ColorBG3.overrideSprite = newTexture; ColorBG3.pixelsPerUnitMultiplier = 9f; ((Component)ColorButton3).GetComponent<ButtonController>().SetInteractable(true); } if ((int)colour9 == 15) { ((Graphic)ColorBG4).color = new Color(1f, 1f, 1f, 1f); ColorBG4.sprite = disabledCross; ColorBG4.overrideSprite = disabledCross; ColorBG4.pixelsPerUnitMultiplier = 10f; ((Component)ColorButton4).GetComponent<ButtonController>().SetInteractable(false); } else { ColorBG4.sprite = newTexture; ColorBG4.overrideSprite = newTexture; ColorBG4.pixelsPerUnitMultiplier = 9f; ((Component)ColorButton4).GetComponent<ButtonController>().SetInteractable(true); } } } return; } } if (value == 3 && (Object)(object)mainController.currentlySelectedTile != (Object)null) { NewBuilding building6 = mainController.currentlySelectedTile.building; materialPart = building6.ceilingMaterial; ((Selectable)matSelectionDropdown).interactable = true; partPicked = 3; ((Graphic)ColorBG).color = building6.ceilingMatKey.mainColour; ColorBG.sprite = newTexture; ColorBG.overrideSprite = newTexture; ColorBG.pixelsPerUnitMultiplier = 9f; ((Component)ColorButton).GetComponent<ButtonController>().SetInteractable(true); if (((Graphic)ColorBG).color == new Color(0f, 0f, 0f, 0f)) { ((Graphic)ColorBG).color = new Color(1f, 1f, 1f, 1f); } ((Graphic)ColorBG2).color = building6.ceilingMatKey.colour1; ((Graphic)ColorBG3).color = building6.ceilingMatKey.colour2; ((Graphic)ColorBG4).color = building6.ceilingMatKey.colour3; { foreach (MaterialGroupPreset item6 in mat) { if ((SoCustomComparison)(object)item6 == (SoCustomComparison)(object)materialPart) { matSelectionDropdown.value = mat.IndexOf(item6); MaterialColour colour10 = item6.variations[0].colour1; MaterialColour colour11 = item6.variations[0].colour2; MaterialColour colour12 = item6.variations[0].colour3; if ((int)colour10 == 15) { ((Graphic)ColorBG2).color = new Color(1f, 1f, 1f, 1f); ColorBG2.sprite = disabledCross; ColorBG2.overrideSprite = disabledCross; ColorBG2.pixelsPerUnitMultiplier = 10f; ((Component)ColorButton2).GetComponent<ButtonController>().SetInteractable(false); } else { ColorBG2.sprite = newTexture; ColorBG2.overrideSprite = newTexture; ColorBG2.pixelsPerUnitMultiplier = 9f; ((Component)ColorButton2).GetComponent<ButtonController>().SetInteractable(true); } if ((int)colour11 == 15) { ((Graphic)ColorBG3).color = new Color(1f, 1f, 1f, 1f); ColorBG3.sprite = disabledCross; ColorBG3.overrideSprite = disabledCross; ColorBG3.pixelsPerUnitMultiplier = 10f; ((Component)ColorButton3).GetComponent<ButtonController>().SetInteractable(false); } else { ColorBG3.sprite = newTexture; ColorBG3.overrideSprite = newTexture; ColorBG3.pixelsPerUnitMultiplier = 9f; ((Component)ColorButton3).GetComponent<ButtonController>().SetInteractable(true); } if ((int)colour12 == 15) { ((Graphic)ColorBG4).color = new Color(1f, 1f, 1f, 1f); ColorBG4.sprite = disabledCross; ColorBG4.overrideSprite = disabledCross; ColorBG4.pixelsPerUnitMultiplier = 10f; ((Component)ColorButton4).GetComponent<ButtonController>().SetInteractable(false); } else { ColorBG4.sprite = newTexture; ColorBG4.overrideSprite = newTexture; ColorBG4.pixelsPerUnitMultiplier = 9f; ((Component)ColorButton4).GetComponent<ButtonController>().SetInteractable(true); } } } return; } } switch (value) { case 0: ((Selectable)matSelectionDropdown).interactable = false; partPicked = 0; ((Graphic)ColorBG).color = new Color(1f, 1f, 1f, 1f); ColorBG.sprite = disabledCross; ColorBG.overrideSprite = disabledCross; ColorBG.pixelsPerUnitMultiplier = 10f; ((Component)ColorButton).GetComponent<ButtonController>().SetInteractable(false); ((Graphic)ColorBG2).color = new Color(1f, 1f, 1f, 1f); ColorBG2.sprite = disabledCross; ColorBG2.overrideSprite = disabledCross; ColorBG2.pixelsPerUnitMultiplier = 10f; ((Component)ColorButton2).GetComponent<ButtonController>().SetInteractable(false); ((Graphic)ColorBG3).color = new Color(1f, 1f, 1f, 1f); ColorBG3.sprite = disabledCross; ColorBG3.overrideSprite = disabledCross; ColorBG3.pixelsPerUnitMultiplier = 10f; ((Component)ColorButton3).GetComponent<ButtonController>().SetInteractable(false); ((Graphic)ColorBG4).color = new Color(1f, 1f, 1f, 1f); ColorBG4.sprite = disabledCross; ColorBG4.overrideSprite = disabledCross; ColorBG4.pixelsPerUnitMultiplier = 10f; ((Component)ColorButton4).GetComponent<ButtonController>().SetInteractable(false); break; case 4: { NewBuilding building8 = mainController.currentlySelectedTile.building; partPicked = 4; ((Selectable)matSelectionDropdown).interactable = false; ColorBG4.sprite = newTexture; ColorBG4.overrideSprite = newTexture; ColorBG4.pixelsPerUnitMultiplier = 9f; ((Graphic)ColorBG4).color = building8.colourScheme.secondary2; ColorBG.sprite = newTexture; ColorBG.overrideSprite = newTexture; ColorBG.pixelsPerUnitMultiplier = 9f; ((Graphic)ColorBG).color = building8.colourScheme.primary1; ColorBG2.sprite = newTexture; ColorBG2.overrideSprite = newTexture; ColorBG2.pixelsPerUnitMultiplier = 9f; ((Graphic)ColorBG2).color = building8.colourScheme.primary2; ColorBG3.sprite = newTexture; ColorBG3.overrideSprite = newTexture; ColorBG3.pixelsPerUnitMultiplier = 9f; ((Graphic)ColorBG3).color = building8.colourScheme.secondary1; ((Component)ColorButton).GetComponent<ButtonController>().SetInteractable(true); ((Component)ColorButton2).GetComponent<ButtonController>().SetInteractable(true); ((Component)ColorButton3).GetComponent<ButtonController>().SetInteractable(true); ((Component)ColorButton4).GetComponent<ButtonController>().SetInteractable(true); break; } case 5: { NewBuilding building7 = mainController.currentlySelectedTile.building; partPicked = 5; ((Selectable)matSelectionDropdown).interactable = false; ((Graphic)ColorBG3).color = new Color(1f, 1f, 1f, 1f); ColorBG3.sprite = disabledCross; ColorBG3.overrideSprite = disabledCross; ColorBG3.pixelsPerUnitMultiplier = 10f; ((Component)ColorButton3).GetComponent<ButtonController>().SetInteractable(false); ((Graphic)ColorBG4).color = new Color(1f, 1f, 1f, 1f); ColorBG4.sprite = disabledCross; ColorBG4.overrideSprite = disabledCross; ColorBG4.pixelsPerUnitMultiplier = 10f; ((Component)ColorButton4).GetComponent<ButtonController>().SetInteractable(false); ColorBG.sprite = newTexture; ColorBG.overrideSprite = newTexture; ColorBG.pixelsPerUnitMultiplier = 9f; ((Graphic)ColorBG).color = building7.colourScheme.neutral; ((Component)ColorButton).GetComponent<ButtonController>().SetInteractable(true); ColorBG2.sprite = newTexture; ColorBG2.overrideSprite = newTexture; ColorBG2.pixelsPerUnitMultiplier = 9f; ((Graphic)ColorBG2).color = building7.wood; ((Component)ColorButton2).GetComponent<ButtonController>().SetInteractable(true); break; } } })); ((UnityEvent<int>)(object)matSelectionDropdown.onValueChanged).AddListener(UnityAction<int>.op_Implicit((Action<int>)delegate(int value) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0127: 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_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Invalid comparison between Unknown and I4 //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Invalid comparison between Unknown and I4 //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Invalid comparison between Unknown and I4 //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Invalid comparison between Unknown and I4 //IL_043c: Unknown result type (might be due to invalid IL or missing references) if (partPicked == 1) { NewBuilding building = mainController.currentlySelectedTile.building; building.defaultWallMaterial = mat[value]; ((Graphic)ColorBG).color = building.defaultWallKey.mainColour; } else if (partPicked == 2) { NewBuilding building2 = mainController.currentlySelectedTile.building; building2.floorMaterial = mat[value]; ((Graphic)ColorBG).color = building2.floorMatKey.mainColour; } else if (partPicked == 3) { NewBuilding building3 = mainController.currentlySelectedTile.building; building3.ceilingMaterial = mat[value]; ((Graphic)ColorBG).color = building3.ceilingMatKey.mainColour; } ColorBG.sprite = newTexture; ColorBG.overrideSprite = newTexture; if (((Graphic)ColorBG).color == new Color(0f, 0f, 0f, 0f)) { ((Graphic)ColorBG).color = new Color(1f, 1f, 1f, 1f); } ((Component)ColorButton).GetComponent<ButtonController>().SetInteractable(true); ColorBG.pixelsPerUnitMultiplier = 9f; MaterialColour main = mat[value].variations[0].main; MaterialColour colour = mat[value].variations[0].colour1; MaterialColour colour2 = mat[value].variations[0].colour2; MaterialColour colour3 = mat[value].variations[0].colour3; if ((int)colour == 15) { ((Graphic)ColorBG2).color = new Color(1f, 1f, 1f, 1f); ColorBG2.sprite = disabledCross; ColorBG2.overrideSprite = disabledCross; ColorBG2.pixelsPerUnitMultiplier = 10f; ((Component)ColorButton2).GetComponent<ButtonController>().SetInteractable(false); } else { ColorBG2.sprite = newTexture; ColorBG2.overrideSprite = newTexture; ColorBG2.pixelsPerUnitMultiplier = 9f; ((Component)ColorButton2).GetComponent<ButtonController>().SetInteractable(true); } if ((int)colour2 == 15) { ((Graphic)ColorBG3).color = new Color(1f, 1f, 1f, 1f); ColorBG3.sprite = disabledCross; ColorBG3.overrideSprite = disabledCross; ColorBG3.pixelsPerUnitMultiplier = 10f; ((Component)ColorButton3).GetComponent<ButtonController>().SetInteractable(false); } else { ColorBG3.sprite = newTexture; ColorBG3.overrideSprite = newTexture; ColorBG3.pixelsPerUnitMultiplier = 9f; ((Component)ColorButton3).GetComponent<ButtonController>().SetInteractable(true); } if ((int)colour3 == 15) { ((Graphic)ColorBG4).color = new Color(1f, 1f, 1f, 1f); ColorBG4.sprite = disabledCross; ColorBG4.overrideSprite = disabledCross; ColorBG4.pixelsPerUnitMultiplier = 10f; ((Component)ColorButton4).GetComponent<ButtonController>().SetInteractable(false); } else { ColorBG4.sprite = newTexture; ColorBG4.overrideSprite = newTexture; ColorBG4.pixelsPerUnitMultiplier = 9f; ((Component)ColorButton4).GetComponent<ButtonController>().SetInteractable(true); } if ((int)main == 15) { ((Graphic)ColorBG).color = new Color(1f, 1f, 1f, 1f); } })); ((UnityEvent)((Component)ColorButton).GetComponent<Button>().onClick).AddListener(UnityAction.op_Implicit((Action)delegate { ((Component)ColorPicker).gameObject.SetActive(true); ((Component)ReturnButton).GetComponent<ButtonController>().SetInteractable(false); ((TMP_Text)((Component)header2.Find("PanelTitle")).GetComponent<TextMeshProUGUI>()).text = "Blending"; colorPartPicked = 1; if (partPicked == 4) { ((TMP_Text)((Component)header2.Find("PanelTitle")).GetComponent<TextMeshProUGUI>()).text = "Primary One"; } if (partPicked == 5) { ((TMP_Text)((Component)header2.Find("PanelTitle")).GetComponent<TextMeshProUGUI>()).text = "Neutral"; } })); ((UnityEvent)((Component)ColorButton2).GetComponent<Button>().onClick).AddListener(UnityAction.op_Implicit((Action)delegate { ((Component)ColorPicker).gameObject.SetActive(true); ((Component)ReturnButton).GetComponent<ButtonController>().SetInteractable(false); ((TMP_Text)((Component)header2.Find("PanelTitle")).GetComponent<TextMeshProUGUI>()).text = "Primary Color"; colorPartPicked = 2; if (partPicked == 4) { ((TMP_Text)((Component)header2.Find("PanelTitle")).GetComponent<TextMeshProUGUI>()).text = "Primary Two"; } if (partPicked == 5) { ((TMP_Text)((Component)header2.Find("PanelTitle")).GetComponent<TextMeshProUGUI>()).text = "Wood"; } })); ((UnityEvent)((Component)ColorButton3).GetComponent<Button>().onClick).AddListener(UnityAction.op_Implicit((Action)delegate { ((Component)ColorPicker).gameObject.SetActive(true); ((Component)ReturnButton).GetComponent<ButtonController>().SetInteractable(false); ((TMP_Text)((Component)header2.Find("PanelTitle")).GetComponent<TextMeshProUGUI>()).text = "Secondary Color"; colorPartPicked = 3; if (partPicked == 4) { ((TMP_Text)((Component)header2.Find("PanelTitle")).GetComponent<TextMeshProUGUI>()).text = "Secondary One"; } })); ((UnityEvent)((Component)ColorButton4).GetComponent<Button>().onClick).AddListener(UnityAction.op_Implicit((Action)delegate { ((Component)ColorPicker).gameObject.SetActive(true); ((Component)ReturnButton).GetComponent<ButtonController>().SetInteractable(false); ((TMP_Text)((Component)header2.Find("PanelTitle")).GetComponent<TextMeshProUGUI>()).text = "Tertiary Color"; colorPartPicked = 4; if (partPicked == 4) { ((TMP_Text)((Component)header2.Find("PanelTitle")).GetComponent<TextMeshProUGUI>()).text = "Secondary Two"; } })); ((UnityEvent)component4.onClick).AddListener(UnityAction.op_Implicit((Action)delegate { //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0608: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_04e1: Unknown result type (might be due to invalid IL or missing references) //IL_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_054d: Unknown result type (might be due to invalid IL or missing references) HighlanderSingleton<CityEditorController>.Instance.SwitchEditorMode((CityEditorMode)0); districtList = EnumerableExtensions.ToList<DistrictController>(HighlanderSingleton<CityDistricts>.Instance.districtDirectory); foreach (DistrictController district in districtList) { if (!districtColor.ContainsKey(district)) { districtColor.Add(district, Random.ColorHSV(0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f)); } } districtDropdown.ClearOptions(); List<string> list2 = new List<string>(); for (int num7 = 0; num7 < districtList.Count; num7++) { list2.Add(((Object)districtList[num7]).name); } list2.Add("New District"); if (antiDoubleCheck == 0) { districtDropdown.AddOptions(EnumerableExtensions.ToListIl2Cpp<string>((IEnumerable<string>)list2)); currentDummyDistrict = districtDropdown.options.Count - 1; } try { Enumerator<StreetController> enumerator8 = CityData.Instance.streetDirectory.GetEnumerator(); while (enumerator8.MoveNext()) { StreetController current8 = enumerator8.Current; (bool, bool) tuple = (current8.isAlley, current8.isBackstreet); (bool, bool) tuple2 = tuple; if (!tuple2.Item1) { if (!tuple2.Item2) { StreetAdd(current8, 0); } else { StreetAdd(current8, 1); } } else if (!tuple2.Item2) { StreetAdd(current8, 2); } } } catch (Exception ex) { PluginController<ExtraCityEdit, Configs>.Log.LogError((object)("Error in street list caching: " + ex.Message)); } GameObject.Find("PrototypeBuilderCanvas").GetComponent<PrototypeDebugPanel>().ShrinkBuildingsHack(new Vector3(1f, 0.1f, 1f)); DrawDistrictsMenu.SetActive(true); GameObject.Find("PrototypeBuilderCanvas/CityEditorPanel").gameObject.SetActive(false); newMenu.SetActive(false); GameObject streetSelectionDisplayPrefab = ((Component)mainController).gameObject.GetComponent<CityEditorStreetEdit>().streetSelectionDisplayPrefab; foreach (DistrictController key in districtColor.Keys) { Color color = districtColor[key]; Il2CppArrayBase<StreetController> componentsInChildren = ((Component)((Component)key).transform).GetComponentsInChildren<StreetController>(true); Il2CppArrayBase<CityTile> componentsInChildren2 = ((Component)((Component)key).transform).GetComponentsInChildren<CityTile>(true); if (!districtStreet.TryGetValue(key, out List<StreetController> value2) || value2 == null) { value2 = new List<StreetController>(); districtStreet[key] = value2; } foreach (StreetController item7 in componentsInChildren) { value2.Add(item7); streetButtonsInverse.Add(item7, new List<GameObject>()); Enumerator<NewTile> enumerator11 = item7.tiles.GetEnumerator(); while (enumerator11.MoveNext()) { NewTile current11 = enumerator11.Current; GameObject val47 = Object.Instantiate<GameObject>(streetSelectionDisplayPrefab, ((Component)HighlanderSingleton<CityEditorController>.Instance).transform); val47.transform.position = current11.position + new Vector3(0f, 0.2f, 0f); val47.transform.localScale = new Vector3(5.4f, 5.4f, 5.4f); ((Renderer)((Component)val47.transform).GetComponent<MeshRenderer>()).material.color = color; val47.AddComponent<BoxCollider>(); int num8 = item7.tiles.IndexOf(current11); ((Object)val47).name = item7.playerEditedStreetName + " " + num8; if (!streetButtons.ContainsKey(val47)) { streetButtons.Add(val47, item7); streetButtonsInverse[item7].Add(val47); } } } foreach (CityTile item8 in componentsInChildren2) { if (!item8.building.preset.boundary && !item8.building.preset.boundaryCorner) { GameObject val48 = Object.Instantiate<GameObject>(streetSelectionDisplayPrefab, ((Component)HighlanderSingleton<CityEditorController>.Instance).transform); val48.transform.position = ((Component)item8).transform.position + new Vector3(0f, 0.2f, 0f); val48.transform.localScale = new Vector3(28f, 28f, 28f); ((Renderer)((Component)val48.transform).GetComponent<MeshRenderer>()).material.color = color; ((Object)val48).name = ((Object)item8.building.preset).name + " " + ((Object)item8).name; val48.AddComponent<BoxCollider>(); val48.GetComponent<BoxCollider>().size = new Vector3(1f, 1f, 1f); ((Collider)val48.GetComponent<BoxCollider>()).isTrigger = true; if (!buildingButtons.ContainsKey(val48)) { buildingButtons.Add(val48, item8); } else { PluginController<ExtraCityEdit, Configs>.Log.LogError((object)("Key already exists in the dictionary: " + ((Object)val48).name)); Object.Destroy((Object)(object)val48); } } } } HighlanderSingleton<CityEditorController>.Instance._editCam.tgtRot = new Vector3(40f, 0f, 0f); })); ((UnityEvent<int>)(object)districtDropdown.onValueChanged).AddListener(UnityAction<int>.op_Implicit((Action<int>)delegate(int value) { //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Expected O, but got Unknown if (value == currentDummyDistrict && SelectedThing != null && ((Component)HighlanderSingleton<CityDistricts>.Instance.districtDirectory[currentDummyDistrict - 1]).transform.childCount != 0) { GameObject districtPrefab = HighlanderSingleton<CityDistricts>.Instance.districtPrefab; GameObject val34 = Object.Instantiate<GameObject>(districtPrefab); DistrictPreset val35 = Toolbox.Instance.allDistricts[Random.Range(0, Toolbox.Instance.allDistricts.Count - 1)]; val34.GetComponent<DistrictController>().Setup(val35); val34.transform.SetParent(GameObject.Find("Map/City").transform); districtList.Add(val34.GetComponent<DistrictController>()); districtColor.Add(val34.GetComponent<DistrictController>(), Random.ColorHSV(0f, 1f, 1f, 1f, 1f, 1f, 1f, 1f)); dynamic val36 = SelectedThing; StreetController val37 = (StreetController)(object)((val36 is StreetController) ? val36 : null); if (val37 != null) { ((NewGameLocation)val37).district = val34.GetComponent<DistrictController>(); ((Component)val37).transform.SetParent(val34.transform); } dynamic val38 = SelectedThing; CityTile val39 = (CityTile)(object)((val38 is CityTile) ? val38 : null); if (val39 != null) { val39.district = val34.GetComponent<DistrictController>(); ((Component)val39).transform.SetParent(val34.transform); if (val39.block.cityTiles.Count != 1) { val39.block.cityTiles.Remove(val39); GameObject val40 = Object.Instantiate<GameObject>(PrefabControls.Instance.block); val40.transform.SetParent(val34.transform); val40.GetComponent<BlockController>().Setup(val34.GetComponent<DistrictController>()); val40.GetComponent<BlockController>().AddCityTile(val39); val40.GetComponent