using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Text; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Steamworks; using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Controls; using UnityEngine.Rendering; using UnityEngine.Rendering.Universal; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("EasyDeliveryMenu")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("EasyDeliveryMenu")] [assembly: AssemblyCopyright("Copyright © 2026 Lightnite Productions")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("b5208385-0f57-4074-a545-ce76e39c0136")] [assembly: AssemblyFileVersion("6.9.6.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("6.9.6.0")] internal sealed class ConfigurationManagerAttributes { public delegate void CustomHotkeyDrawerFunc(ConfigEntryBase setting, ref bool isCurrentlyAcceptingInput); public bool? ShowRangeAsPercent; public Action CustomDrawer; public CustomHotkeyDrawerFunc CustomHotkeyDrawer; public bool? Browsable; public string Category; public object DefaultValue; public bool? HideDefaultButton; public bool? HideSettingName; public string Description; public string DispName; public int? Order; public bool? ReadOnly; public bool? IsAdvanced; public Func ObjToStr; public Func StrToObj; } namespace EasyDeliveryMenu { [BepInPlugin("soup.tweaks.modmenu", "EasyDeliveryMenu", "6.9.6")] public class EasyDeliveryMenuPlugin : BaseUnityPlugin { [HarmonyPatch(typeof(sHUD), "FrameUpdate")] public static class sHUD_FrameUpdate_Patch { private static void Postfix(sHUD __instance) { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) if (ShowFPS == null || !ShowFPS.Value) { return; } try { FieldInfo field = typeof(sHUD).GetField("R", BindingFlags.Instance | BindingFlags.NonPublic); if (field != null) { MiniRenderer val = (MiniRenderer)field.GetValue(__instance); if ((Object)(object)val != (Object)null) { val.fontOptions.alignment = (Alignment)0; string text = Mathf.Floor(_displayedFPS) + " FPS"; val.fput(text, 70f, (float)(val.height / 20), 0f, 13f, 0f, -1); } } } catch { } } } private class DelayedTeleport { public sCharacterController player; public Vector3 position; public float time; } [HarmonyPatch(typeof(sHUD), "DipToBlack", new Type[] { typeof(float) })] public static class sHUD_DipToBlack_Patch { private static void Prefix(float duration) { _teleportFreezeTime = true; _teleportFreezeUntil = Time.unscaledTime + duration + 0.5f; } } [HarmonyPatch(typeof(sDayNightCycle), "WeatherCycle")] public static class sDayNightCycle_WeatherCycle_Patch { } [HarmonyPatch(typeof(CarDamage), "OnCollisionEnter")] public static class CarDamage_OnCollisionEnter_Patch { private static bool Prefix(CarDamage __instance, Collision collision) { if (!VehicleInvincibility.Value) { return true; } if (!((Behaviour)__instance).enabled || collision.gameObject.layer == LayerMask.NameToLayer("Car")) { return false; } __instance.damage = Mathf.Clamp01(__instance.damage); return false; } } [HarmonyPatch(typeof(CarDamage), "CheckDeadVelocity")] public static class CarDamage_CheckDeadVelocity_Patch { private static bool Prefix(ref bool __result) { if (VehicleInvincibility.Value) { __result = false; return false; } return true; } } [HarmonyPatch(typeof(CarDamage), "Update")] public static class CarDamage_Update_Patch { private static bool Prefix(CarDamage __instance) { if (InstantReset.Value && sInputManager.players[0].resetPressed && !CarLessMode.carless) { sPathFinder val = Object.FindObjectOfType(); sCarController component = ((Component)__instance).GetComponent(); if ((Object)(object)val != (Object)null && (Object)(object)component != (Object)null && !component.GuyActive) { val.ResetCar(); return false; } } return true; } private static void Postfix(CarDamage __instance) { if (VehicleInvincibility.Value && __instance.damage > 0f) { __instance.damage = 0f; } } } [HarmonyPatch(typeof(sPathFinder), "ResetCar")] public static class sPathFinder_ResetCar_Patch { private static bool Prefix(sPathFinder __instance) { if (!InstantReset.Value) { return true; } if ((Object)(object)__instance.car == (Object)null) { return false; } __instance.car.ResetFreeze(); MethodInfo method = typeof(sPathFinder).GetMethod("DoResetCar", BindingFlags.Instance | BindingFlags.NonPublic); if (method != null) { method.Invoke(__instance, null); } return false; } } [HarmonyPatch(typeof(sPathFinder), "DoResetCar")] public static class sPathFinder_DoResetCar_Patch { private static void Postfix(sPathFinder __instance) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)__instance.car != (Object)null && (Object)(object)__instance.car.rb != (Object)null) { Vector3 position = ((Component)__instance.car).transform.position; position.y += 0.3f; ((Component)__instance.car).transform.position = position; __instance.car.rb.position = position; } } } [HarmonyPatch(typeof(sPathFinder), "ResetCar")] public static class sPathFinder_ResetCar_PostfixPatch { private static void Postfix(sPathFinder __instance) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)__instance == (Object)null) && !((Object)(object)__instance.car == (Object)null) && !((Object)(object)__instance.car.rb == (Object)null) && InstantReset.Value) { __instance.car.rb.velocity = Vector3.zero; __instance.car.rb.angularVelocity = Vector3.zero; __instance.car.rb.WakeUp(); } } } [HarmonyPatch(typeof(sCarController), "Move")] public static class sCarController_Move_Patch { private static void Postfix(sCarController __instance) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) if (!PerfectTraction.Value || (Object)(object)__instance == (Object)null || (Object)(object)__instance.rb == (Object)null) { return; } try { float num = 2500f; Vector3 val = -Vector3.up * num * __instance.clampedDeltaTime; __instance.rb.AddForce(val, (ForceMode)0); if (__instance.Airbourne()) { Vector3 velocity = __instance.rb.velocity; if (velocity.y > 0f) { velocity.y *= 0.5f; __instance.rb.velocity = velocity; } } } catch { } } } [HarmonyPatch(typeof(sCameraController), "Awake")] public static class sCameraController_Awake_Patch { private static void Postfix(sCameraController __instance) { mainCamera = __instance.cam; if ((Object)(object)cameraController == (Object)null) { cameraController = __instance; } } } [HarmonyPatch(typeof(sCameraController), "Update")] public static class sCameraController_Update_Patch { private static bool Prefix() { if (freeCamEnabled) { return false; } return true; } } [HarmonyPatch(typeof(sCameraController), "LateUpdate")] public static class sCameraController_LateUpdate_Patch { private static bool Prefix() { if (freeCamEnabled) { return false; } return true; } } [HarmonyPatch(typeof(ScreenSystem), "Awake")] public static class ScreenSystem_Awake_Patch { private static void Postfix(ScreenSystem __instance) { Transform val = ((Component)__instance).transform.Find("Camera Persp/ScreenPivot/Screen"); if ((Object)(object)val != (Object)null) { screenMR = ((Component)val).GetComponent(); } } } [HarmonyPatch(typeof(sCarController), "Awake")] public static class sCarController_Awake_Patch { private static void Postfix(sCarController __instance) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) currentRes = default(Resolution); _cachedResWidth = -1; _cachedResHeight = -1; _cachedResRefreshRate = -1; _pixelRenderingInitialized = false; if (!Object.op_Implicit((Object)(object)rearViewMR)) { Transform val = ((Component)__instance).transform.Find("carInt/RearViewMirror"); if (Object.op_Implicit((Object)(object)val)) { rearViewMR = ((Component)val).GetComponent(); } val = ((Component)__instance).transform.Find("RearViewCam"); if (Object.op_Implicit((Object)(object)val)) { rearViewCamera = ((Component)val).GetComponent(); } } } } [HarmonyPatch(typeof(sHUD), "Update")] public static class sHUD_Update_Patch { private static void Postfix(sHUD __instance) { FixPixelRendering(); } } [HarmonyPatch(typeof(sHUD), "WorldToHUDPoint")] public static class sHUD_WorldToHUDPoint_Patch { private static void Postfix(sHUD __instance, ref Vector2 __result, Vector3 worldPoint) { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) try { if (!NoPixelRendering.Value || resWidthRatio == 0f || __result.x == -100f || (Object)(object)__instance.navigation == (Object)null || (Object)(object)__instance.navigation.car == (Object)null || (Object)(object)__instance.navigation.car.carCamera == (Object)null) { return; } __result = Vector2.op_Implicit(__instance.navigation.car.carCamera.WorldToScreenPoint(worldPoint)); __result = new Vector2(__result.x / resWidthRatio, __result.y / resHeightRatio); FieldInfo field = typeof(sHUD).GetField("R", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (!(field != null)) { return; } object value = field.GetValue(__instance); if (value != null) { PropertyInfo property = value.GetType().GetProperty("height"); if (property != null) { float num = (float)property.GetValue(value); __result.y = num - __result.y; } } } catch { } } } [HarmonyPatch(typeof(sCarController), "Update")] public static class sCarController_Update_Patch { private static bool Prefix() { if (freeCamEnabled && freeCamMovement) { return false; } return true; } } [HarmonyPatch(typeof(sCarController), "SetInput", new Type[] { typeof(Vector2) })] public static class sCarController_SetInput_Patch { private static bool Prefix() { if (freeCamEnabled && freeCamMovement) { return false; } return true; } } [HarmonyPatch(typeof(sCharacterController), "Update")] public static class sCharacterController_Update_Patch { private static bool Prefix() { if (freeCamEnabled && freeCamMovement) { return false; } return true; } } [HarmonyPatch(typeof(sItemManager), "Update")] public static class sItemManager_Update_Patch { private static bool Prefix() { if (freeCamEnabled && freeCamMovement) { return false; } return true; } } [HarmonyPatch(typeof(sItemManager), "DoInput")] public static class sItemManager_DoInput_Patch { private static bool Prefix() { if (freeCamEnabled && freeCamMovement) { return false; } return true; } } [HarmonyPatch(typeof(sCharacterRagdoll), "Ragdoll", new Type[] { typeof(Vector3) })] public static class sCharacterRagdoll_Ragdoll_Vector3_Patch { private static bool Prefix() { if ((PlayerInvincibility != null && PlayerInvincibility.Value) || (NoRagdoll != null && NoRagdoll.Value)) { return false; } return true; } } [HarmonyPatch(typeof(sCharacterRagdoll), "Ragdoll", new Type[] { })] public static class sCharacterRagdoll_Ragdoll_Patch { private static bool Prefix() { if ((PlayerInvincibility != null && PlayerInvincibility.Value) || (NoRagdoll != null && NoRagdoll.Value)) { return false; } return true; } } [HarmonyPatch(typeof(sCarController), "Awake")] public static class sCarController_Awake_Patch_2 { private static void Postfix(sCarController __instance) { try { if (!shadersEnabled) { return; } ApplyShadowsToCarRecursive(((Component)__instance).gameObject); if (__instance.wheels == null) { return; } Wheel[] wheels = __instance.wheels; foreach (Wheel val in wheels) { if (val != null) { EnhanceParticleSystem(val.dustParticles, enhance: true, 2.5f, 1.5f); EnhanceParticleSystem(val.skidParticles, enhance: true, 2f, 1.3f); EnhanceParticleSystem(val.snowSkidParticles, enhance: true, 2.5f, 1.5f); EnhanceParticleSystem(val.snowTireParticles, enhance: true, 2f, 1.3f); } } } catch { } } } [HarmonyPatch(typeof(sCameraController), "Update")] public static class sCameraController_Update_Patch_2 { private static void Postfix(sCameraController __instance) { try { if ((Object)(object)__instance.cam != (Object)null) { if (shadersEnabled) { __instance.cam.farClipPlane = 10000f; } else if (MaxRenderDistance != null && MaxRenderDistance.Value) { __instance.cam.farClipPlane = 50000f; } } } catch { } } } [HarmonyPatch(typeof(sDayNightCycle), "Update")] public static class sDayNightCycle_Update_Patch { private static void Postfix(sDayNightCycle __instance) { //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: 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_0270: 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_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) try { if (shadersEnabled) { return; } float time = __instance.time; float num = 1f - Mathf.Abs(time * 2f - 1f); float num2 = Mathf.Pow(num, 0.5f); float num3 = 1f - num2; if (FogColor != null && FogColor.Value > 0) { Color white = Color.white; switch (FogColor.Value) { case 1: ((Color)(ref white))..ctor(1f, 0.8f, 0.8f); break; case 2: ((Color)(ref white))..ctor(0.8f, 0.9f, 1f); break; case 3: ((Color)(ref white))..ctor(0.9f, 1f, 0.8f); break; case 4: ((Color)(ref white))..ctor(1f, 0.9f, 0.7f); break; case 5: ((Color)(ref white))..ctor(1f, 0.7f, 0.9f); break; case 6: ((Color)(ref white))..ctor(0.7f, 0.9f, 0.9f); break; case 7: ((Color)(ref white))..ctor(0.95f, 0.95f, 0.7f); break; case 8: ((Color)(ref white))..ctor(0.85f, 0.75f, 1f); break; case 9: ((Color)(ref white))..ctor(1f, 1f, 1f); break; case 10: ((Color)(ref white))..ctor(0.3f, 0.3f, 0.3f); break; } RenderSettings.fogColor = white; RenderSettings.ambientLight = white; } if (DaylightAmount != null && DaylightAmount.Value != 1f) { Light componentInChildren = ((Component)__instance).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { float num4 = __instance.dayLight.Evaluate(num); float num5 = Mathf.Min(num4, 1f - sWeatherSystem.instance.intensity); float num6 = Mathf.Lerp(1f, DaylightAmount.Value, num2); componentInChildren.intensity = num5 * num6; } } if (DarknessAmount != null && DarknessAmount.Value != 1f) { Color ambientLight = RenderSettings.ambientLight; float num7 = Mathf.Lerp(DarknessAmount.Value, 1f, num2); RenderSettings.ambientLight = ambientLight * num7; } } catch { } } } [HarmonyPatch(typeof(FireIntensity), "Update")] public static class FireIntensity_Update_Patch { private static void Postfix(FireIntensity __instance) { try { if (FireIntensityMultiplier != null && FireIntensityMultiplier.Value != 1f) { __instance.intensity *= FireIntensityMultiplier.Value; } } catch { } } } [HarmonyPatch(typeof(DaylightSensor), "Start")] public static class DaylightSensor_Start_Patch { private static void Postfix(DaylightSensor __instance) { try { if (NoStreetlights == null || !NoStreetlights.Value) { return; } if (__instance.nightTime != null) { GameObject[] nightTime = __instance.nightTime; foreach (GameObject val in nightTime) { if ((Object)(object)val != (Object)null) { val.SetActive(false); } } } if (__instance.dayTime == null) { return; } GameObject[] dayTime = __instance.dayTime; foreach (GameObject val2 in dayTime) { if ((Object)(object)val2 != (Object)null) { val2.SetActive(false); } } } catch { } } } [HarmonyPatch(typeof(DaylightSensor), "Update")] public static class DaylightSensor_Update_Patch { private static void Postfix(DaylightSensor __instance) { try { if (NoStreetlights == null || !NoStreetlights.Value) { return; } if (__instance.nightTime != null) { GameObject[] nightTime = __instance.nightTime; foreach (GameObject val in nightTime) { if ((Object)(object)val != (Object)null) { val.SetActive(false); } } } if (__instance.dayTime == null) { return; } GameObject[] dayTime = __instance.dayTime; foreach (GameObject val2 in dayTime) { if ((Object)(object)val2 != (Object)null) { val2.SetActive(false); } } } catch { } } } [HarmonyPatch(typeof(LightToggle), "FixedUpdate")] public static class LightToggle_FixedUpdate_Patch { private static void Postfix(LightToggle __instance) { try { if (NoStreetlights != null && NoStreetlights.Value && (Object)(object)__instance.toToggle != (Object)null) { __instance.toToggle.SetActive(false); } } catch { } } } [HarmonyPatch(typeof(sCosmeticAppearance), "Start")] public static class sCosmeticAppearance_Start_Patch { private static void Postfix(sCosmeticAppearance __instance) { try { sCarController componentInParent = ((Component)__instance).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null) { __instance.usePlayerEquiped = true; sCosmeticInfo val = Object.FindObjectOfType(); if ((Object)(object)val != (Object)null && !val.playerEquipedListeners.Contains(((Component)__instance).gameObject)) { val.playerEquipedListeners.Add(((Component)__instance).gameObject); } } } catch { } } } [HarmonyPatch(typeof(sCosmeticAppearance), "SetAppearance")] public static class sCosmeticAppearance_SetAppearance_Patch { private static void Postfix(sCosmeticAppearance __instance) { } } [HarmonyPatch(typeof(TunnelNode), "Start")] public static class TunnelNode_Start_Patch { private static void Postfix(TunnelNode __instance) { try { } catch { } _timeUserUntil = Time.unscaledTime + 2f; } } [HarmonyPatch(typeof(sHUD), "AddWarning")] public static class sHUD_AddWarning_Patch { private static bool Prefix() { if (NoWarnings != null && NoWarnings.Value) { return false; } return true; } } private const string MyGUID = "soup.tweaks.modmenu"; private const string PluginName = "EasyDeliveryMenu"; private const string VersionString = "6.9.6"; public static string SpeedKey = "Speed"; public static string GravityKey = "Gravity"; public static string VehicleInvincibilityKey = "Vehicle invincibility"; public static string ShowHUDKey = "Show HUD"; public static string InfiniteFuelKey = "Infinite fuel"; public static string SmoothDrivingKey = "Smooth driving"; public static string InstantResetKey = "Instant vehicle reset"; public static string SnowTiresKey = "Snow Tires"; public static string IceChainsKey = "Ice Chains"; public static string BumperBarKey = "Bumper Bar"; public static string AlwaysDuctTapeKey = "Always duct tape"; public static string PerfectTractionKey = "Perfect traction"; public static string BlowUpVehicleKey = "Blow up vehicle"; public static string ZeroGravityKey = "Zero vehicle gravity"; public static string UnlockAllKey = "Unlock all achievements"; public static string SnowyPeaksKey = "Enter snowy peaks"; public static string FishingTownKey = "Enter fishing town"; public static string DuctTapeKey = "Secure a package with duct tape"; public static string TeaKey = "Brew a cup of tea to stay warm"; public static string FishKey = "Cook a fish"; public static string RadioTowersKey = "Active every radio tower"; public static string RebootKey = "Reboot Ending"; public static string ShutdownKey = "Shutdown Ending"; public static string RestoreKey = "Restore Ending"; public static string SnowcatsKey = "Find all the snowcats"; public static string BirdsKey = "Feed the birds"; public static ConfigEntry SpeedMultiplier; public static ConfigEntry GravityMultiplier; public static ConfigEntry VehicleInvincibility; public static ConfigEntry ShowHUD; public static ConfigEntry InfiniteFuel; public static ConfigEntry SmoothDriving; public static ConfigEntry InstantReset; public static ConfigEntry SnowTiresToggle; public static ConfigEntry IceChainsToggle; public static ConfigEntry BumperBarToggle; public static ConfigEntry AlwaysDuctTape; public static ConfigEntry PerfectTraction; public static ConfigEntry BlowUpVehicle; public static ConfigEntry ZeroGravity; public static ConfigEntry UnlockAll; public static ConfigEntry SnowyPeaks; public static ConfigEntry FishingTown; public static ConfigEntry DuctTape; public static ConfigEntry Tea; public static ConfigEntry Fish; public static ConfigEntry RadioTowers; public static ConfigEntry Reboot; public static ConfigEntry Shutdown; public static ConfigEntry Restore; public static ConfigEntry Snowcats; public static ConfigEntry Birds; public static ConfigEntry FPSAmount; public static ConfigEntry Vsync; public static ConfigEntry ShowFPS; public static ConfigEntry FreeCam; public static ConfigEntry NoPixelRendering; public static ConfigEntry PlayerSpeed; public static ConfigEntry MoneyAmount; public static ConfigEntry PlayerInvincibility; public static ConfigEntry InfiniteEnergy; public static ConfigEntry NoFreezing; public static ConfigEntry NoRagdoll; public static ConfigEntry GiveItem1; public static ConfigEntry GiveItem2; public static ConfigEntry GiveItem3; public static ConfigEntry GiveItem4; public static ConfigEntry GiveItem5; public static ConfigEntry GiveItem6; public static ConfigEntry GiveItem7; public static ConfigEntry GiveItem8; public static ConfigEntry GiveItem9; public static ConfigEntry GiveItem10; public static ConfigEntry GiveItem11; public static ConfigEntry GiveItem12; public static ConfigEntry GiveItem13; public static ConfigEntry GiveItem14; public static ConfigEntry GiveItem15; public static ConfigEntry GiveItem16; public static ConfigEntry GiveItem17; public static ConfigEntry GiveItem18; public static ConfigEntry TeleportMT_EasyFlowers; public static ConfigEntry TeleportMT_Node57; public static ConfigEntry TeleportMT_Node48; public static ConfigEntry TeleportMT_Node56; public static ConfigEntry TeleportMT_Node55; public static ConfigEntry TeleportMT_EasyEats; public static ConfigEntry TeleportMT_Node47; public static ConfigEntry TeleportMT_Node54; public static ConfigEntry TeleportMT_Node5; public static ConfigEntry TeleportMT_EZBakery; public static ConfigEntry TeleportMT_Node59; public static ConfigEntry TeleportMT_Node60; public static ConfigEntry TeleportMT_Bar1; public static ConfigEntry TeleportMT_EasyDepot; public static ConfigEntry TeleportMT_Bar2; public static ConfigEntry TeleportMT_EZCafe; public static ConfigEntry TeleportMT_Node65; public static ConfigEntry TeleportMT_Node71; public static ConfigEntry TeleportMT_Node72; public static ConfigEntry TeleportMT_EasyPizza; public static ConfigEntry TeleportMT_Node74; public static ConfigEntry TeleportMT_PawnShop; public static ConfigEntry TeleportMT_EZAuto; public static ConfigEntry TeleportMT_EZMart; public static ConfigEntry TeleportMT_Node92; public static ConfigEntry TeleportMT_Node93; public static ConfigEntry TeleportFT_Node93; public static ConfigEntry TeleportFT_NodeDock; public static ConfigEntry TeleportFT_Node59; public static ConfigEntry TeleportFT_Node101; public static ConfigEntry TeleportFT_NodeDock2; public static ConfigEntry TeleportFT_Node11; public static ConfigEntry TeleportFT_NodeDock3_1; public static ConfigEntry TeleportFT_Node58; public static ConfigEntry TeleportFT_Node91; public static ConfigEntry TeleportFT_Node54; public static ConfigEntry TeleportFT_Node18; public static ConfigEntry TeleportFT_Node64; public static ConfigEntry TeleportFT_Node97; public static ConfigEntry TeleportFT_Node20; public static ConfigEntry TeleportFT_Node22; public static ConfigEntry TeleportFT_Node89; public static ConfigEntry TeleportFT_Node55; public static ConfigEntry TeleportFT_Node112; public static ConfigEntry TeleportFT_Node12; public static ConfigEntry TeleportFT_NodeDock3; public static ConfigEntry TeleportFT_NodeDock_1; public static ConfigEntry TeleportFT_Node14; public static ConfigEntry TeleportFT_NodeDock2_1; public static ConfigEntry TeleportFT_Node102; public static ConfigEntry TeleportFT_Node98; public static ConfigEntry TeleportFT_EasyFlowers; public static ConfigEntry TeleportFT_EasyEats; public static ConfigEntry TeleportFT_PawnShop; public static ConfigEntry TeleportFT_EZMart; public static ConfigEntry TeleportFT_Bar1; public static ConfigEntry TeleportFT_EasyDepot; public static ConfigEntry TeleportFT_Bar2; public static ConfigEntry TeleportFT_EZCafe; public static ConfigEntry TeleportFT_EasyPizza; public static ConfigEntry TeleportFT_EZAuto; public static ConfigEntry TeleportFT_EZBakery; public static ConfigEntry TeleportSP_Destnode5; public static ConfigEntry TeleportSP_Destnode1; public static ConfigEntry TeleportSP_Destnode3; public static ConfigEntry TeleportSP_Destnode2; public static ConfigEntry TeleportSP_Destnode4; public static ConfigEntry TeleportSP_Destnode6; public static ConfigEntry TeleportSP_Destnode; public static ConfigEntry TeleportSP_Destnode10; public static ConfigEntry TeleportSP_Destnode8; public static ConfigEntry TeleportSP_Destnode7; public static ConfigEntry TeleportSP_Destnode9; public static ConfigEntry TeleportSP_EasyEats; public static ConfigEntry TeleportSP_EZBakery; public static ConfigEntry TeleportSP_EasyPizza; public static ConfigEntry TeleportSP_EasyFlowers; public static ConfigEntry TeleportSP_Bar1; public static ConfigEntry TeleportSP_EasyDepot; public static ConfigEntry TeleportSP_EZAuto; public static ConfigEntry TeleportSP_EZCafe; public static ConfigEntry TeleportSP_Bar2; public static ConfigEntry TeleportSP_EZMart; public static ConfigEntry TeleportSP_PawnShop; public static ConfigEntry ShowLocation; public static ConfigEntry ShowAllExes; public static ConfigEntry DraggableIcons; public static ConfigEntry RandomWeather; public static ConfigEntry WeatherIntensity; public static ConfigEntry WeatherCycle; public static ConfigEntry FreezeWeather; public static ConfigEntry SpeedUpWeather; public static ConfigEntry NoFog; public static ConfigEntry FreezeTime; public static ConfigEntry ReverseTime; public static ConfigEntry ChangeTime; public static ConfigEntry SpeedUpTime; public static ConfigEntry SyncTime; private static readonly Harmony Harmony = new Harmony("soup.tweaks.modmenu"); private static bool vehicleInvincible; private static bool _initialShaderCheckDone = false; private static bool zeroGravity; private static bool instantReset; private static bool snowInit; private static bool bumperInit; private static bool hudInit; private static bool weatherInit; private static RotationRounding truckRR; private static string currentSaveFile = ""; private static bool lastHadTires = false; private static bool lastHadChains = false; private static bool lastHadBumper = false; private static bool _manualWeatherControl = false; private static float _lastSetWeatherIntensity = -1f; private static float _lastSetWeatherCycle = -1f; private static float _manualWeatherIntensity = 0.5f; private static float _manualWeatherTarget = 0.5f; private static bool _lastRandomWeather = true; private static float baseMaxSpeed = -1f; private static float baseMass = -1f; private static Dictionary baseMaxFrictionForce = new Dictionary(); private static float baseDownForce = -1f; private static float cacheRefreshTimer = 0f; private const float CACHE_REFRESH_INTERVAL = 1f; private static sCarController cachedCar; private static sHUD cachedHUD; private static CarDamage cachedDamage; private static TruckUpgrades cachedUpgrades; private static BumperBar cachedBumper; private static SnowTires cachedSnow; private static sCharacterController cachedPlayer; private static sCharacterRagdoll cachedRagdoll; private static sItemManager cachedItemManager; private static DesktopDotExe cachedDesktop; private static jobBoard cachedJobBoard; private static sPathFinder cachedNavigation; private static sWeatherSystem cachedWeatherSystem; private static sDayNightCycle cachedDayNightCycle; private static RenderTexture newRT; private static RenderTexture defaultRT; private static RenderTexture newRearViewRT; private static RenderTexture defaultRearViewRT; private static MeshRenderer screenMR; private static MeshRenderer rearViewMR; private static Camera mainCamera; private static Camera rearViewCamera; private static float resWidthRatio; private static float resHeightRatio; private static Resolution currentRes; private static bool _envInitialized; private static bool _suppressEnvWrites; private static float _baseWeatherSpeed = -1f; private static float _baseDayDuration = -1f; private static float _weatherUserUntil; private static float _timeUserUntil; private static float _displayedFPS = 60f; private static float _fpsUpdateTimer = 0f; private const float FPS_UPDATE_INTERVAL = 0.5f; private static bool _teleportFreezeTime = false; private static float _teleportFreezeUntil = 0f; private static sDayNightCycle _lastDayNightCycle = null; private static bool _timeInitialized = false; private static int _lastSpeedUpTime = 0; private static bool _lastReverseTime = false; private static bool freeCamEnabled = false; private static bool freeCamMovement = false; private static Vector3 freeCamRotation = Vector3.zero; private static Vector3 freeCamPosition = Vector3.zero; private static float freeCamSpeed = 10f; private static float freeCamMouseSensitivity = 2f; private static Vector3 originalCameraPosition; private static Quaternion originalCameraRotation; private static Transform originalCameraParent; private static bool wasFreeCamActive = false; private static sCameraController cameraController; private static Transform audioListenerTransform; private static Vector3 _origListenerLocalPos; private static Quaternion _origListenerLocalRot; private static bool _listenerCaptured = false; private static List _freeCamManagedSources = new List(); private static Dictionary _origSourceVolumes = new Dictionary(); private static Dictionary _origSourceSpatialBlend = new Dictionary(); private static float basePlayerAcceleration = -1f; private static float basePlayerDeceleration = -1f; private static float baseMoney = -1f; private static bool moneyInitialized = false; private static Dictionary originalFileVisibility = new Dictionary(); private static bool fileVisibilityInitialized = false; private static int _cachedFPSTarget = -999; private static int _cachedVsyncCount = -1; private static bool _fpsSettingsApplied = false; private static Queue _deltaTimeQueue = new Queue(); private static float _smoothDeltaTime = 0.016f; private const int DELTA_TIME_SAMPLES = 10; private static float _originalTimeScale = 1f; private static float _originalFixedDeltaTime = 0.02f; private static int _cachedResWidth = -1; private static int _cachedResHeight = -1; private static int _cachedResRefreshRate = -1; private static bool _lastNoPixelRendering = false; private static bool _pixelRenderingInitialized = false; private static float _weatherIntensityUserUntil; private static bool _randomWeatherInitialized = false; private static DelayedTeleport _pendingTeleport = null; public static ConfigEntry VehicleColor; public static ConfigEntry BobbleheadIndex; public static ConfigEntry HeadCosmetic; public static ConfigEntry BodyCosmetic; public static ConfigEntry FireSpreadSpeed; public static ConfigEntry FireIntensityMultiplier; public static ConfigEntry FireDamageMultiplier; public static ConfigEntry DaylightAmount; public static ConfigEntry DarknessAmount; public static ConfigEntry NoIceCrack; public static ConfigEntry NoRoadSigns; public static ConfigEntry NoWindSounds; public static ConfigEntry NoStreetlights; public static ConfigEntry FogColor; public static ConfigEntry RainbowMode; public static ConfigEntry Shaders; public static ConfigEntry MaxRenderDistance; public static ConfigEntry NoWarnings; private static int currentVehicleColor = -1; private static int currentHeadCosmetic = -1; private static int currentBodyCosmetic = -1; private static int currentBobblehead = -1; private static float baseFireSpreadRate = -1f; private static float baseFireDamageRate = -1f; private static sCosmeticInfo cosmeticInfo; private static bool cosmeticsInitialized = false; private static bool rainbowModeActive = false; private static float rainbowTimer = 0f; private static int rainbowColorIndex = 0; private const float RAINBOW_INTERVAL = 0.2f; private static FireSpread[] cachedFireSpreads; private static FireIntensity[] cachedFireIntensities; private static FireDamage[] cachedFireDamages; private static IceCrack[] cachedIceCracks; private static RoadSign[] cachedRoadSigns; private static sAmbiance cachedAmbiance; private static float environmentCacheTimer = 0f; private const float ENVIRONMENT_CACHE_INTERVAL = 2f; private static int lastFogColor = -1; private static bool lastNoIceCrack = false; private static bool lastNoRoadSigns = false; private static bool lastNoWindSounds = false; private static float lastFireSpreadSpeed = -1f; private static float lastFireIntensity = -1f; private static float lastFireDamage = -1f; private static Dictionary baseFireSpreadRates = new Dictionary(); private static Dictionary baseFireDamageRates = new Dictionary(); private static bool shadersEnabled = false; private static Material skyboxMaterial; private static Material originalSkybox; private static Color originalFogColor; private static Color originalAmbientLight; private static float shaderTimer = 0f; private static float originalShadowDistance; private static ShadowProjection originalShadowProjection; private static float originalShadowNearPlaneOffset; private static float originalReflectionIntensity; private static float originalAmbientIntensity; private static ReflectionProbe[] reflectionProbes; private static Light[] sceneLights; private static Dictionary originalLightIntensities = new Dictionary(); private static Dictionary originalLightColors = new Dictionary(); private static Dictionary originalShadowCastingModes = new Dictionary(); private static Dictionary originalReceiveShadows = new Dictionary(); private static float originalFogDensity; private static bool originalFogEnabled; private static FogMode originalFogMode; private static AmbientMode originalAmbientMode; private static Color originalAmbientSkyColor; private static Color originalAmbientEquatorColor; private static Color originalAmbientGroundColor; private static GameObject[] nightStarParticles; private static int nightStarCount = 0; private static float sparkleTimer = 0f; private static Random sparkleRandom = new Random(); private static bool starsCreated = false; private static Renderer[] cachedAllRenderers; private static float rendererCacheTimer = 0f; private const float RENDERER_CACHE_INTERVAL = 5f; private static float shadowUpdateTimer = 0f; private const float SHADOW_UPDATE_INTERVAL = 1f; private static Dictionary originalParticleRates = new Dictionary(); private static Dictionary originalParticleLifetimes = new Dictionary(); private static MaterialPropertyBlock starPropertyBlock; private static int colorPropertyID = -1; private static int tintColorPropertyID = -1; private static float[] starBrightnesses; private static Color[] starBaseColors; private static float starUpdateTimer = 0f; private const float STAR_UPDATE_INTERVAL = 0.1f; private static GameObject[] starParticles; private static int starCount = 0; private void RefreshObjectCache() { cacheRefreshTimer += Time.deltaTime; if (!(cacheRefreshTimer < 1f)) { cacheRefreshTimer = 0f; if ((Object)(object)cachedCar == (Object)null) { cachedCar = Object.FindObjectOfType(); } if ((Object)(object)cachedHUD == (Object)null) { cachedHUD = Object.FindObjectOfType(); } if ((Object)(object)cachedDamage == (Object)null) { cachedDamage = Object.FindObjectOfType(); } if ((Object)(object)cachedUpgrades == (Object)null) { cachedUpgrades = Object.FindObjectOfType(); } if ((Object)(object)cachedBumper == (Object)null) { cachedBumper = Object.FindObjectOfType(); } if ((Object)(object)cachedSnow == (Object)null) { cachedSnow = Object.FindObjectOfType(); } if ((Object)(object)cachedPlayer == (Object)null) { cachedPlayer = Object.FindObjectOfType(); } if ((Object)(object)cachedRagdoll == (Object)null) { cachedRagdoll = Object.FindObjectOfType(); } if ((Object)(object)cachedItemManager == (Object)null) { cachedItemManager = Object.FindObjectOfType(); } if ((Object)(object)cachedDesktop == (Object)null) { cachedDesktop = Object.FindObjectOfType(); } if ((Object)(object)cachedJobBoard == (Object)null) { cachedJobBoard = Object.FindObjectOfType(); } if ((Object)(object)cachedNavigation == (Object)null) { cachedNavigation = Object.FindObjectOfType(); } if ((Object)(object)cachedWeatherSystem == (Object)null) { cachedWeatherSystem = Object.FindObjectOfType(); } if ((Object)(object)cachedDayNightCycle == (Object)null) { cachedDayNightCycle = Object.FindObjectOfType(); } } } private void Awake() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Expected O, but got Unknown //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Expected O, but got Unknown //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Expected O, but got Unknown //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Expected O, but got Unknown //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Expected O, but got Unknown //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Expected O, but got Unknown //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Expected O, but got Unknown //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Expected O, but got Unknown //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Expected O, but got Unknown //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03fe: Expected O, but got Unknown //IL_044a: Unknown result type (might be due to invalid IL or missing references) //IL_0454: Expected O, but got Unknown //IL_048e: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Expected O, but got Unknown //IL_04d2: Unknown result type (might be due to invalid IL or missing references) //IL_04dc: Expected O, but got Unknown //IL_0516: Unknown result type (might be due to invalid IL or missing references) //IL_0520: Expected O, but got Unknown //IL_055a: Unknown result type (might be due to invalid IL or missing references) //IL_0564: Expected O, but got Unknown //IL_059e: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Expected O, but got Unknown //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_05ec: Expected O, but got Unknown //IL_0626: Unknown result type (might be due to invalid IL or missing references) //IL_0630: Expected O, but got Unknown //IL_066a: Unknown result type (might be due to invalid IL or missing references) //IL_0674: Expected O, but got Unknown //IL_06ae: Unknown result type (might be due to invalid IL or missing references) //IL_06b8: Expected O, but got Unknown //IL_06f2: Unknown result type (might be due to invalid IL or missing references) //IL_06fc: Expected O, but got Unknown //IL_0736: Unknown result type (might be due to invalid IL or missing references) //IL_0740: Expected O, but got Unknown //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Expected O, but got Unknown //IL_07be: Unknown result type (might be due to invalid IL or missing references) //IL_07c8: Expected O, but got Unknown //IL_0802: Unknown result type (might be due to invalid IL or missing references) //IL_080c: Expected O, but got Unknown //IL_0846: Unknown result type (might be due to invalid IL or missing references) //IL_0850: Expected O, but got Unknown //IL_088a: Unknown result type (might be due to invalid IL or missing references) //IL_0894: Expected O, but got Unknown //IL_08ce: Unknown result type (might be due to invalid IL or missing references) //IL_08d8: Expected O, but got Unknown //IL_0912: Unknown result type (might be due to invalid IL or missing references) //IL_091c: Expected O, but got Unknown //IL_0956: Unknown result type (might be due to invalid IL or missing references) //IL_0960: Expected O, but got Unknown //IL_099a: Unknown result type (might be due to invalid IL or missing references) //IL_09a4: Expected O, but got Unknown //IL_09de: Unknown result type (might be due to invalid IL or missing references) //IL_09e8: Expected O, but got Unknown //IL_0a22: Unknown result type (might be due to invalid IL or missing references) //IL_0a2c: Expected O, but got Unknown //IL_0a66: Unknown result type (might be due to invalid IL or missing references) //IL_0a70: Expected O, but got Unknown //IL_0aaa: Unknown result type (might be due to invalid IL or missing references) //IL_0ab4: Expected O, but got Unknown //IL_0aee: Unknown result type (might be due to invalid IL or missing references) //IL_0af8: Expected O, but got Unknown //IL_0b32: Unknown result type (might be due to invalid IL or missing references) //IL_0b3c: Expected O, but got Unknown //IL_0b76: Unknown result type (might be due to invalid IL or missing references) //IL_0b80: Expected O, but got Unknown //IL_0bba: Unknown result type (might be due to invalid IL or missing references) //IL_0bc4: Expected O, but got Unknown //IL_0bfe: Unknown result type (might be due to invalid IL or missing references) //IL_0c08: Expected O, but got Unknown //IL_0c42: Unknown result type (might be due to invalid IL or missing references) //IL_0c4c: Expected O, but got Unknown //IL_0c86: Unknown result type (might be due to invalid IL or missing references) //IL_0c90: Expected O, but got Unknown //IL_0cca: Unknown result type (might be due to invalid IL or missing references) //IL_0cd4: Expected O, but got Unknown //IL_0d0e: Unknown result type (might be due to invalid IL or missing references) //IL_0d18: Expected O, but got Unknown //IL_0d52: Unknown result type (might be due to invalid IL or missing references) //IL_0d5c: Expected O, but got Unknown //IL_0d96: Unknown result type (might be due to invalid IL or missing references) //IL_0da0: Expected O, but got Unknown //IL_0dda: Unknown result type (might be due to invalid IL or missing references) //IL_0de4: Expected O, but got Unknown //IL_0e1e: Unknown result type (might be due to invalid IL or missing references) //IL_0e28: Expected O, but got Unknown //IL_0e62: Unknown result type (might be due to invalid IL or missing references) //IL_0e6c: Expected O, but got Unknown //IL_0ea6: Unknown result type (might be due to invalid IL or missing references) //IL_0eb0: Expected O, but got Unknown //IL_0eea: Unknown result type (might be due to invalid IL or missing references) //IL_0ef4: Expected O, but got Unknown //IL_0f2e: Unknown result type (might be due to invalid IL or missing references) //IL_0f38: Expected O, but got Unknown //IL_0f72: Unknown result type (might be due to invalid IL or missing references) //IL_0f7c: Expected O, but got Unknown //IL_0fb6: Unknown result type (might be due to invalid IL or missing references) //IL_0fc0: Expected O, but got Unknown //IL_0ffa: Unknown result type (might be due to invalid IL or missing references) //IL_1004: Expected O, but got Unknown //IL_103e: Unknown result type (might be due to invalid IL or missing references) //IL_1048: Expected O, but got Unknown //IL_1082: Unknown result type (might be due to invalid IL or missing references) //IL_108c: Expected O, but got Unknown //IL_10c6: Unknown result type (might be due to invalid IL or missing references) //IL_10d0: Expected O, but got Unknown //IL_110a: Unknown result type (might be due to invalid IL or missing references) //IL_1114: Expected O, but got Unknown //IL_114e: Unknown result type (might be due to invalid IL or missing references) //IL_1158: Expected O, but got Unknown //IL_1192: Unknown result type (might be due to invalid IL or missing references) //IL_119c: Expected O, but got Unknown //IL_11d6: Unknown result type (might be due to invalid IL or missing references) //IL_11e0: Expected O, but got Unknown //IL_121a: Unknown result type (might be due to invalid IL or missing references) //IL_1224: Expected O, but got Unknown //IL_125e: Unknown result type (might be due to invalid IL or missing references) //IL_1268: Expected O, but got Unknown //IL_12a2: Unknown result type (might be due to invalid IL or missing references) //IL_12ac: Expected O, but got Unknown //IL_12e6: Unknown result type (might be due to invalid IL or missing references) //IL_12f0: Expected O, but got Unknown //IL_132a: Unknown result type (might be due to invalid IL or missing references) //IL_1334: Expected O, but got Unknown //IL_136e: Unknown result type (might be due to invalid IL or missing references) //IL_1378: Expected O, but got Unknown //IL_13b2: Unknown result type (might be due to invalid IL or missing references) //IL_13bc: Expected O, but got Unknown //IL_13f6: Unknown result type (might be due to invalid IL or missing references) //IL_1400: Expected O, but got Unknown //IL_143a: Unknown result type (might be due to invalid IL or missing references) //IL_1444: Expected O, but got Unknown //IL_147e: Unknown result type (might be due to invalid IL or missing references) //IL_1488: Expected O, but got Unknown //IL_14c2: Unknown result type (might be due to invalid IL or missing references) //IL_14cc: Expected O, but got Unknown //IL_1506: Unknown result type (might be due to invalid IL or missing references) //IL_1510: Expected O, but got Unknown //IL_154a: Unknown result type (might be due to invalid IL or missing references) //IL_1554: Expected O, but got Unknown //IL_158e: Unknown result type (might be due to invalid IL or missing references) //IL_1598: Expected O, but got Unknown //IL_15d9: Unknown result type (might be due to invalid IL or missing references) //IL_15e3: Expected O, but got Unknown //IL_1624: Unknown result type (might be due to invalid IL or missing references) //IL_162e: Expected O, but got Unknown //IL_1668: Unknown result type (might be due to invalid IL or missing references) //IL_1672: Expected O, but got Unknown //IL_16b4: Unknown result type (might be due to invalid IL or missing references) //IL_16be: Expected O, but got Unknown //IL_16f8: Unknown result type (might be due to invalid IL or missing references) //IL_1702: Expected O, but got Unknown //IL_173c: Unknown result type (might be due to invalid IL or missing references) //IL_1746: Expected O, but got Unknown //IL_1792: Unknown result type (might be due to invalid IL or missing references) //IL_179c: Expected O, but got Unknown //IL_17de: Unknown result type (might be due to invalid IL or missing references) //IL_17e8: Expected O, but got Unknown //IL_1822: Unknown result type (might be due to invalid IL or missing references) //IL_182c: Expected O, but got Unknown //IL_1866: Unknown result type (might be due to invalid IL or missing references) //IL_1870: Expected O, but got Unknown //IL_18b1: Unknown result type (might be due to invalid IL or missing references) //IL_18bb: Expected O, but got Unknown //IL_18f5: Unknown result type (might be due to invalid IL or missing references) //IL_18ff: Expected O, but got Unknown //IL_1939: Unknown result type (might be due to invalid IL or missing references) //IL_1943: Expected O, but got Unknown //IL_197d: Unknown result type (might be due to invalid IL or missing references) //IL_1987: Expected O, but got Unknown //IL_19c1: Unknown result type (might be due to invalid IL or missing references) //IL_19cb: Expected O, but got Unknown //IL_1a05: Unknown result type (might be due to invalid IL or missing references) //IL_1a0f: Expected O, but got Unknown //IL_1a46: Unknown result type (might be due to invalid IL or missing references) //IL_1a50: Expected O, but got Unknown //IL_1a87: Unknown result type (might be due to invalid IL or missing references) //IL_1a91: Expected O, but got Unknown //IL_1ac8: Unknown result type (might be due to invalid IL or missing references) //IL_1ad2: Expected O, but got Unknown //IL_1b09: Unknown result type (might be due to invalid IL or missing references) //IL_1b13: Expected O, but got Unknown //IL_1b4a: Unknown result type (might be due to invalid IL or missing references) //IL_1b54: Expected O, but got Unknown //IL_1b8b: Unknown result type (might be due to invalid IL or missing references) //IL_1b95: Expected O, but got Unknown //IL_1bcc: Unknown result type (might be due to invalid IL or missing references) //IL_1bd6: Expected O, but got Unknown //IL_1c0d: Unknown result type (might be due to invalid IL or missing references) //IL_1c17: Expected O, but got Unknown //IL_1c4e: Unknown result type (might be due to invalid IL or missing references) //IL_1c58: Expected O, but got Unknown //IL_1c8f: Unknown result type (might be due to invalid IL or missing references) //IL_1c99: Expected O, but got Unknown //IL_1cd0: Unknown result type (might be due to invalid IL or missing references) //IL_1cda: Expected O, but got Unknown //IL_1d11: Unknown result type (might be due to invalid IL or missing references) //IL_1d1b: Expected O, but got Unknown //IL_1d51: Unknown result type (might be due to invalid IL or missing references) //IL_1d5b: Expected O, but got Unknown //IL_1d91: Unknown result type (might be due to invalid IL or missing references) //IL_1d9b: Expected O, but got Unknown //IL_1dd1: Unknown result type (might be due to invalid IL or missing references) //IL_1ddb: Expected O, but got Unknown _originalTimeScale = Time.timeScale; _originalFixedDeltaTime = Time.fixedDeltaTime; SpeedMultiplier = ((BaseUnityPlugin)this).Config.Bind("Vehicle", SpeedKey, 1f, new ConfigDescription("Vehicle speed multiplier", (AcceptableValueBase)(object)new AcceptableValueRange(0.1f, 10f), new object[1] { new ConfigurationManagerAttributes { Order = 260 } })); GravityMultiplier = ((BaseUnityPlugin)this).Config.Bind("Vehicle", GravityKey, 1f, new ConfigDescription("Vehicle gravity multiplier", (AcceptableValueBase)(object)new AcceptableValueRange(0.1f, 10f), new object[1] { new ConfigurationManagerAttributes { Order = 250 } })); VehicleInvincibility = ((BaseUnityPlugin)this).Config.Bind("Vehicle", VehicleInvincibilityKey, false, new ConfigDescription("Toggle vehicle invincibility", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 230 } })); InfiniteFuel = ((BaseUnityPlugin)this).Config.Bind("Vehicle", InfiniteFuelKey, false, new ConfigDescription("Never run out of fuel", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 229 } })); SmoothDriving = ((BaseUnityPlugin)this).Config.Bind("Vehicle", SmoothDrivingKey, false, new ConfigDescription("Toggle off retro style driving", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 228 } })); InstantReset = ((BaseUnityPlugin)this).Config.Bind("Vehicle", InstantResetKey, false, new ConfigDescription("Toggle instant vehicle reset", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 240 } })); SnowTiresToggle = ((BaseUnityPlugin)this).Config.Bind("Vehicle", SnowTiresKey, false, new ConfigDescription("Toggle snow tires", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 210 } })); IceChainsToggle = ((BaseUnityPlugin)this).Config.Bind("Vehicle", IceChainsKey, false, new ConfigDescription("Toggle ice chains", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 205 } })); BumperBarToggle = ((BaseUnityPlugin)this).Config.Bind("Vehicle", BumperBarKey, false, new ConfigDescription("Toggle bumper bar", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 200 } })); AlwaysDuctTape = ((BaseUnityPlugin)this).Config.Bind("Vehicle", AlwaysDuctTapeKey, false, new ConfigDescription("Always use duct tape on delivery packages. WARNING! Be sure to toggle this option ON only after putting the packages in the back of the vehicle", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 195 } })); PerfectTraction = ((BaseUnityPlugin)this).Config.Bind("Vehicle", PerfectTractionKey, false, new ConfigDescription("Max wheel traction (kinda buggy)", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 194 } })); BlowUpVehicle = ((BaseUnityPlugin)this).Config.Bind("Vehicle", BlowUpVehicleKey, false, new ConfigDescription("Blow up the vehicle", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 190 } })); ZeroGravity = ((BaseUnityPlugin)this).Config.Bind("Vehicle", ZeroGravityKey, false, new ConfigDescription("Toggle zero vehicle gravity", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 180 } })); PlayerSpeed = ((BaseUnityPlugin)this).Config.Bind("Player", "Speed", 1f, new ConfigDescription("Player speed multiplier", (AcceptableValueBase)(object)new AcceptableValueRange(0.1f, 10f), new object[1] { new ConfigurationManagerAttributes { Order = 169 } })); MoneyAmount = ((BaseUnityPlugin)this).Config.Bind("Player", "Money amount", 0f, new ConfigDescription("Amount of money (0 = Default)", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 100f), new object[1] { new ConfigurationManagerAttributes { Order = 168 } })); PlayerInvincibility = ((BaseUnityPlugin)this).Config.Bind("Player", "Player invincibility", false, new ConfigDescription("Toggle player invincibility", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 167 } })); InfiniteEnergy = ((BaseUnityPlugin)this).Config.Bind("Player", "Infinite energy", false, new ConfigDescription("Toggle infinite energy", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 166 } })); NoFreezing = ((BaseUnityPlugin)this).Config.Bind("Player", "No freezing", false, new ConfigDescription("Toggle no freezing", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 165 } })); NoRagdoll = ((BaseUnityPlugin)this).Config.Bind("Player", "No ragdoll", false, new ConfigDescription("Toggle ragdoll after falling from large heights", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 164 } })); GiveItem1 = ((BaseUnityPlugin)this).Config.Bind("Items", "Energy Drink", false, new ConfigDescription("Give 1 energy drink", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 160 } })); GiveItem2 = ((BaseUnityPlugin)this).Config.Bind("Items", "Empty Can", false, new ConfigDescription("Give 1 empty can", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 159 } })); GiveItem3 = ((BaseUnityPlugin)this).Config.Bind("Items", "Lantern", false, new ConfigDescription("Give 1 lantern", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 158 } })); GiveItem4 = ((BaseUnityPlugin)this).Config.Bind("Items", "Lighter", false, new ConfigDescription("Give 1 lighter", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 157 } })); GiveItem5 = ((BaseUnityPlugin)this).Config.Bind("Items", "Firewood", false, new ConfigDescription("Give 1 firewood", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 156 } })); GiveItem6 = ((BaseUnityPlugin)this).Config.Bind("Items", "Shovel", false, new ConfigDescription("Give 1 shovel", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 155 } })); GiveItem7 = ((BaseUnityPlugin)this).Config.Bind("Items", "Bird Seed", false, new ConfigDescription("Give 1 bird seed", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 154 } })); GiveItem8 = ((BaseUnityPlugin)this).Config.Bind("Items", "Cooking Pot", false, new ConfigDescription("Give 1 cooking pot", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 153 } })); GiveItem9 = ((BaseUnityPlugin)this).Config.Bind("Items", "Coffee", false, new ConfigDescription("Give 1 coffee", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 152 } })); GiveItem10 = ((BaseUnityPlugin)this).Config.Bind("Items", "Coffee Powder", false, new ConfigDescription("Give 1 coffee powder", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 151 } })); GiveItem11 = ((BaseUnityPlugin)this).Config.Bind("Items", "Tea", false, new ConfigDescription("Give 1 tea", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 150 } })); GiveItem12 = ((BaseUnityPlugin)this).Config.Bind("Items", "Tea Bags", false, new ConfigDescription("Give 1 tea bags", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 149 } })); GiveItem13 = ((BaseUnityPlugin)this).Config.Bind("Items", "Fish", false, new ConfigDescription("Give 1 fish", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 148 } })); GiveItem14 = ((BaseUnityPlugin)this).Config.Bind("Items", "Fishing Rod", false, new ConfigDescription("Give 1 fishing rod", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 147 } })); GiveItem15 = ((BaseUnityPlugin)this).Config.Bind("Items", "Fish Soup", false, new ConfigDescription("Give 1 fish soup", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 146 } })); GiveItem16 = ((BaseUnityPlugin)this).Config.Bind("Items", "Duct Tape", false, new ConfigDescription("Give 1 duct tape", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 145 } })); GiveItem17 = ((BaseUnityPlugin)this).Config.Bind("Items", "Recovery Disc", false, new ConfigDescription("Give 1 recovery disc", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 144 } })); GiveItem18 = ((BaseUnityPlugin)this).Config.Bind("Items", "Handheld Radio", false, new ConfigDescription("Give 1 handheld radio", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 143 } })); TeleportMT_EasyFlowers = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Mountain Town)", "Easy Flowers in Upton", false, new ConfigDescription("Teleport to Easy Flowers", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1260 } })); TeleportMT_EasyEats = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Mountain Town)", "Easy Eats in Upton", false, new ConfigDescription("Teleport to Easy Eats in Upton", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1259 } })); TeleportMT_EZBakery = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Mountain Town)", "EZ Bakery in Weston", false, new ConfigDescription("Teleport to EZ Bakery", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1258 } })); TeleportMT_EasyDepot = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Mountain Town)", "Easy Depot in Weston & Tunnel to Factory", false, new ConfigDescription("Teleport to Easy Depot/Factory", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1257 } })); TeleportMT_EZCafe = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Mountain Town)", "EZ Cafe in Weston", false, new ConfigDescription("Teleport to EZ Cafe", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1256 } })); TeleportMT_EasyPizza = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Mountain Town)", "Easy Pizza in Easton", false, new ConfigDescription("Teleport to Easy Pizza", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1255 } })); TeleportMT_PawnShop = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Mountain Town)", "Pawn Shop in Easton & Tunnel to Fishing Town", false, new ConfigDescription("Teleport to Pawn Shop", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1254 } })); TeleportMT_EZAuto = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Mountain Town)", "EZ Auto in Easton", false, new ConfigDescription("Teleport to EZ Auto", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1253 } })); TeleportMT_EZMart = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Mountain Town)", "EZ Mart in Easton", false, new ConfigDescription("Teleport to EZ Mart", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1252 } })); TeleportMT_Node93 = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Mountain Town)", "Tunnel to Snowy Peaks", false, new ConfigDescription("Teleport to Tunnel to Snowy Peaks", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1251 } })); TeleportSP_Destnode5 = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Snowy Peaks)", "Cabin in Lopton 1", false, new ConfigDescription("Teleport to Cabin", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1360 } })); TeleportSP_Destnode1 = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Snowy Peaks)", "Cabin in Lopton 2", false, new ConfigDescription("Teleport to Cabin", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1359 } })); TeleportSP_Destnode3 = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Snowy Peaks)", "Cabin in Lopton 3", false, new ConfigDescription("Teleport to Cabin", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1358 } })); TeleportSP_Destnode4 = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Snowy Peaks)", "Cabin in Lopton 4", false, new ConfigDescription("Teleport to Cabin", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1357 } })); TeleportSP_Destnode6 = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Snowy Peaks)", "Cabin in Lopton 5", false, new ConfigDescription("Teleport to Cabin", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1356 } })); TeleportSP_Destnode8 = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Snowy Peaks)", "Cabin in Lopton 6", false, new ConfigDescription("Teleport to Cabin", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1355 } })); TeleportSP_Destnode7 = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Snowy Peaks)", "Cabin in Lopton 7", false, new ConfigDescription("Teleport to Cabin", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1354 } })); TeleportSP_EZBakery = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Snowy Peaks)", "EZ Bakery in Lopton", false, new ConfigDescription("Teleport to EZ Bakery", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1353 } })); TeleportSP_EasyPizza = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Snowy Peaks)", "Easy Pizza in Lopton", false, new ConfigDescription("Teleport to Easy Pizza", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1352 } })); TeleportSP_EasyDepot = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Snowy Peaks)", "Easy Depot in Lopton", false, new ConfigDescription("Teleport to Easy Depot", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1351 } })); TeleportSP_EZCafe = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Snowy Peaks)", "EZ Cafe in Lopton", false, new ConfigDescription("Teleport to EZ Cafe", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1350 } })); TeleportSP_Destnode10 = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Snowy Peaks)", "Cabin in Munton 1", false, new ConfigDescription("Teleport to Cabin", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1349 } })); TeleportSP_Destnode9 = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Snowy Peaks)", "MKs Cabin & Tunnel to Mountain Town", false, new ConfigDescription("Teleport to MK/Mountain Town", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1348 } })); TeleportSP_EasyEats = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Snowy Peaks)", "Easy Eats in Winton", false, new ConfigDescription("Teleport to Easy Eats", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1347 } })); TeleportSP_EasyFlowers = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Snowy Peaks)", "Easy Flowers in Winton", false, new ConfigDescription("Teleport to Easy Flowers", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1346 } })); TeleportSP_EZAuto = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Snowy Peaks)", "EZ Auto in Munton", false, new ConfigDescription("Teleport to EZ Auto", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1345 } })); TeleportSP_EZMart = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Snowy Peaks)", "EZ Mart in Munton", false, new ConfigDescription("Teleport to EZ Mart", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1344 } })); TeleportSP_PawnShop = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Snowy Peaks)", "Pawn Shop in Munton", false, new ConfigDescription("Teleport to Pawn Shop", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1343 } })); TeleportFT_NodeDock = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Fishing Town)", "Smalton Docks 1", false, new ConfigDescription("Teleport to Docks 1", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1459 } })); TeleportFT_NodeDock2 = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Fishing Town)", "Smalton Docks 2", false, new ConfigDescription("Teleport to Docks 2", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1458 } })); TeleportFT_NodeDock3_1 = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Fishing Town)", "Smalton Docks 3", false, new ConfigDescription("Teleport to Docks 3", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1457 } })); TeleportFT_EasyFlowers = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Fishing Town)", "Easy Flowers in Smalton", false, new ConfigDescription("Teleport to Easy Flowers", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1456 } })); TeleportFT_EasyEats = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Fishing Town)", "Easy Eats in Smalton", false, new ConfigDescription("Teleport to Easy Eats", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1455 } })); TeleportFT_EasyPizza = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Fishing Town)", "Easy Pizza in Smalton", false, new ConfigDescription("Teleport to Easy Pizza", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1454 } })); TeleportFT_Node64 = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Fishing Town)", "House edge of Damton", false, new ConfigDescription("Teleport to House", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1453 } })); TeleportFT_EasyDepot = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Fishing Town)", "Easy Depot in Damton", false, new ConfigDescription("Teleport to Easy Depot", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1452 } })); TeleportFT_EZCafe = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Fishing Town)", "EZ Cafe in Damton", false, new ConfigDescription("Teleport to EZ Cafe", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1451 } })); TeleportFT_EZBakery = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Fishing Town)", "EZ Bakery in Damton", false, new ConfigDescription("Teleport to EZ Bakery", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1450 } })); TeleportFT_Node102 = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Fishing Town)", "House in Clifton", false, new ConfigDescription("Teleport to House", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1449 } })); TeleportFT_PawnShop = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Fishing Town)", "Pawn Shop in Clifton & Tunnel to Mountain Town", false, new ConfigDescription("Teleport to Pawn Shop", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1449 } })); TeleportFT_EZMart = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Fishing Town)", "EZ Mart in Clifton", false, new ConfigDescription("Teleport to EZ Mart", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1448 } })); TeleportFT_EZAuto = ((BaseUnityPlugin)this).Config.Bind("Teleportation (Fishing Town)", "EZ Auto in Clifton", false, new ConfigDescription("Teleport to EZ Auto", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 1447 } })); RandomWeather = ((BaseUnityPlugin)this).Config.Bind("Environment", "Random weather", true, new ConfigDescription("Turn off random weather in order to change the weather manually", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 160 } })); WeatherIntensity = ((BaseUnityPlugin)this).Config.Bind("Environment", "Weather intensity", 0, new ConfigDescription("Change weather intensity", (AcceptableValueBase)(object)new AcceptableValueRange(0, 10), new object[1] { new ConfigurationManagerAttributes { Order = 159 } })); WeatherCycle = ((BaseUnityPlugin)this).Config.Bind("Environment", "Weather cycle", 0, new ConfigDescription("Change weather cycle", (AcceptableValueBase)(object)new AcceptableValueRange(0, 10), new object[1] { new ConfigurationManagerAttributes { Order = 158 } })); FreezeWeather = ((BaseUnityPlugin)this).Config.Bind("Environment", "Freeze weather", false, new ConfigDescription("Freeze the weather cycle", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 157 } })); SpeedUpWeather = ((BaseUnityPlugin)this).Config.Bind("Environment", "Speed up weather", 0, new ConfigDescription("Speed up the weather cycle", (AcceptableValueBase)(object)new AcceptableValueRange(-10, 10), new object[1] { new ConfigurationManagerAttributes { Order = 156 } })); FreezeTime = ((BaseUnityPlugin)this).Config.Bind("Environment", "Freeze time", false, new ConfigDescription("Freeze time of day", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 153 } })); ReverseTime = ((BaseUnityPlugin)this).Config.Bind("Environment", "Reverse time", false, new ConfigDescription("Reverse time of day", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 152 } })); ChangeTime = ((BaseUnityPlugin)this).Config.Bind("Environment", "Change time", 6f, new ConfigDescription("Change time of day", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 24f), new object[1] { new ConfigurationManagerAttributes { Order = 151 } })); SpeedUpTime = ((BaseUnityPlugin)this).Config.Bind("Environment", "Speed up time", 0, new ConfigDescription("Speed up time of day", (AcceptableValueBase)(object)new AcceptableValueRange(-10, 10), new object[1] { new ConfigurationManagerAttributes { Order = 150 } })); SyncTime = ((BaseUnityPlugin)this).Config.Bind("Environment", "Sync time", false, new ConfigDescription("Sync time to the clock of your operating system", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 149 } })); NoFog = ((BaseUnityPlugin)this).Config.Bind("Environment", "No fog", false, new ConfigDescription("Toggle off fog", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 140 } })); FPSAmount = ((BaseUnityPlugin)this).Config.Bind("Camera & Visuals", "FPS amount", 0, new ConfigDescription("Adjust the amount of FPS. 0 = Default (60). 10 = Uncapped", (AcceptableValueBase)(object)new AcceptableValueRange(0, 10), new object[1] { new ConfigurationManagerAttributes { Order = 175 } })); Vsync = ((BaseUnityPlugin)this).Config.Bind("Camera & Visuals", "Vsync", false, new ConfigDescription("Sync FPS with monitor", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 174 } })); ShowFPS = ((BaseUnityPlugin)this).Config.Bind("Camera & Visuals", "Show FPS", false, new ConfigDescription("Display 'Frames Per Second'", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 173 } })); ShowHUD = ((BaseUnityPlugin)this).Config.Bind("Camera & Visuals", ShowHUDKey, true, new ConfigDescription("Toggle vehicle & player HUD (shortcut U)", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 172 } })); FreeCam = ((BaseUnityPlugin)this).Config.Bind("Camera & Visuals", "Freecam", false, new ConfigDescription("Freely move around the world (WASD to move when M is pressed, U to toggle HUD)", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 171 } })); NoPixelRendering = ((BaseUnityPlugin)this).Config.Bind("Camera & Visuals", "No pixelated rendering", false, new ConfigDescription("Remove the retro look of the game", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 170 } })); UnlockAll = ((BaseUnityPlugin)this).Config.Bind("Achievements", UnlockAllKey, false, new ConfigDescription("Unlock all achievements", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 120 } })); SnowyPeaks = ((BaseUnityPlugin)this).Config.Bind("Achievements", SnowyPeaksKey, false, new ConfigDescription("Unlock snowy peaks", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 110 } })); FishingTown = ((BaseUnityPlugin)this).Config.Bind("Achievements", FishingTownKey, false, new ConfigDescription("Unlock fishing town", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 100 } })); DuctTape = ((BaseUnityPlugin)this).Config.Bind("Achievements", DuctTapeKey, false, new ConfigDescription("Unlock duct tape", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 90 } })); Tea = ((BaseUnityPlugin)this).Config.Bind("Achievements", TeaKey, false, new ConfigDescription("Unlock tea", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 80 } })); Fish = ((BaseUnityPlugin)this).Config.Bind("Achievements", FishKey, false, new ConfigDescription("Unlock fish", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 70 } })); RadioTowers = ((BaseUnityPlugin)this).Config.Bind("Achievements", RadioTowersKey, false, new ConfigDescription("Unlock radio towers", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 60 } })); Reboot = ((BaseUnityPlugin)this).Config.Bind("Achievements", RebootKey, false, new ConfigDescription("Unlock reboot", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 50 } })); Shutdown = ((BaseUnityPlugin)this).Config.Bind("Achievements", ShutdownKey, false, new ConfigDescription("Unlock shutdown", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 40 } })); Restore = ((BaseUnityPlugin)this).Config.Bind("Achievements", RestoreKey, false, new ConfigDescription("Unlock restore", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 30 } })); Snowcats = ((BaseUnityPlugin)this).Config.Bind("Achievements", SnowcatsKey, false, new ConfigDescription("Unlock snowcats", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 20 } })); Birds = ((BaseUnityPlugin)this).Config.Bind("Achievements", BirdsKey, false, new ConfigDescription("Unlock birds", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 10 } })); ShowLocation = ((BaseUnityPlugin)this).Config.Bind("Extras", "Show location", false, new ConfigDescription("Show vehicle location on map", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 6 } })); ShowAllExes = ((BaseUnityPlugin)this).Config.Bind("Extras", "Show all EXEs", false, new ConfigDescription("Show all app icons in EasyOS. WARNING! This feature may be buggy. Only way to get rid of extra icons is by restarting the game with this feature toggled OFF", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 5 } })); DraggableIcons = ((BaseUnityPlugin)this).Config.Bind("Extras", "Draggable icons", false, new ConfigDescription("Toggle dragging icons around", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 4 } })); VehicleInvincibility.SettingChanged += ConfigSettingChanged; ShowHUD.SettingChanged += ConfigSettingChanged; InfiniteFuel.SettingChanged += ConfigSettingChanged; SmoothDriving.SettingChanged += ConfigSettingChanged; InstantReset.SettingChanged += ConfigSettingChanged; SnowTiresToggle.SettingChanged += ConfigSettingChanged; IceChainsToggle.SettingChanged += ConfigSettingChanged; BumperBarToggle.SettingChanged += ConfigSettingChanged; AlwaysDuctTape.SettingChanged += ConfigSettingChanged; PerfectTraction.SettingChanged += ConfigSettingChanged; BlowUpVehicle.SettingChanged += ConfigSettingChanged; ZeroGravity.SettingChanged += ConfigSettingChanged; FPSAmount.SettingChanged += ConfigSettingChanged; Vsync.SettingChanged += ConfigSettingChanged; ShowFPS.SettingChanged += ConfigSettingChanged; ShowHUD.SettingChanged += ConfigSettingChanged; FreeCam.SettingChanged += ConfigSettingChanged; NoPixelRendering.SettingChanged += ConfigSettingChanged; PlayerSpeed.SettingChanged += ConfigSettingChanged; MoneyAmount.SettingChanged += ConfigSettingChanged; PlayerInvincibility.SettingChanged += ConfigSettingChanged; InfiniteEnergy.SettingChanged += ConfigSettingChanged; NoFreezing.SettingChanged += ConfigSettingChanged; NoRagdoll.SettingChanged += ConfigSettingChanged; GiveItem1.SettingChanged += ConfigSettingChanged; GiveItem2.SettingChanged += ConfigSettingChanged; GiveItem3.SettingChanged += ConfigSettingChanged; GiveItem4.SettingChanged += ConfigSettingChanged; GiveItem5.SettingChanged += ConfigSettingChanged; GiveItem6.SettingChanged += ConfigSettingChanged; GiveItem7.SettingChanged += ConfigSettingChanged; GiveItem8.SettingChanged += ConfigSettingChanged; GiveItem9.SettingChanged += ConfigSettingChanged; GiveItem10.SettingChanged += ConfigSettingChanged; GiveItem11.SettingChanged += ConfigSettingChanged; GiveItem12.SettingChanged += ConfigSettingChanged; GiveItem13.SettingChanged += ConfigSettingChanged; GiveItem14.SettingChanged += ConfigSettingChanged; GiveItem15.SettingChanged += ConfigSettingChanged; GiveItem16.SettingChanged += ConfigSettingChanged; GiveItem17.SettingChanged += ConfigSettingChanged; GiveItem18.SettingChanged += ConfigSettingChanged; TeleportMT_EasyFlowers.SettingChanged += ConfigSettingChanged; TeleportMT_EasyEats.SettingChanged += ConfigSettingChanged; TeleportMT_EZBakery.SettingChanged += ConfigSettingChanged; TeleportMT_EasyDepot.SettingChanged += ConfigSettingChanged; TeleportMT_EZCafe.SettingChanged += ConfigSettingChanged; TeleportMT_EasyPizza.SettingChanged += ConfigSettingChanged; TeleportMT_PawnShop.SettingChanged += ConfigSettingChanged; TeleportMT_EZAuto.SettingChanged += ConfigSettingChanged; TeleportMT_EZMart.SettingChanged += ConfigSettingChanged; TeleportMT_Node93.SettingChanged += ConfigSettingChanged; TeleportFT_NodeDock.SettingChanged += ConfigSettingChanged; TeleportFT_NodeDock2.SettingChanged += ConfigSettingChanged; TeleportFT_NodeDock3_1.SettingChanged += ConfigSettingChanged; TeleportFT_EasyFlowers.SettingChanged += ConfigSettingChanged; TeleportFT_EasyEats.SettingChanged += ConfigSettingChanged; TeleportFT_EasyPizza.SettingChanged += ConfigSettingChanged; TeleportFT_Node64.SettingChanged += ConfigSettingChanged; TeleportFT_EasyDepot.SettingChanged += ConfigSettingChanged; TeleportFT_EZCafe.SettingChanged += ConfigSettingChanged; TeleportFT_EZBakery.SettingChanged += ConfigSettingChanged; TeleportFT_Node102.SettingChanged += ConfigSettingChanged; TeleportFT_PawnShop.SettingChanged += ConfigSettingChanged; TeleportFT_EZMart.SettingChanged += ConfigSettingChanged; TeleportFT_EZAuto.SettingChanged += ConfigSettingChanged; TeleportSP_Destnode5.SettingChanged += ConfigSettingChanged; TeleportSP_Destnode1.SettingChanged += ConfigSettingChanged; TeleportSP_Destnode3.SettingChanged += ConfigSettingChanged; TeleportSP_Destnode4.SettingChanged += ConfigSettingChanged; TeleportSP_Destnode6.SettingChanged += ConfigSettingChanged; TeleportSP_Destnode10.SettingChanged += ConfigSettingChanged; TeleportSP_Destnode8.SettingChanged += ConfigSettingChanged; TeleportSP_Destnode7.SettingChanged += ConfigSettingChanged; TeleportSP_Destnode9.SettingChanged += ConfigSettingChanged; TeleportSP_EasyEats.SettingChanged += ConfigSettingChanged; TeleportSP_EZBakery.SettingChanged += ConfigSettingChanged; TeleportSP_EasyPizza.SettingChanged += ConfigSettingChanged; TeleportSP_EasyFlowers.SettingChanged += ConfigSettingChanged; TeleportSP_EasyDepot.SettingChanged += ConfigSettingChanged; TeleportSP_EZAuto.SettingChanged += ConfigSettingChanged; TeleportSP_EZCafe.SettingChanged += ConfigSettingChanged; TeleportSP_EZMart.SettingChanged += ConfigSettingChanged; TeleportSP_PawnShop.SettingChanged += ConfigSettingChanged; RandomWeather.SettingChanged += EnvironmentSettingChanged; WeatherIntensity.SettingChanged += EnvironmentSettingChanged; WeatherCycle.SettingChanged += EnvironmentSettingChanged; FreezeWeather.SettingChanged += EnvironmentSettingChanged; SpeedUpWeather.SettingChanged += EnvironmentSettingChanged; NoFog.SettingChanged += EnvironmentSettingChanged; FreezeTime.SettingChanged += EnvironmentSettingChanged; ReverseTime.SettingChanged += EnvironmentSettingChanged; ChangeTime.SettingChanged += EnvironmentSettingChanged; SpeedUpTime.SettingChanged += EnvironmentSettingChanged; SyncTime.SettingChanged += EnvironmentSettingChanged; UnlockAll.SettingChanged += ConfigSettingChanged; SnowyPeaks.SettingChanged += ConfigSettingChanged; FishingTown.SettingChanged += ConfigSettingChanged; DuctTape.SettingChanged += ConfigSettingChanged; Tea.SettingChanged += ConfigSettingChanged; Fish.SettingChanged += ConfigSettingChanged; RadioTowers.SettingChanged += ConfigSettingChanged; Reboot.SettingChanged += ConfigSettingChanged; Shutdown.SettingChanged += ConfigSettingChanged; Restore.SettingChanged += ConfigSettingChanged; Snowcats.SettingChanged += ConfigSettingChanged; Birds.SettingChanged += ConfigSettingChanged; ShowLocation.SettingChanged += ConfigSettingChanged; ShowAllExes.SettingChanged += ConfigSettingChanged; DraggableIcons.SettingChanged += ConfigSettingChanged; Harmony.PatchAll(); ApplyGraphicsSettings(); InitializeAdditionalSettings(); Shaders.SettingChanged += OnShadersChanged; RenderPipelineManager.beginCameraRendering += OnBeginCameraRendering; } private void OnDestroy() { RenderPipelineManager.beginCameraRendering -= OnBeginCameraRendering; OnShaderCleanup(); cachedCar = null; cachedHUD = null; cachedDamage = null; cachedUpgrades = null; cachedBumper = null; cachedSnow = null; cachedPlayer = null; cachedRagdoll = null; cachedItemManager = null; cachedDesktop = null; cachedJobBoard = null; cachedNavigation = null; cachedWeatherSystem = null; cachedDayNightCycle = null; baseMaxFrictionForce.Clear(); originalFileVisibility.Clear(); _deltaTimeQueue.Clear(); _envInitialized = false; _timeInitialized = false; _fpsSettingsApplied = false; _initialShaderCheckDone = false; cosmeticsInitialized = false; fileVisibilityInitialized = false; moneyInitialized = false; if ((Object)(object)newRT != (Object)null && (Object)(object)newRT != (Object)(object)defaultRT) { newRT.Release(); newRT = null; } if ((Object)(object)newRearViewRT != (Object)null && (Object)(object)newRearViewRT != (Object)(object)defaultRearViewRT) { newRearViewRT.Release(); newRearViewRT = null; } } private void EnvironmentSettingChanged(object sender, EventArgs e) { //IL_00dd: Unknown result type (might be due to invalid IL or missing references) if (_suppressEnvWrites) { return; } if (sender == WeatherIntensity) { _weatherIntensityUserUntil = Time.unscaledTime + 0.1f; } if (sender == WeatherCycle) { _weatherUserUntil = Time.unscaledTime + 0.1f; } if (sender == ChangeTime) { _timeUserUntil = Time.unscaledTime + 0.75f; } ConfigEntry val = sender as ConfigEntry; if (sender is ConfigEntry val2 && val2 == FPSAmount) { ApplyGraphicsSettings(); } else if (val != null && (val == Vsync || val == ShowFPS || val == NoPixelRendering)) { ApplyGraphicsSettings(); if (val == NoPixelRendering) { currentRes = default(Resolution); FixPixelRendering(); } } } private bool TryUnlock(string id, string label) { if (!SteamManager.Initialized) { return false; } bool flag = default(bool); SteamUserStats.GetAchievement(id, ref flag); if (flag) { return false; } SteamUserStats.SetAchievement(id); return true; } private void EasyDeliveryMenu() { if (SteamManager.Initialized) { bool flag = false; flag |= TryUnlock("ACH_SNOWYPEAKS", "snowy peaks"); flag |= TryUnlock("ACH_FISHINGTOWN", "fishing town"); flag |= TryUnlock("ACH_TAPE", "duct tape"); flag |= TryUnlock("ACH_TEA", "tea"); flag |= TryUnlock("ACH_FISH", "fish"); flag |= TryUnlock("ACH_RADIOTOWERS", "radio towers"); flag |= TryUnlock("ACH_REBOOT", "reboot"); flag |= TryUnlock("ACH_SHUTDOWN", "shutdown"); flag |= TryUnlock("ACH_RESTORE", "restore"); flag |= TryUnlock("ACH_SNOWCATS", "snowcats"); if (flag | TryUnlock("ACH_BIRDS", "birds")) { SteamUserStats.StoreStats(); } } } private void UnlockSingleAchievement(string id, string label) { if (TryUnlock(id, label)) { SteamUserStats.StoreStats(); } } private void CheckTeleportTimeFreeze() { if (_teleportFreezeTime && Time.unscaledTime > _teleportFreezeUntil) { _teleportFreezeTime = false; } } private void Update() { RefreshObjectCache(); if (!_initialShaderCheckDone) { _initialShaderCheckDone = true; if (Shaders != null && Shaders.Value) { Shaders.Value = false; shadersEnabled = false; } } RefreshObjectCache(); UpdateAdditionalToggles(); UpdateSmoothDeltaTime(); CheckTeleportTimeFreeze(); ApplyVehicleToggles(); ApplyPlayerToggles(); ApplyItemButtons(); ApplyTeleportation(); ApplyEnvironment(); ApplyExtras(); UpdateFreeCam(); if (!_fpsSettingsApplied) { EnforceFPSSettings(); } } private void LateUpdate() { UpdateFPSDisplay(); } private void UpdateFPSDisplay() { if (ShowFPS != null && ShowFPS.Value) { _fpsUpdateTimer += Time.unscaledDeltaTime; if (_fpsUpdateTimer >= 0.5f) { _displayedFPS = 1f / _smoothDeltaTime; _fpsUpdateTimer = 0f; } } } private void UpdateSmoothDeltaTime() { float unscaledDeltaTime = Time.unscaledDeltaTime; unscaledDeltaTime = Mathf.Clamp(unscaledDeltaTime, 0.001f, 0.1f); _deltaTimeQueue.Enqueue(unscaledDeltaTime); if (_deltaTimeQueue.Count > 10) { _deltaTimeQueue.Dequeue(); } float num = 0f; foreach (float item in _deltaTimeQueue) { num += item; } _smoothDeltaTime = num / (float)_deltaTimeQueue.Count; } private void UpdateFreeCam() { //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: 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_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011a: 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_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: 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_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_023c: 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_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_029e: 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_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0321: 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_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) if (Keyboard.current != null && ((ButtonControl)Keyboard.current.uKey).wasPressedThisFrame) { ShowHUD.Value = !ShowHUD.Value; } if (Keyboard.current != null && ((ButtonControl)Keyboard.current.mKey).wasPressedThisFrame && freeCamEnabled) { freeCamMovement = !freeCamMovement; } if (FreeCam.Value && !wasFreeCamActive) { EnableFreeCam(); wasFreeCamActive = true; } else if (!FreeCam.Value && wasFreeCamActive) { DisableFreeCam(); wasFreeCamActive = false; } if (freeCamEnabled) { ApplyFreeCamAudioAttenuation(); } if (!freeCamEnabled || !freeCamMovement || !((Object)(object)mainCamera != (Object)null)) { return; } if (Mouse.current != null) { Vector2 val = ((InputControl)(object)((Pointer)Mouse.current).delta).ReadValue(); float num = val.x * freeCamMouseSensitivity * 0.1f; float num2 = val.y * freeCamMouseSensitivity * 0.1f; freeCamRotation.y += num; freeCamRotation.x -= num2; freeCamRotation.x = Mathf.Clamp(freeCamRotation.x, -90f, 90f); } Quaternion val2 = Quaternion.Euler(freeCamRotation.x, freeCamRotation.y, 0f); if (Keyboard.current != null) { Vector3 val3 = Vector3.zero; float num3 = freeCamSpeed; if (((ButtonControl)Keyboard.current.leftShiftKey).isPressed || ((ButtonControl)Keyboard.current.rightShiftKey).isPressed) { num3 *= 3f; } if (((ButtonControl)Keyboard.current.wKey).isPressed) { val3 += val2 * Vector3.forward; } if (((ButtonControl)Keyboard.current.sKey).isPressed) { val3 -= val2 * Vector3.forward; } if (((ButtonControl)Keyboard.current.aKey).isPressed) { val3 -= val2 * Vector3.right; } if (((ButtonControl)Keyboard.current.dKey).isPressed) { val3 += val2 * Vector3.right; } if (((ButtonControl)Keyboard.current.spaceKey).isPressed) { val3 += Vector3.up; } if (((ButtonControl)Keyboard.current.leftCtrlKey).isPressed || ((ButtonControl)Keyboard.current.rightCtrlKey).isPressed) { val3 -= Vector3.up; } freeCamPosition += ((Vector3)(ref val3)).normalized * num3 * _smoothDeltaTime; } } private static void OnBeginCameraRendering(ScriptableRenderContext context, Camera cam) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) if (freeCamEnabled && !((Object)(object)mainCamera == (Object)null) && !((Object)(object)cam != (Object)(object)mainCamera)) { Quaternion rotation = Quaternion.Euler(freeCamRotation.x, freeCamRotation.y, 0f); ((Component)mainCamera).transform.position = freeCamPosition; ((Component)mainCamera).transform.rotation = rotation; if ((Object)(object)audioListenerTransform != (Object)null) { audioListenerTransform.position = freeCamPosition; audioListenerTransform.rotation = rotation; } } } private void EnableFreeCam() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: 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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)mainCamera == (Object)null) { return; } freeCamEnabled = true; freeCamMovement = false; cameraController = Object.FindObjectOfType(); if ((Object)(object)cameraController != (Object)null) { ((Behaviour)cameraController).enabled = false; } freeCamPosition = ((Component)mainCamera).transform.position; Quaternion rotation = ((Component)mainCamera).transform.rotation; Vector3 eulerAngles = ((Quaternion)(ref rotation)).eulerAngles; freeCamRotation = new Vector3(eulerAngles.x, eulerAngles.y, 0f); AudioListener[] array = Object.FindObjectsOfType(); AudioListener val = ((array.Length != 0) ? array[0] : null); if ((Object)(object)val != (Object)null) { audioListenerTransform = ((Component)val).transform; _origListenerLocalPos = audioListenerTransform.localPosition; _origListenerLocalRot = audioListenerTransform.localRotation; _listenerCaptured = true; } else { audioListenerTransform = null; _listenerCaptured = false; } _freeCamManagedSources.Clear(); _origSourceVolumes.Clear(); _origSourceSpatialBlend.Clear(); AudioSource[] array2 = Object.FindObjectsOfType(); AudioSource[] array3 = array2; foreach (AudioSource val2 in array3) { if (!((Object)(object)val2 == (Object)null) && !(val2.spatialBlend <= 0.01f)) { _origSourceVolumes[val2] = val2.volume; _origSourceSpatialBlend[val2] = val2.spatialBlend; _freeCamManagedSources.Add(val2); } } } private void DisableFreeCam() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) freeCamEnabled = false; freeCamMovement = false; if ((Object)(object)cameraController != (Object)null) { ((Behaviour)cameraController).enabled = true; } if (_listenerCaptured && (Object)(object)audioListenerTransform != (Object)null) { audioListenerTransform.localPosition = _origListenerLocalPos; audioListenerTransform.localRotation = _origListenerLocalRot; } audioListenerTransform = null; _listenerCaptured = false; foreach (AudioSource freeCamManagedSource in _freeCamManagedSources) { if (!((Object)(object)freeCamManagedSource == (Object)null)) { if (_origSourceVolumes.TryGetValue(freeCamManagedSource, out var value)) { freeCamManagedSource.volume = value; } if (_origSourceSpatialBlend.TryGetValue(freeCamManagedSource, out var value2)) { freeCamManagedSource.spatialBlend = value2; } } } _freeCamManagedSources.Clear(); _origSourceVolumes.Clear(); _origSourceSpatialBlend.Clear(); } private static float ComputeDistanceAttenuation(AudioSource source, float distance) { if (distance <= source.minDistance) { return 1f; } if (distance >= source.maxDistance) { return 0f; } return Mathf.Clamp01(1f - (distance - source.minDistance) / (source.maxDistance - source.minDistance)); } private static void ApplyFreeCamAudioAttenuation() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < _freeCamManagedSources.Count; i++) { AudioSource val = _freeCamManagedSources[i]; if (!((Object)(object)val == (Object)null)) { float distance = Vector3.Distance(freeCamPosition, ((Component)val).transform.position); float num = ComputeDistanceAttenuation(val, distance); if (_origSourceVolumes.TryGetValue(val, out var value)) { val.volume = value * num; } } } } private void CacheCarBaseValues(sCarController car) { if (!((Object)(object)car == (Object)null) && !((Object)(object)car.rb == (Object)null)) { if (baseMaxSpeed < 0f) { baseMaxSpeed = car.maxSpeed; } if (baseMass < 0f) { baseMass = car.rb.mass; } if (baseDownForce < 0f) { baseDownForce = car.downForce; } } } private void ApplyVehicleToggles() { //IL_057a: Unknown result type (might be due to invalid IL or missing references) //IL_0581: Expected O, but got Unknown //IL_058a: Unknown result type (might be due to invalid IL or missing references) //IL_0591: Expected O, but got Unknown sCarController val = cachedCar; sHUD val2 = cachedHUD; CarDamage val3 = cachedDamage; TruckUpgrades val4 = cachedUpgrades; BumperBar val5 = cachedBumper; SnowTires val6 = cachedSnow; vehicleInvincible = VehicleInvincibility.Value; zeroGravity = ZeroGravity.Value; instantReset = InstantReset.Value; float value = SpeedMultiplier.Value; float value2 = GravityMultiplier.Value; if ((Object)(object)val != (Object)null && (Object)(object)val.rb != (Object)null) { CacheCarBaseValues(val); if (baseMaxSpeed > 0f) { val.maxSpeed = baseMaxSpeed * value; } if (baseMass > 0f) { val.rb.mass = baseMass * value2; } if (Mathf.Abs(value2 - 1f) > 0.0001f) { val.rb.useGravity = true; } else { val.rb.mass = baseMass; val.rb.useGravity = !zeroGravity; } ApplyPerfectTraction(val); } if ((Object)(object)val2 != (Object)null) { if (!hudInit) { ShowHUD.Value = val2.showInfo; hudInit = true; } val2.showInfo = ShowHUD.Value; try { FieldInfo field = typeof(sHUD).GetField("showFPS", BindingFlags.Instance | BindingFlags.NonPublic); if (field != null) { field.SetValue(val2, false); } } catch { } if (InfiniteFuel.Value) { val2.fuel = val2.fuelCapacity; } } if ((Object)(object)val3 != (Object)null && vehicleInvincible && val3.damage > 0f) { val3.damage = 0f; } if ((Object)(object)val4 != (Object)null) { sSaveSystem val7 = Object.FindObjectOfType(); if ((Object)(object)val7 != (Object)null) { string saveFileName = val7.saveFileName; if (currentSaveFile != saveFileName) { currentSaveFile = saveFileName; snowInit = false; bumperInit = false; moneyInitialized = false; } } if (!snowInit) { bool value3 = sSaveSystem.GetBool("deliveryHasTires", false); bool value4 = sSaveSystem.GetBool("deliveryHasChains", false); SnowTiresToggle.Value = value3; IceChainsToggle.Value = value4; lastHadTires = value3; lastHadChains = value4; snowInit = true; } else { bool flag = sSaveSystem.GetBool("deliveryHasTires", false); bool flag2 = sSaveSystem.GetBool("deliveryHasChains", false); if (flag && !lastHadTires) { SnowTiresToggle.Value = true; lastHadTires = true; } if (flag2 && !lastHadChains) { IceChainsToggle.Value = true; lastHadChains = true; } } if (!bumperInit) { bool value5 = sSaveSystem.GetBool("deliveryHasBumper", false); BumperBarToggle.Value = value5; lastHadBumper = value5; bumperInit = true; } else if (sSaveSystem.GetBool("deliveryHasBumper", false) && !lastHadBumper) { BumperBarToggle.Value = true; lastHadBumper = true; } bool value6 = SnowTiresToggle.Value; bool value7 = IceChainsToggle.Value; val4.SetHasTires(value6); val4.SetHasChains(value7); if ((Object)(object)val6 != (Object)null) { val6.hasSnowTires = value6; val6.hasIceChains = value7; } bool value8 = BumperBarToggle.Value; val4.SetHasBumper(value8); if ((Object)(object)val5 != (Object)null) { val5.active = value8; if ((Object)(object)val5.view != (Object)null) { val5.view.SetActive(value8); } } } if ((Object)(object)val != (Object)null && (Object)(object)truckRR == (Object)null) { Transform val8 = ((Component)val).transform.Find("Model"); if ((Object)(object)val8 != (Object)null) { truckRR = ((Component)val8).GetComponent(); } } if ((Object)(object)truckRR != (Object)null) { ((Behaviour)truckRR).enabled = !SmoothDriving.Value; } if (BlowUpVehicle.Value && (Object)(object)val3 != (Object)null) { val3.damage = 1f; BlowUpVehicle.Value = false; } if (!AlwaysDuctTape.Value) { return; } sStraps val9 = Object.FindObjectOfType(); if (!((Object)(object)val9 != (Object)null)) { return; } try { FieldInfo field2 = typeof(sStraps).GetField("payloadPivot", BindingFlags.Instance | BindingFlags.Public); FieldInfo field3 = typeof(sStraps).GetField("line", BindingFlags.Instance | BindingFlags.Public); if (!(field2 != null) || !(field3 != null)) { return; } Transform val10 = (Transform)field2.GetValue(val9); LineRenderer val11 = (LineRenderer)field3.GetValue(val9); if ((Object)(object)val10 != (Object)null && (Object)(object)val11 != (Object)null && val10.childCount > 0 && !((Renderer)val11).enabled) { MethodInfo method = typeof(sStraps).GetMethod("Strap", BindingFlags.Instance | BindingFlags.NonPublic); if (method != null) { method.Invoke(val9, null); } } } catch { } } private void ApplyPlayerToggles() { sCharacterController val = cachedPlayer; sHUD val2 = cachedHUD; sCharacterRagdoll val3 = cachedRagdoll; if ((Object)(object)val != (Object)null) { if (basePlayerAcceleration < 0f) { basePlayerAcceleration = val.acceleration; } if (basePlayerDeceleration < 0f) { basePlayerDeceleration = val.deceleration; } float num = ((PlayerSpeed != null) ? PlayerSpeed.Value : 1f); val.acceleration = basePlayerAcceleration * num; val.deceleration = basePlayerDeceleration / num; } if ((Object)(object)val2 != (Object)null) { if (!moneyInitialized) { baseMoney = val2.money; moneyInitialized = true; } if (Mathf.Abs(val2.money - baseMoney) > 0.01f && MoneyAmount.Value <= 0.01f) { baseMoney = val2.money; } float num2 = ((MoneyAmount != null) ? MoneyAmount.Value : 0f); if (num2 <= 0.01f) { val2.money = baseMoney; } else { float num3 = num2 / 20f; float money = Mathf.Pow(10f, num3) * 100f; val2.money = money; } if ((PlayerInvincibility != null && PlayerInvincibility.Value) || (InfiniteEnergy != null && InfiniteEnergy.Value)) { val2.energy = val2.energyCapacity; } if ((PlayerInvincibility != null && PlayerInvincibility.Value) || (NoFreezing != null && NoFreezing.Value)) { val2.temperature = val2.temperatureLimit; } } } private void ApplyItemButtons() { sItemManager val = cachedItemManager; if (!((Object)(object)val == (Object)null)) { if (GiveItem1.Value) { val.AddToInventory(0, 1); GiveItem1.Value = false; } if (GiveItem2.Value) { val.AddToInventory(1, 1); GiveItem2.Value = false; } if (GiveItem3.Value) { val.AddToInventory(2, 1); GiveItem3.Value = false; } if (GiveItem4.Value) { val.AddToInventory(3, 1); GiveItem4.Value = false; } if (GiveItem5.Value) { val.AddToInventory(4, 1); GiveItem5.Value = false; } if (GiveItem6.Value) { val.AddToInventory(5, 1); GiveItem6.Value = false; } if (GiveItem7.Value) { val.AddToInventory(6, 1); GiveItem7.Value = false; } if (GiveItem8.Value) { val.AddToInventory(7, 1); GiveItem8.Value = false; } if (GiveItem9.Value) { val.AddToInventory(8, 1); GiveItem9.Value = false; } if (GiveItem10.Value) { val.AddToInventory(9, 1); GiveItem10.Value = false; } if (GiveItem11.Value) { val.AddToInventory(10, 1); GiveItem11.Value = false; } if (GiveItem12.Value) { val.AddToInventory(11, 1); GiveItem12.Value = false; } if (GiveItem13.Value) { val.AddToInventory(12, 1); GiveItem13.Value = false; } if (GiveItem14.Value) { val.AddToInventory(13, 1); GiveItem14.Value = false; } if (GiveItem15.Value) { val.AddToInventory(14, 1); GiveItem15.Value = false; } if (GiveItem16.Value) { val.AddToInventory(15, 1); GiveItem16.Value = false; } if (GiveItem17.Value) { val.AddToInventory(16, 1); GiveItem17.Value = false; } if (GiveItem18.Value) { val.AddToInventory(17, 1); GiveItem18.Value = false; } } } private void ApplyTeleportation() { sCharacterController val = cachedPlayer; if (!((Object)(object)val == (Object)null)) { sCarController val2 = cachedCar; bool inCar = (Object)(object)val2 != (Object)null && !val2.GuyActive; if (TeleportMT_EasyFlowers.Value) { TeleportToLocation("Easy Flowers", inCar); TeleportMT_EasyFlowers.Value = false; } if (TeleportMT_EasyEats.Value) { TeleportToLocation("Easy Eats", inCar); TeleportMT_EasyEats.Value = false; } if (TeleportMT_EZBakery.Value) { TeleportToLocation("EZ Bakery", inCar); TeleportMT_EZBakery.Value = false; } if (TeleportMT_EasyDepot.Value) { TeleportToLocation("Easy Depot", inCar); TeleportMT_EasyDepot.Value = false; } if (TeleportMT_EZCafe.Value) { TeleportToLocation("EZ Cafe", inCar); TeleportMT_EZCafe.Value = false; } if (TeleportMT_EasyPizza.Value) { TeleportToLocation("Easy Pizza", inCar); TeleportMT_EasyPizza.Value = false; } if (TeleportMT_PawnShop.Value) { TeleportToLocation("Pawn Shop", inCar); TeleportMT_PawnShop.Value = false; } if (TeleportMT_EZAuto.Value) { TeleportToLocation("EZ Auto", inCar); TeleportMT_EZAuto.Value = false; } if (TeleportMT_EZMart.Value) { TeleportToLocation("EZ Mart", inCar); TeleportMT_EZMart.Value = false; } if (TeleportMT_Node93.Value) { TeleportToLocation("Node (93)", inCar); TeleportMT_Node93.Value = false; } if (TeleportFT_NodeDock.Value) { TeleportToLocation("Node(dock)", inCar); TeleportFT_NodeDock.Value = false; } if (TeleportFT_NodeDock2.Value) { TeleportToLocation("Node (dock2)", inCar); TeleportFT_NodeDock2.Value = false; } if (TeleportFT_NodeDock3_1.Value) { TeleportToLocation("Node (dock3) (1)", inCar); TeleportFT_NodeDock3_1.Value = false; } if (TeleportFT_EasyFlowers.Value) { TeleportToLocation("Easy Flowers", inCar); TeleportFT_EasyFlowers.Value = false; } if (TeleportFT_EasyEats.Value) { TeleportToLocation("Easy Eats", inCar); TeleportFT_EasyEats.Value = false; } if (TeleportFT_EasyPizza.Value) { TeleportToLocation("Easy Pizza", inCar); TeleportFT_EasyPizza.Value = false; } if (TeleportFT_Node64.Value) { TeleportToLocation("Node (64)", inCar); TeleportFT_Node64.Value = false; } if (TeleportFT_EasyDepot.Value) { TeleportToLocation("Easy Depot", inCar); TeleportFT_EasyDepot.Value = false; } if (TeleportFT_EZCafe.Value) { TeleportToLocation("EZ Cafe", inCar); TeleportFT_EZCafe.Value = false; } if (TeleportFT_EZBakery.Value) { TeleportToLocation("EZ Bakery", inCar); TeleportFT_EZBakery.Value = false; } if (TeleportFT_Node102.Value) { TeleportToLocation("Node (102)", inCar); TeleportFT_Node102.Value = false; } if (TeleportFT_PawnShop.Value) { TeleportToLocation("Pawn Shop", inCar); TeleportFT_PawnShop.Value = false; } if (TeleportFT_EZMart.Value) { TeleportToLocation("EZ Mart", inCar); TeleportFT_EZMart.Value = false; } if (TeleportFT_EZAuto.Value) { TeleportToLocation("EZ Auto", inCar); TeleportFT_EZAuto.Value = false; } if (TeleportSP_Destnode5.Value) { TeleportToLocation("Destnode5", inCar); TeleportSP_Destnode5.Value = false; } if (TeleportSP_Destnode1.Value) { TeleportToLocation("Destnode1", inCar); TeleportSP_Destnode1.Value = false; } if (TeleportSP_Destnode3.Value) { TeleportToLocation("Destnode3", inCar); TeleportSP_Destnode3.Value = false; } if (TeleportSP_Destnode4.Value) { TeleportToLocation("Destnode4", inCar); TeleportSP_Destnode4.Value = false; } if (TeleportSP_Destnode6.Value) { TeleportToLocation("Destnode6", inCar); TeleportSP_Destnode6.Value = false; } if (TeleportSP_Destnode8.Value) { TeleportToLocation("Destnode8", inCar); TeleportSP_Destnode8.Value = false; } if (TeleportSP_Destnode7.Value) { TeleportToLocation("Destnode7", inCar); TeleportSP_Destnode7.Value = false; } if (TeleportSP_EZBakery.Value) { TeleportToLocation("EZ Bakery", inCar); TeleportSP_EZBakery.Value = false; } if (TeleportSP_EasyPizza.Value) { TeleportToLocation("Easy Pizza", inCar); TeleportSP_EasyPizza.Value = false; } if (TeleportSP_EasyDepot.Value) { TeleportToLocation("Easy Depot", inCar); TeleportSP_EasyDepot.Value = false; } if (TeleportSP_EZCafe.Value) { TeleportToLocation("EZ Cafe", inCar); TeleportSP_EZCafe.Value = false; } if (TeleportSP_Destnode10.Value) { TeleportToLocation("Destnode10", inCar); TeleportSP_Destnode10.Value = false; } if (TeleportSP_Destnode9.Value) { TeleportToLocation("Destnode9", inCar); TeleportSP_Destnode9.Value = false; } if (TeleportSP_EasyEats.Value) { TeleportToLocation("Easy Eats", inCar); TeleportSP_EasyEats.Value = false; } if (TeleportSP_EasyFlowers.Value) { TeleportToLocation("Easy Flowers", inCar); TeleportSP_EasyFlowers.Value = false; } if (TeleportSP_EZAuto.Value) { TeleportToLocation("EZ Auto", inCar); TeleportSP_EZAuto.Value = false; } if (TeleportSP_EZMart.Value) { TeleportToLocation("EZ Mart", inCar); TeleportSP_EZMart.Value = false; } if (TeleportSP_PawnShop.Value) { TeleportToLocation("Pawn Shop", inCar); TeleportSP_PawnShop.Value = false; } } } private void TeleportToLocation(string locationName, bool inCar) { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: 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_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: 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_0136: Unknown result type (might be due to invalid IL or missing references) sMapNode[] array = Object.FindObjectsOfType(); sMapNode val = null; sMapNode[] array2 = array; foreach (sMapNode val2 in array2) { if (((Object)((Component)val2).gameObject).name.Equals(locationName, StringComparison.OrdinalIgnoreCase)) { val = val2; break; } } if ((Object)(object)val == (Object)null) { Debug.LogWarning((object)("Could not find map node: " + locationName)); return; } Vector3 position = ((Component)val).transform.position; position.y += 2f; if (inCar) { sCarController val3 = Object.FindObjectOfType(); if ((Object)(object)val3 != (Object)null && (Object)(object)val3.rb != (Object)null) { val3.rb.velocity = Vector3.zero; val3.rb.angularVelocity = Vector3.zero; ((Component)val3).transform.position = position; val3.rb.position = position; Quaternion rotation = Quaternion.Euler(0f, ((Component)val3).transform.eulerAngles.y, 0f); ((Component)val3).transform.rotation = rotation; val3.rb.rotation = rotation; sPathFinder val4 = Object.FindObjectOfType(); if ((Object)(object)val4 != (Object)null) { FieldInfo field = typeof(sPathFinder).GetField("currentNode", BindingFlags.Instance | BindingFlags.NonPublic); if (field != null) { field.SetValue(val4, val); } } } } else { sCharacterController val5 = Object.FindObjectOfType(); if ((Object)(object)val5 != (Object)null) { ((Component)val5).transform.position = position; Rigidbody component = ((Component)val5).GetComponent(); if ((Object)(object)component != (Object)null) { component.velocity = Vector3.zero; component.angularVelocity = Vector3.zero; } } } sCameraController val6 = Object.FindObjectOfType(); if ((Object)(object)val6 != (Object)null) { ((Component)val6).transform.position = position; } sHUD val7 = Object.FindObjectOfType(); if ((Object)(object)val7 != (Object)null) { val7.DipToBlack(0f); } } private void TeleportAfterDelay(sCharacterController player, Vector3 position, float delay) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) _pendingTeleport = new DelayedTeleport { player = player, position = position, time = Time.time + delay }; } private void ApplyExtras() { //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) DesktopDotExe val = cachedDesktop; if ((Object)(object)val != (Object)null && val.files != null) { if (!fileVisibilityInitialized) { originalFileVisibility.Clear(); foreach (File file in val.files) { if (file != null) { originalFileVisibility[file] = file.visible; } } fileVisibilityInitialized = true; } if (ShowAllExes != null && ShowAllExes.Value) { foreach (File file2 in val.files) { if (file2 != null) { file2.visible = true; } } } else if (fileVisibilityInitialized) { foreach (File file3 in val.files) { if (file3 != null && originalFileVisibility.ContainsKey(file3)) { file3.visible = originalFileVisibility[file3]; } } } if (DraggableIcons != null) { val.drag = DraggableIcons.Value; } } else { fileVisibilityInitialized = false; } if (ShowLocation != null && ShowLocation.Value) { jobBoard val2 = cachedJobBoard; sPathFinder val3 = cachedNavigation; if ((Object)(object)val2 != (Object)null && (Object)(object)val3 != (Object)null && (Object)(object)val3.car != (Object)null) { Vector3 position = ((Component)val3.car).transform.position; bool flag = Vector3.Dot(((Component)val3.car).transform.forward, Vector3.right) < 0f; val2.NewMapIcon("You", position, 0, 32, 16, 16, 0.5f, 10f, flag, false); } } } private void ApplyPerfectTraction(sCarController car) { if ((Object)(object)car == (Object)null || car.wheels == null) { return; } try { Type nestedType = ((object)car).GetType().GetNestedType("Wheel", BindingFlags.Public); if (nestedType == null) { return; } FieldInfo field = nestedType.GetField("maxFrictionForce", BindingFlags.Instance | BindingFlags.Public); if (field == null) { return; } Wheel[] wheels = car.wheels; foreach (Wheel val in wheels) { if (val != null) { if (!baseMaxFrictionForce.ContainsKey(val)) { float value = (float)field.GetValue(val); baseMaxFrictionForce[val] = value; } if (PerfectTraction.Value) { float num = baseMaxFrictionForce[val]; field.SetValue(val, num * 3f); } else { field.SetValue(val, baseMaxFrictionForce[val]); } } } } catch { } } private void ApplyGraphicsSettings() { int num = ((Vsync != null && Vsync.Value) ? 1 : 0); int num2 = CalculateTargetFPS(); if (_cachedVsyncCount != num || _cachedFPSTarget != num2 || !_fpsSettingsApplied) { if (Vsync != null && Vsync.Value) { QualitySettings.vSyncCount = 1; Application.targetFrameRate = -1; } else { QualitySettings.vSyncCount = 0; Application.targetFrameRate = num2; } _cachedVsyncCount = num; _cachedFPSTarget = num2; _fpsSettingsApplied = true; } } private int CalculateTargetFPS() { int num = ((FPSAmount != null) ? FPSAmount.Value : 0); if (num <= 0) { return 60; } if (num >= 10) { return -1; } int[] array = new int[9] { 75, 90, 120, 144, 165, 240, 300, 360, 480 }; int num2 = Mathf.Clamp(num - 1, 0, array.Length - 1); return array[num2]; } private void EnforceFPSSettings() { int num = ((Vsync != null && Vsync.Value) ? 1 : 0); int num2 = CalculateTargetFPS(); bool flag = QualitySettings.vSyncCount != num; bool flag2 = Application.targetFrameRate != num2; if (flag || flag2) { if (Vsync != null && Vsync.Value) { if (flag) { QualitySettings.vSyncCount = 1; } if (flag2) { Application.targetFrameRate = -1; } } else { if (flag) { QualitySettings.vSyncCount = 0; } if (flag2) { Application.targetFrameRate = num2; } } _cachedVsyncCount = num; _cachedFPSTarget = num2; } else { _fpsSettingsApplied = true; } } private void ConfigSettingChanged(object sender, EventArgs e) { //IL_0298: Unknown result type (might be due to invalid IL or missing references) ConfigEntry val = sender as ConfigEntry; ConfigEntry val2 = sender as ConfigEntry; ConfigEntry val3 = sender as ConfigEntry; if (val2 != null && val2 == FPSAmount) { _fpsSettingsApplied = false; ApplyGraphicsSettings(); } else { if (val == null) { return; } if (val == UnlockAll && val.Value) { EasyDeliveryMenu(); } else if (val == SnowyPeaks && val.Value) { UnlockSingleAchievement("ACH_SNOWYPEAKS", "snowy peaks"); } else if (val == FishingTown && val.Value) { UnlockSingleAchievement("ACH_FISHINGTOWN", "fishing town"); } else if (val == DuctTape && val.Value) { UnlockSingleAchievement("ACH_TAPE", "duct tape"); } else if (val == Tea && val.Value) { UnlockSingleAchievement("ACH_TEA", "tea"); } else if (val == Fish && val.Value) { UnlockSingleAchievement("ACH_FISH", "fish"); } else if (val == RadioTowers && val.Value) { UnlockSingleAchievement("ACH_RADIOTOWERS", "radio towers"); } else if (val == Reboot && val.Value) { UnlockSingleAchievement("ACH_REBOOT", "reboot"); } else if (val == Shutdown && val.Value) { UnlockSingleAchievement("ACH_SHUTDOWN", "shutdown"); } else if (val == Restore && val.Value) { UnlockSingleAchievement("ACH_RESTORE", "restore"); } else if (val == Snowcats && val.Value) { UnlockSingleAchievement("ACH_SNOWCATS", "snowcats"); } else if (val == Birds && val.Value) { UnlockSingleAchievement("ACH_BIRDS", "birds"); } else if (val == Vsync || val == ShowFPS || val == NoPixelRendering) { _fpsSettingsApplied = false; ApplyGraphicsSettings(); if (val == NoPixelRendering) { currentRes = default(Resolution); FixPixelRendering(); } } } } private static void CreateNewRenderTexture(Camera cam) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) try { if ((Object)(object)cam == (Object)null || (Object)(object)cam.targetTexture == (Object)null) { return; } if ((Object)(object)defaultRT == (Object)null) { defaultRT = cam.targetTexture; } Resolution currentResolution = Screen.currentResolution; int width = ((Resolution)(ref currentResolution)).width; currentResolution = Screen.currentResolution; int height = ((Resolution)(ref currentResolution)).height; if ((Object)(object)newRT != (Object)null && ((Texture)newRT).width == width && ((Texture)newRT).height == height) { return; } if (((Texture)defaultRT).width == width && ((Texture)defaultRT).height == height) { newRT = defaultRT; return; } if ((Object)(object)newRT != (Object)null && (Object)(object)newRT != (Object)(object)defaultRT) { newRT.Release(); } newRT = new RenderTexture(width, height, defaultRT.depth); newRT.format = defaultRT.format; newRT.antiAliasing = defaultRT.antiAliasing; ((Texture)newRT).filterMode = ((Texture)defaultRT).filterMode; newRT.Create(); } catch { } } private static void CreateNewRearViewRenderTexture(Camera cam) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Expected O, but got Unknown //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) try { if ((Object)(object)cam == (Object)null || (Object)(object)cam.targetTexture == (Object)null) { return; } if ((Object)(object)defaultRearViewRT == (Object)null) { defaultRearViewRT = cam.targetTexture; } Resolution currentResolution = Screen.currentResolution; int num = (int)((float)((Resolution)(ref currentResolution)).width / 4.5f); currentResolution = Screen.currentResolution; int num2 = (int)((float)((Resolution)(ref currentResolution)).height / 8f); if ((Object)(object)newRearViewRT != (Object)null && ((Texture)newRearViewRT).width == num && ((Texture)newRearViewRT).height == num2) { return; } if (((Texture)defaultRearViewRT).width == num && ((Texture)defaultRearViewRT).height == num2) { newRearViewRT = defaultRearViewRT; return; } if ((Object)(object)newRearViewRT != (Object)null && (Object)(object)newRearViewRT != (Object)(object)defaultRearViewRT) { newRearViewRT.Release(); } newRearViewRT = new RenderTexture(num, num2, defaultRearViewRT.depth); newRearViewRT.format = defaultRearViewRT.format; newRearViewRT.antiAliasing = defaultRearViewRT.antiAliasing; ((Texture)newRearViewRT).filterMode = ((Texture)defaultRearViewRT).filterMode; newRearViewRT.Create(); } catch { } } private static bool ResolutionActuallyChanged() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) Resolution currentResolution = Screen.currentResolution; bool result = _cachedResWidth != ((Resolution)(ref currentResolution)).width || _cachedResHeight != ((Resolution)(ref currentResolution)).height || _cachedResRefreshRate != ((Resolution)(ref currentResolution)).refreshRate; _cachedResWidth = ((Resolution)(ref currentResolution)).width; _cachedResHeight = ((Resolution)(ref currentResolution)).height; _cachedResRefreshRate = ((Resolution)(ref currentResolution)).refreshRate; return result; } private static void FixPixelRendering() { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) try { if ((Object)(object)mainCamera == (Object)null || (Object)(object)screenMR == (Object)null) { return; } bool flag = NoPixelRendering != null && NoPixelRendering.Value; bool flag2 = ResolutionActuallyChanged(); bool flag3 = flag != _lastNoPixelRendering || !_pixelRenderingInitialized; if (!flag2 && !flag3) { return; } currentRes = Screen.currentResolution; resWidthRatio = (float)((Resolution)(ref currentRes)).width / 456f; resHeightRatio = (float)((Resolution)(ref currentRes)).height / 256f; if (flag2) { CreateNewRenderTexture(mainCamera); if ((Object)(object)rearViewCamera != (Object)null) { CreateNewRearViewRenderTexture(rearViewCamera); } } if (flag) { if ((Object)(object)newRT != (Object)null && (Object)(object)screenMR != (Object)null && (Object)(object)mainCamera != (Object)null) { ((Renderer)screenMR).material.mainTexture = (Texture)(object)newRT; mainCamera.targetTexture = newRT; } if ((Object)(object)rearViewCamera != (Object)null && (Object)(object)rearViewMR != (Object)null && (Object)(object)newRearViewRT != (Object)null) { rearViewCamera.targetTexture = newRearViewRT; ((Renderer)rearViewMR).material.mainTexture = (Texture)(object)newRearViewRT; } } else { if ((Object)(object)defaultRT != (Object)null && (Object)(object)screenMR != (Object)null && (Object)(object)mainCamera != (Object)null) { ((Renderer)screenMR).material.mainTexture = (Texture)(object)defaultRT; mainCamera.targetTexture = defaultRT; } if ((Object)(object)rearViewCamera != (Object)null && (Object)(object)rearViewMR != (Object)null && (Object)(object)defaultRearViewRT != (Object)null) { rearViewCamera.targetTexture = defaultRearViewRT; ((Renderer)rearViewMR).material.mainTexture = (Texture)(object)defaultRearViewRT; } } _lastNoPixelRendering = flag; _pixelRenderingInitialized = true; } catch { } } private void InitializeEnvironmentBaseValues() { try { sDayNightCycle val = Object.FindObjectOfType(); if ((Object)(object)val != (Object)null) { if (_baseWeatherSpeed < 0f) { _baseWeatherSpeed = val.weatherSpeed; } if (_baseDayDuration < 0f) { _baseDayDuration = val.dayDuration; } } if (_baseWeatherSpeed < 0f) { _baseWeatherSpeed = 0.01f; } if (_baseDayDuration < 0f) { _baseDayDuration = 60f; } } catch { } } private void ApplyEnvironment() { if (!_envInitialized) { InitializeEnvironmentBaseValues(); _envInitialized = true; } ApplyNoFog(); ApplyTimeControls(); sDayNightCycle val = cachedDayNightCycle; if ((Object)(object)val != (Object)null) { if (!_randomWeatherInitialized) { RandomWeather.Value = true; val.randomWeather = true; val.SetRandomWeather(); _randomWeatherInitialized = true; _lastRandomWeather = true; } else { bool value = RandomWeather.Value; if (_lastRandomWeather != value) { if (value) { val.randomWeather = true; val.SetRandomWeather(); } else { val.randomWeather = false; sWeatherSystem val2 = cachedWeatherSystem; if ((Object)(object)val2 != (Object)null) { _manualWeatherIntensity = val2.intensity; FieldInfo field = typeof(sDayNightCycle).GetField("weatherTarget", BindingFlags.Instance | BindingFlags.NonPublic); if (field != null && field.GetValue(val) is float manualWeatherTarget) { _manualWeatherTarget = manualWeatherTarget; } _suppressEnvWrites = true; if (WeatherIntensity != null) { WeatherIntensity.Value = Mathf.RoundToInt(_manualWeatherIntensity * 10f); } if (WeatherCycle != null) { WeatherCycle.Value = Mathf.RoundToInt(_manualWeatherTarget * 10f); } _suppressEnvWrites = false; } } _lastRandomWeather = value; } else { val.randomWeather = value; } } } ApplyManualWeather(); ApplyWeatherSpeed(); } private void ApplyManualWeather() { try { sDayNightCycle val = cachedDayNightCycle; sWeatherSystem val2 = cachedWeatherSystem; if ((Object)(object)val == (Object)null || (Object)(object)val2 == (Object)null) { return; } if (!RandomWeather.Value) { bool flag = Time.unscaledTime < _weatherIntensityUserUntil; bool flag2 = Time.unscaledTime < _weatherUserUntil; if (flag && WeatherIntensity != null) { _manualWeatherIntensity = Mathf.Clamp01((float)WeatherIntensity.Value / 10f); } if (flag2 && WeatherCycle != null) { _manualWeatherTarget = Mathf.Clamp01((float)WeatherCycle.Value / 10f); } val2.intensity = _manualWeatherIntensity; FieldInfo field = typeof(sDayNightCycle).GetField("weatherTarget", BindingFlags.Instance | BindingFlags.NonPublic); if (field != null) { field.SetValue(val, _manualWeatherTarget); } } else if (Time.frameCount % 30 == 0) { _suppressEnvWrites = true; if (WeatherIntensity != null) { WeatherIntensity.Value = Mathf.RoundToInt(val2.intensity * 10f); } FieldInfo field2 = typeof(sDayNightCycle).GetField("weatherTarget", BindingFlags.Instance | BindingFlags.NonPublic); if (field2 != null && WeatherCycle != null && field2.GetValue(val) is float num) { WeatherCycle.Value = Mathf.RoundToInt(Mathf.Clamp01(num) * 10f); } _suppressEnvWrites = false; } } catch { } } private void ApplyWeatherIntensity() { try { sWeatherSystem val = cachedWeatherSystem; if ((Object)(object)val == (Object)null) { return; } if (_manualWeatherControl) { if (Time.unscaledTime < _weatherIntensityUserUntil) { _lastSetWeatherIntensity = (val.intensity = Mathf.Clamp01((float)((WeatherIntensity != null) ? WeatherIntensity.Value : 0) / 10f)); return; } if (_lastSetWeatherIntensity >= 0f) { val.intensity = _lastSetWeatherIntensity; return; } _lastSetWeatherIntensity = val.intensity; if (WeatherIntensity != null) { _suppressEnvWrites = true; WeatherIntensity.Value = Mathf.RoundToInt(val.intensity * 10f); _suppressEnvWrites = false; } } else if (Time.frameCount % 30 == 0 && WeatherIntensity != null) { _suppressEnvWrites = true; WeatherIntensity.Value = Mathf.RoundToInt(val.intensity * 10f); _suppressEnvWrites = false; } } catch { } } private void ApplyWeatherCycle() { try { sDayNightCycle val = cachedDayNightCycle; if ((Object)(object)val == (Object)null) { return; } FieldInfo field = typeof(sDayNightCycle).GetField("weatherTarget", BindingFlags.Instance | BindingFlags.NonPublic); if (field == null) { return; } if (_manualWeatherControl) { if (Time.unscaledTime < _weatherUserUntil) { float num = Mathf.Clamp01((float)((WeatherCycle != null) ? WeatherCycle.Value : 0) / 10f); field.SetValue(val, num); _lastSetWeatherCycle = num; } else if (_lastSetWeatherCycle >= 0f) { field.SetValue(val, _lastSetWeatherCycle); } else if (field.GetValue(val) is float num2) { _lastSetWeatherCycle = num2; if (WeatherCycle != null) { _suppressEnvWrites = true; WeatherCycle.Value = Mathf.RoundToInt(Mathf.Clamp01(num2) * 10f); _suppressEnvWrites = false; } } } else if (Time.frameCount % 30 == 0 && field.GetValue(val) is float num3 && WeatherCycle != null) { _suppressEnvWrites = true; WeatherCycle.Value = Mathf.RoundToInt(Mathf.Clamp01(num3) * 10f); _suppressEnvWrites = false; } } catch { } } private void ApplyWeatherSpeed() { try { sDayNightCycle val = cachedDayNightCycle; if ((Object)(object)val == (Object)null) { return; } if (FreezeWeather != null && FreezeWeather.Value) { val.weatherSpeed = 0f; return; } int num = ((SpeedUpWeather != null) ? SpeedUpWeather.Value : 0); if (num == 0) { val.weatherSpeed = _baseWeatherSpeed; return; } float num2 = Mathf.Pow(2f, (float)Mathf.Abs(num)); if (num > 0) { val.weatherSpeed = _baseWeatherSpeed * num2; } else { val.weatherSpeed = _baseWeatherSpeed / num2; } } catch { } } private void ApplyNoFog() { try { bool flag = NoFog != null && NoFog.Value; RenderSettings.fog = !flag; } catch { } } private void ApplyTimeControls() { try { sDayNightCycle val = Object.FindObjectOfType(); if ((Object)(object)val == (Object)null) { return; } if ((Object)(object)_lastDayNightCycle != (Object)(object)val) { _lastDayNightCycle = val; _baseDayDuration = -1f; _lastSpeedUpTime = 0; _lastReverseTime = false; _timeInitialized = false; } FieldInfo field = typeof(sDayNightCycle).GetField("doTime", BindingFlags.Instance | BindingFlags.Public); FieldInfo field2 = typeof(sDayNightCycle).GetField("time", BindingFlags.Instance | BindingFlags.Public); FieldInfo field3 = typeof(sDayNightCycle).GetField("dayDuration", BindingFlags.Instance | BindingFlags.Public); if (field == null || field2 == null || field3 == null) { return; } if (_baseDayDuration < 0f && field3.GetValue(val) is float num) { _baseDayDuration = Mathf.Abs(num); } if (_teleportFreezeTime || (FreezeTime != null && FreezeTime.Value)) { field.SetValue(val, false); return; } field.SetValue(val, true); if (SyncTime != null && SyncTime.Value) { DateTime now = DateTime.Now; float num2 = (float)now.Hour + (float)now.Minute / 60f + (float)now.Second / 3600f; float num3 = num2 / 24f; field2.SetValue(val, num3); _timeInitialized = true; } else if (Time.unscaledTime < _timeUserUntil && ChangeTime != null) { float num4 = Mathf.Clamp(ChangeTime.Value, 0f, 24f); float num5 = num4 / 24f; field2.SetValue(val, num5); _timeInitialized = true; } else if (!_timeInitialized && ChangeTime != null) { object value = field2.GetValue(val); if (value is float num6) { _suppressEnvWrites = true; ChangeTime.Value = num6 * 24f; _suppressEnvWrites = false; _timeInitialized = true; } else if (_timeInitialized && Time.frameCount % 0 == 0 && ChangeTime != null && Time.unscaledTime > _timeUserUntil) { object value2 = field2.GetValue(val); if (value is float num7) { _suppressEnvWrites = true; ChangeTime.Value = num7 * 24f; _suppressEnvWrites = false; } } } if (field2.GetValue(val) is float num8) { if (num8 < 0f) { field2.SetValue(val, num8 + 1f); } else if (num8 > 1f) { field2.SetValue(val, num8 - 1f); } } int num9 = ((SpeedUpTime != null) ? SpeedUpTime.Value : 0); bool flag = ReverseTime != null && ReverseTime.Value; if (num9 == _lastSpeedUpTime && flag == _lastReverseTime) { return; } _lastSpeedUpTime = num9; _lastReverseTime = flag; if (num9 != 0 || flag) { float num10 = Mathf.Pow(2f, (float)num9); if (flag) { float num11 = (0f - _baseDayDuration) / num10; field3.SetValue(val, num11); } else { float num12 = _baseDayDuration / num10; field3.SetValue(val, num12); } } else { field3.SetValue(val, _baseDayDuration); } } catch { } } private void InitializeAdditionalSettings() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Expected O, but got Unknown //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Expected O, but got Unknown //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Expected O, but got Unknown //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Expected O, but got Unknown //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Expected O, but got Unknown //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Expected O, but got Unknown //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Expected O, but got Unknown //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Expected O, but got Unknown //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Expected O, but got Unknown //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Expected O, but got Unknown //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Expected O, but got Unknown //IL_0424: Unknown result type (might be due to invalid IL or missing references) //IL_042e: Expected O, but got Unknown //IL_0468: Unknown result type (might be due to invalid IL or missing references) //IL_0472: Expected O, but got Unknown //IL_04ac: Unknown result type (might be due to invalid IL or missing references) //IL_04b6: Expected O, but got Unknown //IL_04ec: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: Expected O, but got Unknown //IL_052c: Unknown result type (might be due to invalid IL or missing references) //IL_0536: Expected O, but got Unknown VehicleColor = ((BaseUnityPlugin)this).Config.Bind("Vehicle", "Color", -1, new ConfigDescription("The color of the vehicle", (AcceptableValueBase)(object)new AcceptableValueRange(-1, 5), new object[1] { new ConfigurationManagerAttributes { Order = 175 } })); BobbleheadIndex = ((BaseUnityPlugin)this).Config.Bind("Vehicle", "Bobbleheads", -1, new ConfigDescription("Change what bobblehead is displayed in your car", (AcceptableValueBase)(object)new AcceptableValueRange(-1, 12), new object[1] { new ConfigurationManagerAttributes { Order = 174 } })); HeadCosmetic = ((BaseUnityPlugin)this).Config.Bind("Player", "Head cosmetic", -1, new ConfigDescription("Your head cosmetic", (AcceptableValueBase)(object)new AcceptableValueRange(-1, 5), new object[1] { new ConfigurationManagerAttributes { Order = 163 } })); BodyCosmetic = ((BaseUnityPlugin)this).Config.Bind("Player", "Body cosmetic", -1, new ConfigDescription("Your body cosmetic", (AcceptableValueBase)(object)new AcceptableValueRange(-1, 3), new object[1] { new ConfigurationManagerAttributes { Order = 162 } })); FogColor = ((BaseUnityPlugin)this).Config.Bind("Environment", "World color", 0, new ConfigDescription("Change the color of the world", (AcceptableValueBase)(object)new AcceptableValueRange(0, 10), new object[1] { new ConfigurationManagerAttributes { Order = 139 } })); FireSpreadSpeed = ((BaseUnityPlugin)this).Config.Bind("Environment", "Fire spread", 1f, new ConfigDescription("Speed of fire spread", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 10f), new object[1] { new ConfigurationManagerAttributes { Order = 149 } })); FireIntensityMultiplier = ((BaseUnityPlugin)this).Config.Bind("Environment", "Fire intensity", 1f, new ConfigDescription("How intense fire is", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 10f), new object[1] { new ConfigurationManagerAttributes { Order = 148 } })); FireDamageMultiplier = ((BaseUnityPlugin)this).Config.Bind("Environment", "Fire damage", 1f, new ConfigDescription("How much damage fire does", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 10f), new object[1] { new ConfigurationManagerAttributes { Order = 147 } })); DaylightAmount = ((BaseUnityPlugin)this).Config.Bind("Environment", "Daylight amount", 1f, new ConfigDescription("Change how dark or light the sky is", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 2f), new object[1] { new ConfigurationManagerAttributes { Order = 146 } })); DarknessAmount = ((BaseUnityPlugin)this).Config.Bind("Environment", "Darkness amount", 1f, new ConfigDescription("Control how dark the world gets, day or night", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 2f), new object[1] { new ConfigurationManagerAttributes { Order = 145 } })); NoIceCrack = ((BaseUnityPlugin)this).Config.Bind("Environment", "No ice crack", false, new ConfigDescription("Toggle off ice cracking under you", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 144 } })); NoRoadSigns = ((BaseUnityPlugin)this).Config.Bind("Environment", "No road signs", false, new ConfigDescription("Toggle off road signs for extra challenge!", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 143 } })); NoWindSounds = ((BaseUnityPlugin)this).Config.Bind("Environment", "No wind sounds", false, new ConfigDescription("Toggle off wind sounds during snow", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 142 } })); NoStreetlights = ((BaseUnityPlugin)this).Config.Bind("Environment", "No streetlights", false, new ConfigDescription("Toggle off all streetlights for darkness", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 141 } })); MaxRenderDistance = ((BaseUnityPlugin)this).Config.Bind("Camera & Visuals", "Max render distance", false, new ConfigDescription("See the entire world for what it is", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 172 } })); Shaders = ((BaseUnityPlugin)this).Config.Bind("Camera & Visuals", "Shaders", false, new ConfigDescription("More realistic lighting. WARNING! Toggling off this feature may result in broken lighting and other broken features. To fix this just restart the game!", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 171 } })); RainbowMode = ((BaseUnityPlugin)this).Config.Bind("Extras", "Rainbow Meowza RGB 1000", false, new ConfigDescription("R A I N B O W :3", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 7 } })); NoWarnings = ((BaseUnityPlugin)this).Config.Bind("Extras", "No warnings", false, new ConfigDescription("Toggle off warning signs in HUD", (AcceptableValueBase)null, new object[1] { new ConfigurationManagerAttributes { Order = 5 } })); VehicleColor.SettingChanged += OnVehicleColorChanged; BobbleheadIndex.SettingChanged += OnBobbleheadChanged; HeadCosmetic.SettingChanged += OnCosmeticChanged; BodyCosmetic.SettingChanged += OnCosmeticChanged; RainbowMode.SettingChanged += OnRainbowModeChanged; NoStreetlights.SettingChanged += OnStreetlightsChanged; NoIceCrack.SettingChanged += OnEnvironmentSettingChanged; NoRoadSigns.SettingChanged += OnEnvironmentSettingChanged; NoWindSounds.SettingChanged += OnEnvironmentSettingChanged; FogColor.SettingChanged += OnEnvironmentSettingChanged; FireSpreadSpeed.SettingChanged += OnEnvironmentSettingChanged; FireIntensityMultiplier.SettingChanged += OnEnvironmentSettingChanged; FireDamageMultiplier.SettingChanged += OnEnvironmentSettingChanged; Shaders.SettingChanged += OnShadersChanged; MaxRenderDistance.SettingChanged += OnMaxRenderDistanceChanged; } private void OnVehicleColorChanged(object sender, EventArgs e) { if (rainbowModeActive) { rainbowModeActive = false; if (RainbowMode != null) { RainbowMode.Value = false; } } ApplyVehicleColorDirect(); } private void OnCosmeticChanged(object sender, EventArgs e) { ApplyPlayerCosmetics(); } private void OnBobbleheadChanged(object sender, EventArgs e) { ApplyBobblehead(); } private void OnRainbowModeChanged(object sender, EventArgs e) { if (RainbowMode == null) { return; } bool value = RainbowMode.Value; if (value == rainbowModeActive) { return; } rainbowModeActive = value; if (!rainbowModeActive) { if (VehicleColor != null) { ApplyVehicleColorDirect(); } } else { rainbowColorIndex = 0; rainbowTimer = 0f; } } private void OnStreetlightsChanged(object sender, EventArgs e) { if (NoStreetlights != null && !NoStreetlights.Value) { RestoreStreetlights(); } } private void OnEnvironmentSettingChanged(object sender, EventArgs e) { environmentCacheTimer = 2f; } private void OnShadersChanged(object sender, EventArgs e) { if (Shaders != null) { if (Shaders.Value) { EnableShaders(); } else { DisableShaders(); } } } private void OnMaxRenderDistanceChanged(object sender, EventArgs e) { if (MaxRenderDistance != null) { ApplyMaxRenderDistance(); } } private void ApplyMaxRenderDistance() { try { Camera main = Camera.main; if ((Object)(object)main != (Object)null) { if (MaxRenderDistance != null && MaxRenderDistance.Value) { main.farClipPlane = 50000f; } else { main.farClipPlane = 1000f; } } } catch (Exception) { } } private static void CreateStarParticles(float nightFactor) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Expected O, but got Unknown //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_053d: 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) //IL_0552: Unknown result type (might be due to invalid IL or missing references) //IL_0574: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_059e: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) try { if (!starsCreated) { int num = 2000; nightStarParticles = (GameObject[])(object)new GameObject[num]; starBrightnesses = new float[num]; starBaseColors = (Color[])(object)new Color[num]; nightStarCount = num; starPropertyBlock = new MaterialPropertyBlock(); colorPropertyID = Shader.PropertyToID("_Color"); tintColorPropertyID = Shader.PropertyToID("_TintColor"); Camera main = Camera.main; if ((Object)(object)main == (Object)null) { return; } Color white = default(Color); for (int i = 0; i < num; i++) { GameObject val = GameObject.CreatePrimitive((PrimitiveType)0); ((Object)val).name = "NightStar_" + i; val.layer = 0; float num2 = 1200f; float num3 = (float)sparkleRandom.NextDouble() * (float)Math.PI * 2f; float num4 = Mathf.Acos(2f * (float)sparkleRandom.NextDouble() - 1f); float num5 = num2 * Mathf.Sin(num4) * Mathf.Cos(num3); float num6 = num2 * Mathf.Cos(num4); float num7 = num2 * Mathf.Sin(num4) * Mathf.Sin(num3); val.transform.position = new Vector3(num5, num6, num7); float num8 = Mathf.Lerp(7f, 10f, (float)sparkleRandom.NextDouble()); val.transform.localScale = Vector3.one * num8; Renderer component = val.GetComponent(); if ((Object)(object)component != (Object)null) { Shader val2 = Shader.Find("Particles/Standard Unlit"); if ((Object)(object)val2 == (Object)null) { val2 = Shader.Find("Mobile/Particles/Additive"); } if ((Object)(object)val2 == (Object)null) { val2 = Shader.Find("Sprites/Default"); } if ((Object)(object)val2 == (Object)null) { val2 = Shader.Find("UI/Default"); } Material val3 = new Material(((Object)(object)val2 != (Object)null) ? val2 : component.material.shader); starBrightnesses[i] = Mathf.Lerp(1.5f, 3f, (float)sparkleRandom.NextDouble()); float num9 = (float)sparkleRandom.NextDouble(); if (num9 < 0.7f) { white = Color.white; } else if (num9 < 0.85f) { ((Color)(ref white))..ctor(1f, 0.95f, 0.9f); } else { ((Color)(ref white))..ctor(0.9f, 0.95f, 1f); } starBaseColors[i] = white; val3.SetInt("_SrcBlend", 5); val3.SetInt("_DstBlend", 10); val3.SetInt("_ZWrite", 0); val3.EnableKeyword("_ALPHABLEND_ON"); val3.renderQueue = 3000; white.a = 0f; val3.SetColor(colorPropertyID, white * starBrightnesses[i]); if (val3.HasProperty(tintColorPropertyID)) { val3.SetColor(tintColorPropertyID, white * starBrightnesses[i]); } val3.SetInt("_ZTest", 8); component.material = val3; component.shadowCastingMode = (ShadowCastingMode)0; component.receiveShadows = false; component.lightProbeUsage = (LightProbeUsage)0; } Collider component2 = val.GetComponent(); if ((Object)(object)component2 != (Object)null) { Object.Destroy((Object)(object)component2); } nightStarParticles[i] = val; } starsCreated = true; } if (nightStarParticles == null) { return; } sDayNightCycle val4 = Object.FindObjectOfType(); float a = 0f; if ((Object)(object)val4 != (Object)null) { float time = val4.time; float num10 = 19f / 24f; float num11 = 11f / 48f; float num12 = 5f / 48f; float num13 = 1f / 12f; if (time >= num10 || time <= num11) { if (time >= num10) { float num14 = time - num10; a = Mathf.Clamp01(num14 / num12); } else { float num15 = num11 - time; a = ((!(num15 <= num13)) ? 1f : Mathf.Clamp01(num15 / num13)); } } else { a = 0f; } } for (int j = 0; j < nightStarParticles.Length; j++) { if (!((Object)(object)nightStarParticles[j] != (Object)null)) { continue; } Renderer component3 = nightStarParticles[j].GetComponent(); if ((Object)(object)component3 != (Object)null && (Object)(object)component3.material != (Object)null) { float num16 = 1f; starUpdateTimer += Time.deltaTime; if (starUpdateTimer >= 0.1f && j % 60 == Time.frameCount % 60) { num16 = Mathf.Lerp(0.9f, 1.1f, (float)sparkleRandom.NextDouble()); } Color val5 = starBaseColors[j] * (starBrightnesses[j] * num16); val5.a = a; component3.GetPropertyBlock(starPropertyBlock); starPropertyBlock.SetColor(colorPropertyID, val5); if (component3.material.HasProperty(tintColorPropertyID)) { starPropertyBlock.SetColor(tintColorPropertyID, val5); } component3.SetPropertyBlock(starPropertyBlock); } } if (starUpdateTimer >= 0.1f) { starUpdateTimer = 0f; } } catch (Exception) { } } private static void DestroyStarParticles() { if (nightStarParticles == null) { return; } GameObject[] array = nightStarParticles; foreach (GameObject val in array) { if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } nightStarParticles = null; nightStarCount = 0; starsCreated = false; starBrightnesses = null; starBaseColors = null; } public void EnableShaders() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: 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_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Invalid comparison between Unknown and I4 //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Invalid comparison between Unknown and I4 //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Invalid comparison between Unknown and I4 //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_029f: 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_046c: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) try { shadersEnabled = true; originalFogColor = RenderSettings.fogColor; originalAmbientLight = RenderSettings.ambientLight; originalSkybox = RenderSettings.skybox; originalShadowDistance = QualitySettings.shadowDistance; originalShadowProjection = QualitySettings.shadowProjection; originalShadowNearPlaneOffset = QualitySettings.shadowNearPlaneOffset; originalReflectionIntensity = RenderSettings.reflectionIntensity; originalAmbientIntensity = RenderSettings.ambientIntensity; originalFogEnabled = RenderSettings.fog; originalFogMode = RenderSettings.fogMode; originalFogDensity = RenderSettings.fogDensity; originalAmbientMode = RenderSettings.ambientMode; originalAmbientSkyColor = RenderSettings.ambientSkyColor; originalAmbientEquatorColor = RenderSettings.ambientEquatorColor; originalAmbientGroundColor = RenderSettings.ambientGroundColor; QualitySettings.shadowDistance = 2000f; QualitySettings.shadowProjection = (ShadowProjection)1; QualitySettings.shadowNearPlaneOffset = 1f; RenderSettings.fog = true; RenderSettings.fogMode = (FogMode)3; RenderSettings.fogDensity = 0.003f; Color val = default(Color); ((Color)(ref val))..ctor(0.85f, 0.9f, 0.98f); Color val2 = default(Color); ((Color)(ref val2))..ctor(0.95f, 0.96f, 1f); RenderSettings.fogColor = val; RenderSettings.ambientLight = val2 * 0.75f; RenderSettings.ambientMode = (AmbientMode)1; RenderSettings.ambientSkyColor = new Color(0.88f, 0.92f, 1f); RenderSettings.ambientEquatorColor = new Color(0.78f, 0.82f, 0.88f); RenderSettings.ambientGroundColor = new Color(0.92f, 0.94f, 0.98f); sceneLights = Object.FindObjectsOfType(); originalLightIntensities.Clear(); originalLightColors.Clear(); Light[] array = sceneLights; Color val4 = default(Color); Color val5 = default(Color); foreach (Light val3 in array) { if ((Object)(object)val3 != (Object)null) { originalLightIntensities[val3] = val3.intensity; originalLightColors[val3] = val3.color; val3.shadows = (LightShadows)2; if ((int)val3.type == 1) { val3.color = new Color(1f, 0.98f, 0.95f); val3.intensity *= 2f; val3.shadowStrength = 1f; val3.shadowBias = 0f; val3.shadowNormalBias = 0f; val3.shadowNearPlane = 0.1f; val3.cullingMask = -1; } else if ((int)val3.type == 2) { ((Color)(ref val4))..ctor(1f, 0.92f, 0.8f); val3.color = Color.Lerp(val3.color, val4, 0.3f); val3.intensity *= 1.5f; val3.shadowStrength = 1f; val3.shadowBias = 0f; val3.shadowNormalBias = 0f; val3.range *= 2f; } else if ((int)val3.type == 0) { ((Color)(ref val5))..ctor(1f, 0.92f, 0.8f); val3.color = Color.Lerp(val3.color, val5, 0.3f); val3.intensity *= 1.5f; val3.shadowStrength = 1f; val3.shadowBias = 0f; val3.shadowNormalBias = 0f; } } } RenderSettings.ambientIntensity = 0.9f; RenderSettings.reflectionIntensity = 2f; RenderSettings.reflectionBounces = 2; reflectionProbes = Object.FindObjectsOfType(); ReflectionProbe[] array2 = reflectionProbes; foreach (ReflectionProbe val6 in array2) { if ((Object)(object)val6 != (Object)null) { val6.mode = (ReflectionProbeMode)1; val6.refreshMode = (ReflectionProbeRefreshMode)1; val6.timeSlicingMode = (ReflectionProbeTimeSlicingMode)0; val6.intensity = 2f; val6.importance = 3; val6.resolution = 512; val6.hdr = true; val6.shadowDistance = 2000f; val6.clearFlags = (ReflectionProbeClearFlags)1; } } Camera main = Camera.main; if ((Object)(object)main != (Object)null) { main.clearFlags = (CameraClearFlags)1; main.backgroundColor = val; UniversalAdditionalCameraData universalAdditionalCameraData = main.GetUniversalAdditionalCameraData(); if ((Object)(object)universalAdditionalCameraData != (Object)null) { universalAdditionalCameraData.renderPostProcessing = true; universalAdditionalCameraData.antialiasing = (AntialiasingMode)2; universalAdditionalCameraData.antialiasingQuality = (AntialiasingQuality)2; } } originalShadowCastingModes.Clear(); originalReceiveShadows.Clear(); ApplyForcedShadows(); ApplyShadowsToAllCars(); sDayNightCycle val7 = Object.FindObjectOfType(); if ((Object)(object)val7 != (Object)null) { val7.oldLighting = false; } EnhanceCarParticles(enhance: true); CreateStarParticles(1f); DynamicGI.UpdateEnvironment(); } catch (Exception) { } } private static void ApplyForcedShadows() { //IL_0086: Unknown result type (might be due to invalid IL or missing references) try { rendererCacheTimer += Time.deltaTime; if (cachedAllRenderers == null || rendererCacheTimer >= 5f) { rendererCacheTimer = 0f; cachedAllRenderers = Object.FindObjectsOfType(true); } Renderer[] array = cachedAllRenderers; foreach (Renderer val in array) { if ((Object)(object)val != (Object)null) { if (!originalShadowCastingModes.ContainsKey(val)) { originalShadowCastingModes[val] = val.shadowCastingMode; } if (!originalReceiveShadows.ContainsKey(val)) { originalReceiveShadows[val] = val.receiveShadows; } val.shadowCastingMode = (ShadowCastingMode)1; val.receiveShadows = true; val.allowOcclusionWhenDynamic = false; val.reflectionProbeUsage = (ReflectionProbeUsage)1; val.lightProbeUsage = (LightProbeUsage)1; val.motionVectorGenerationMode = (MotionVectorGenerationMode)2; } } } catch { } } private static void ApplyShadowsToAllCars() { try { sCarController[] array = Object.FindObjectsOfType(); sCarController[] array2 = array; foreach (sCarController val in array2) { if ((Object)(object)val != (Object)null) { ApplyShadowsToCarRecursive(((Component)val).gameObject); } } } catch { } } private static void ApplyShadowsToCarRecursive(GameObject obj) { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown if ((Object)(object)obj == (Object)null) { return; } Renderer component = obj.GetComponent(); if ((Object)(object)component != (Object)null) { component.shadowCastingMode = (ShadowCastingMode)1; component.receiveShadows = true; component.allowOcclusionWhenDynamic = false; component.reflectionProbeUsage = (ReflectionProbeUsage)1; component.lightProbeUsage = (LightProbeUsage)1; } foreach (Transform item in obj.transform) { Transform val = item; ApplyShadowsToCarRecursive(((Component)val).gameObject); } } private static void EnhanceCarParticles(bool enhance) { try { sCarController[] array = Object.FindObjectsOfType(); sCarController[] array2 = array; foreach (sCarController val in array2) { if ((Object)(object)val == (Object)null || val.wheels == null) { continue; } Wheel[] wheels = val.wheels; foreach (Wheel val2 in wheels) { if (val2 != null) { EnhanceParticleSystem(val2.dustParticles, enhance, 2.5f, 1.5f); EnhanceParticleSystem(val2.skidParticles, enhance, 2f, 1.3f); EnhanceParticleSystem(val2.snowSkidParticles, enhance, 2.5f, 1.5f); EnhanceParticleSystem(val2.snowTireParticles, enhance, 2f, 1.3f); } } } if (!enhance) { originalParticleRates.Clear(); originalParticleLifetimes.Clear(); } } catch { } } private static void EnhanceParticleSystem(ParticleSystem ps, bool enhance, float rateMultiplier, float lifetimeMultiplier) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)ps == (Object)null) { return; } try { EmissionModule emission = ps.emission; MainModule main = ps.main; if (enhance) { if (!originalParticleRates.ContainsKey(ps)) { originalParticleRates[ps] = ((EmissionModule)(ref emission)).rateOverDistanceMultiplier; } if (!originalParticleLifetimes.ContainsKey(ps)) { originalParticleLifetimes[ps] = ((MainModule)(ref main)).startLifetimeMultiplier; } ((EmissionModule)(ref emission)).rateOverDistanceMultiplier = originalParticleRates[ps] * rateMultiplier; ((MainModule)(ref main)).startLifetimeMultiplier = originalParticleLifetimes[ps] * lifetimeMultiplier; ShapeModule shape = ps.shape; ((ShapeModule)(ref shape)).radiusSpread = 5f; ((MainModule)(ref main)).startSizeMultiplier = ((MainModule)(ref main)).startSizeMultiplier * 0.7f; VelocityOverLifetimeModule velocityOverLifetime = ps.velocityOverLifetime; ((VelocityOverLifetimeModule)(ref velocityOverLifetime)).enabled = true; ((VelocityOverLifetimeModule)(ref velocityOverLifetime)).space = (ParticleSystemSimulationSpace)0; } else { if (originalParticleRates.ContainsKey(ps)) { ((EmissionModule)(ref emission)).rateOverDistanceMultiplier = originalParticleRates[ps]; } if (originalParticleLifetimes.ContainsKey(ps)) { ((MainModule)(ref main)).startLifetimeMultiplier = originalParticleLifetimes[ps]; } } } catch { } } public void DisableShaders() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Invalid comparison between Unknown and I4 //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) try { shadersEnabled = false; if ((Object)(object)originalSkybox != (Object)null) { RenderSettings.skybox = originalSkybox; } RenderSettings.fogColor = originalFogColor; RenderSettings.ambientLight = originalAmbientLight; RenderSettings.ambientIntensity = originalAmbientIntensity; RenderSettings.reflectionIntensity = originalReflectionIntensity; RenderSettings.reflectionBounces = 1; RenderSettings.ambientMode = originalAmbientMode; RenderSettings.ambientSkyColor = originalAmbientSkyColor; RenderSettings.ambientEquatorColor = originalAmbientEquatorColor; RenderSettings.ambientGroundColor = originalAmbientGroundColor; RenderSettings.fog = originalFogEnabled; RenderSettings.fogMode = originalFogMode; RenderSettings.fogDensity = originalFogDensity; QualitySettings.shadowDistance = originalShadowDistance; QualitySettings.shadowProjection = originalShadowProjection; QualitySettings.shadowNearPlaneOffset = originalShadowNearPlaneOffset; foreach (KeyValuePair originalLightIntensity in originalLightIntensities) { if ((Object)(object)originalLightIntensity.Key != (Object)null) { originalLightIntensity.Key.intensity = originalLightIntensity.Value; if ((int)originalLightIntensity.Key.type == 1) { originalLightIntensity.Key.shadowStrength = 1f; originalLightIntensity.Key.shadowBias = 0.05f; originalLightIntensity.Key.shadowNormalBias = 0.4f; } } } foreach (KeyValuePair originalLightColor in originalLightColors) { if ((Object)(object)originalLightColor.Key != (Object)null) { originalLightColor.Key.color = originalLightColor.Value; } } if (reflectionProbes != null) { ReflectionProbe[] array = reflectionProbes; foreach (ReflectionProbe val in array) { if ((Object)(object)val != (Object)null) { val.intensity = 1f; val.importance = 1; val.refreshMode = (ReflectionProbeRefreshMode)0; } } } foreach (KeyValuePair originalShadowCastingMode in originalShadowCastingModes) { if ((Object)(object)originalShadowCastingMode.Key != (Object)null) { originalShadowCastingMode.Key.shadowCastingMode = originalShadowCastingMode.Value; } } foreach (KeyValuePair originalReceiveShadow in originalReceiveShadows) { if ((Object)(object)originalReceiveShadow.Key != (Object)null) { originalReceiveShadow.Key.receiveShadows = originalReceiveShadow.Value; } } DestroyStarParticles(); EnhanceCarParticles(enhance: false); DynamicGI.UpdateEnvironment(); originalLightIntensities.Clear(); originalLightColors.Clear(); originalShadowCastingModes.Clear(); originalReceiveShadows.Clear(); reflectionProbes = null; sceneLights = null; } catch (Exception) { } } private void OnShaderCleanup() { if (shadersEnabled) { DisableShaders(); } DestroyStarParticles(); cachedFireSpreads = null; cachedFireIntensities = null; cachedFireDamages = null; cachedIceCracks = null; cachedRoadSigns = null; cachedAmbiance = null; cachedAllRenderers = null; baseFireSpreadRates.Clear(); baseFireDamageRates.Clear(); originalLightIntensities.Clear(); originalLightColors.Clear(); originalShadowCastingModes.Clear(); originalReceiveShadows.Clear(); originalParticleRates.Clear(); originalParticleLifetimes.Clear(); starsCreated = false; shadersEnabled = false; } private void UpdateShaders() { //IL_010c: 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_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0148: 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_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016a: 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_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018a: 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_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: 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_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0200: 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_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: 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_030d: Invalid comparison between Unknown and I4 //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) if (!shadersEnabled) { return; } try { shaderTimer += Time.deltaTime; float num = 0.6f; float num2 = (Mathf.Sin(shaderTimer * num) + 1f) * 0.5f; sDayNightCycle val = Object.FindObjectOfType(); float num3 = 1f; if ((Object)(object)val != (Object)null) { float time = val.time; num3 = 1f - Mathf.Abs(time * 2f - 1f); num3 = Mathf.Pow(num3, 2f); float num4 = 1f - num3; num4 = Mathf.Pow(num4, 1.5f); sparkleTimer += Time.deltaTime; if (sparkleTimer > 5f) { sparkleTimer = 0f; CreateStarParticles(num4); } Color val2 = default(Color); ((Color)(ref val2))..ctor(0.01f, 0.02f, 0.05f); Color val3 = default(Color); ((Color)(ref val3))..ctor(0.75f, 0.88f, 1f); Color val4 = Color.Lerp(val3, val2, num4); RenderSettings.ambientSkyColor = Color.Lerp(val4, val4 * 1.05f, num2 * 0.15f); Color val5 = Color.Lerp(new Color(0.75f, 0.85f, 1f), new Color(0.005f, 0.01f, 0.03f), num4); Color val6 = val5 * 1.05f; Color fogColor = Color.Lerp(val5, val6, num2 * 0.12f); RenderSettings.fogColor = fogColor; float num5 = ((DarknessAmount != null) ? DarknessAmount.Value : 1f); Color val7 = new Color(0.95f, 0.96f, 1f) * 0.75f; Color val8 = new Color(0.05f, 0.08f, 0.15f) * 0.15f; Color val9 = Color.Lerp(val7, val8, num4) * num5; Color val10 = val9 * 1.03f; RenderSettings.ambientLight = Color.Lerp(val9, val10, num2 * 0.08f); float num6 = 2f + Mathf.Sin(shaderTimer * 0.4f) * 0.2f; RenderSettings.reflectionIntensity = num6 * Mathf.Max(0.1f, num3); Color val11 = default(Color); ((Color)(ref val11))..ctor(0.78f, 0.82f, 0.88f); Color val12 = default(Color); ((Color)(ref val12))..ctor(0.03f, 0.05f, 0.08f); RenderSettings.ambientEquatorColor = Color.Lerp(val11, val12, num4); Color val13 = default(Color); ((Color)(ref val13))..ctor(0.92f, 0.94f, 0.98f); Color val14 = default(Color); ((Color)(ref val14))..ctor(0.02f, 0.03f, 0.06f); RenderSettings.ambientGroundColor = Color.Lerp(val13, val14, num4); if (sceneLights != null) { Light[] array = sceneLights; Color val16 = default(Color); Color val17 = default(Color); foreach (Light val15 in array) { if ((Object)(object)val15 != (Object)null && (int)val15.type == 1) { float num7 = Mathf.Sin(shaderTimer * 0.3f) * 0.04f; if (originalLightIntensities.ContainsKey(val15)) { val15.intensity = (originalLightIntensities[val15] * 1.2f + num7) * Mathf.Max(0.05f, num3); } val15.shadows = (LightShadows)2; val15.shadowStrength = Mathf.Lerp(1f, 0.95f, num3); ((Color)(ref val16))..ctor(1f, 0.98f, 0.95f); ((Color)(ref val17))..ctor(0.3f, 0.35f, 0.4f); val15.color = Color.Lerp(val16, val17, num4); } } } if (reflectionProbes != null) { ReflectionProbe[] array2 = reflectionProbes; foreach (ReflectionProbe val18 in array2) { if ((Object)(object)val18 != (Object)null) { val18.intensity = 2f * Mathf.Max(0.1f, num3); } } } } shadowUpdateTimer += Time.deltaTime; if (shadowUpdateTimer >= 1f) { shadowUpdateTimer = 0f; ApplyForcedShadows(); } } catch { } } private void RefreshEnvironmentCache() { environmentCacheTimer += Time.deltaTime; if (!(environmentCacheTimer < 2f)) { environmentCacheTimer = 0f; if (cachedFireSpreads == null || cachedFireSpreads.Length == 0) { cachedFireSpreads = Object.FindObjectsOfType(); } if (cachedFireIntensities == null || cachedFireIntensities.Length == 0) { cachedFireIntensities = Object.FindObjectsOfType(); } if (cachedFireDamages == null || cachedFireDamages.Length == 0) { cachedFireDamages = Object.FindObjectsOfType(); } if (cachedIceCracks == null || cachedIceCracks.Length == 0) { cachedIceCracks = Object.FindObjectsOfType(); } if (cachedRoadSigns == null || cachedRoadSigns.Length == 0) { cachedRoadSigns = Object.FindObjectsOfType(); } if ((Object)(object)cachedAmbiance == (Object)null) { cachedAmbiance = Object.FindObjectOfType(); } } } private void RestoreStreetlights() { try { DaylightSensor[] array = Object.FindObjectsOfType(true); DaylightSensor[] array2 = array; foreach (DaylightSensor val in array2) { if (!((Object)(object)val != (Object)null)) { continue; } if (val.nightTime != null) { GameObject[] nightTime = val.nightTime; foreach (GameObject val2 in nightTime) { if ((Object)(object)val2 != (Object)null) { val2.SetActive(true); } } } if (val.dayTime == null) { continue; } GameObject[] dayTime = val.dayTime; foreach (GameObject val3 in dayTime) { if ((Object)(object)val3 != (Object)null) { val3.SetActive(true); } } } LightToggle[] array3 = Object.FindObjectsOfType(true); LightToggle[] array4 = array3; foreach (LightToggle val4 in array4) { if ((Object)(object)val4 != (Object)null && (Object)(object)val4.toToggle != (Object)null) { val4.toToggle.SetActive(true); } } } catch (Exception) { } } private void UpdateAdditionalToggles() { if (!cosmeticsInitialized) { cosmeticInfo = Object.FindObjectOfType(); if ((Object)(object)cosmeticInfo != (Object)null) { cosmeticsInitialized = true; } } RefreshEnvironmentCache(); UpdateRainbowMode(); UpdateShaders(); if (VehicleColor != null && currentVehicleColor != VehicleColor.Value) { ApplyVehicleColorDirect(); } if ((HeadCosmetic != null && currentHeadCosmetic != HeadCosmetic.Value) || (BodyCosmetic != null && currentBodyCosmetic != BodyCosmetic.Value)) { ApplyPlayerCosmetics(); } if (BobbleheadIndex != null && currentBobblehead != BobbleheadIndex.Value) { ApplyBobblehead(); } ApplyFireControls(); ApplyEnvironmentControls(); } private void UpdateRainbowMode() { if (!rainbowModeActive) { rainbowTimer = 0f; return; } rainbowTimer += Time.deltaTime; if (rainbowTimer >= 0.2f) { rainbowTimer = 0f; rainbowColorIndex = (rainbowColorIndex + 1) % 6; ApplyVehicleColor(rainbowColorIndex, fromRainbow: true); } } private void ApplyVehicleColorDirect() { if (VehicleColor != null) { int value = VehicleColor.Value; ApplyVehicleColor(value, fromRainbow: false); } } private void ApplyVehicleColor(int colorValue, bool fromRainbow) { try { if (!fromRainbow) { currentVehicleColor = colorValue; } if ((Object)(object)cosmeticInfo == (Object)null) { cosmeticInfo = Object.FindObjectOfType(); } if ((Object)(object)cosmeticInfo == (Object)null || cosmeticInfo.cosmetics == null) { return; } if (colorValue == -1) { cosmeticInfo.SetPlayerEquiped(-1, (Type)2); sCosmeticAppearance[] array = Object.FindObjectsOfType(); sCosmeticAppearance[] array2 = array; foreach (sCosmeticAppearance val in array2) { if ((Object)(object)val != (Object)null && val.usePlayerEquiped) { val.SetAppearance(); } } return; } int num = colorValue + 6; if (num >= 0 && num < cosmeticInfo.cosmetics.Length) { Info val2 = cosmeticInfo.cosmetics[num]; if (!val2.unlocked) { cosmeticInfo.UnlockCosmetic(num); } cosmeticInfo.SetPlayerEquiped(num, (Type)2); } } catch (Exception) { } } private void ApplyPlayerCosmetics() { try { if ((Object)(object)cosmeticInfo == (Object)null) { cosmeticInfo = Object.FindObjectOfType(); } if ((Object)(object)cosmeticInfo == (Object)null || cosmeticInfo.cosmetics == null) { return; } if (HeadCosmetic != null) { int num = (currentHeadCosmetic = HeadCosmetic.Value); if (num >= 0) { int num2 = FindCosmeticByTypeAndPosition((Type)0, num); if (num2 >= 0) { if (!cosmeticInfo.cosmetics[num2].unlocked) { cosmeticInfo.UnlockCosmetic(num2); } cosmeticInfo.SetPlayerEquiped(num2, (Type)0); } } else { cosmeticInfo.SetPlayerEquiped(-1, (Type)0); } } if (BodyCosmetic == null) { return; } int num3 = (currentBodyCosmetic = BodyCosmetic.Value); if (num3 >= 0) { int num4 = FindCosmeticByTypeAndPosition((Type)1, num3); if (num4 >= 0) { if (!cosmeticInfo.cosmetics[num4].unlocked) { cosmeticInfo.UnlockCosmetic(num4); } cosmeticInfo.SetPlayerEquiped(num4, (Type)1); } } else { cosmeticInfo.SetPlayerEquiped(-1, (Type)1); } } catch (Exception) { } } private void ApplyBobblehead() { try { if (BobbleheadIndex == null) { return; } int num = (currentBobblehead = BobbleheadIndex.Value); SnowcatManager val = Object.FindObjectOfType(); if (!((Object)(object)val != (Object)null)) { return; } if (num >= 0 && num < val.bobbles.Length) { if (val.snowcatsActive != null && num < val.snowcatsActive.Length && !val.snowcatsActive[num]) { val.snowcatsActive[num] = true; MethodInfo method = typeof(SnowcatManager).GetMethod("SaveSnowcatData", BindingFlags.Instance | BindingFlags.NonPublic); if (method != null) { method.Invoke(val, null); } MethodInfo method2 = typeof(SnowcatManager).GetMethod("SetBobbleTexture", BindingFlags.Instance | BindingFlags.NonPublic); if (method2 != null && (Object)(object)val.bobbles[num] != (Object)null) { method2.Invoke(val, new object[2] { num, val.bobbles[num] }); } } MethodInfo method3 = typeof(SnowcatManager).GetMethod("SetDisplayBobble", BindingFlags.Instance | BindingFlags.NonPublic); if (method3 != null) { method3.Invoke(val, new object[1] { num }); } } else if (num == -1) { MethodInfo method4 = typeof(SnowcatManager).GetMethod("SetDisplayBobble", BindingFlags.Instance | BindingFlags.NonPublic); if (method4 != null) { method4.Invoke(val, new object[1] { -1 }); } } } catch (Exception) { } } private int FindCosmeticByTypeAndPosition(Type type, int position) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)cosmeticInfo == (Object)null || cosmeticInfo.cosmetics == null) { return -1; } int num = 0; for (int i = 0; i < cosmeticInfo.cosmetics.Length; i++) { if (cosmeticInfo.cosmetics[i].type == type) { if (num == position) { return i; } num++; } } return -1; } private void ApplyFireControls() { try { if (FireSpreadSpeed == null || FireIntensityMultiplier == null || FireDamageMultiplier == null) { return; } float value = FireSpreadSpeed.Value; float value2 = FireIntensityMultiplier.Value; float value3 = FireDamageMultiplier.Value; bool flag = !Mathf.Approximately(value, lastFireSpreadSpeed); bool flag2 = !Mathf.Approximately(value2, lastFireIntensity); bool flag3 = !Mathf.Approximately(value3, lastFireDamage); if (flag) { lastFireSpreadSpeed = value; if (cachedFireSpreads != null) { FireSpread[] array = cachedFireSpreads; foreach (FireSpread val in array) { if ((Object)(object)val != (Object)null) { if (!baseFireSpreadRates.ContainsKey(val)) { baseFireSpreadRates[val] = val.fireSpreadRate; } val.fireSpreadRate = baseFireSpreadRates[val] / Mathf.Max(0.1f, value); } } } } if (flag2) { lastFireIntensity = value2; } if (!flag3) { return; } lastFireDamage = value3; if (cachedFireDamages == null) { return; } FireDamage[] array2 = cachedFireDamages; foreach (FireDamage val2 in array2) { if (!((Object)(object)val2 != (Object)null)) { continue; } FieldInfo field = typeof(FireDamage).GetField("ratePerFire", BindingFlags.Instance | BindingFlags.NonPublic); if (field != null) { if (!baseFireDamageRates.ContainsKey(val2)) { baseFireDamageRates[val2] = (float)field.GetValue(val2); } field.SetValue(val2, baseFireDamageRates[val2] * value3); } } } catch (Exception) { } } private void ApplyEnvironmentControls() { try { int num = ((FogColor != null) ? FogColor.Value : 0); bool flag = NoIceCrack != null && NoIceCrack.Value; bool flag2 = NoRoadSigns != null && NoRoadSigns.Value; bool flag3 = NoWindSounds != null && NoWindSounds.Value; if (num != lastFogColor) { lastFogColor = num; } if (flag != lastNoIceCrack) { lastNoIceCrack = flag; if (cachedIceCracks != null) { IceCrack[] array = cachedIceCracks; foreach (IceCrack val in array) { if ((Object)(object)val != (Object)null) { ((Behaviour)val).enabled = !flag; } } } } if (flag2 != lastNoRoadSigns) { lastNoRoadSigns = flag2; if (cachedRoadSigns != null) { RoadSign[] array2 = cachedRoadSigns; foreach (RoadSign val2 in array2) { if ((Object)(object)val2 != (Object)null) { ((Behaviour)val2).enabled = !flag2; } } } } if (flag3 != lastNoWindSounds) { lastNoWindSounds = flag3; if ((Object)(object)cachedAmbiance != (Object)null) { cachedAmbiance.volume = (flag3 ? 0f : 1f); } } } catch (Exception) { } } private static IEnumerator ToggleShadersButton() { Shaders.Value = false; yield return (object)new WaitForSeconds(0.2f); Shaders.Value = true; } } public static class CameraExtensions { public static UniversalAdditionalCameraData GetUniversalAdditionalCameraData(this Camera camera) { return ((Component)camera).GetComponent(); } } [BepInPlugin("soup.easydelivery.mintmenu", "Easy Delivery Menu Config Manager", "1.8.4")] public class MintMenu : BaseUnityPlugin { private class PluginSettings { public string PluginName; public bool Collapsed; public List Settings; public Dictionary> SettingsBySection; public string CachedCollapsedButtonText; public string CachedExpandedButtonText; public void CacheSettingsBySection() { SettingsBySection = (from s in Settings group s by s.Section).ToDictionary((IGrouping g) => g.Key, (IGrouping g) => g.ToList()); CachedCollapsedButtonText = "▶ " + PluginName; CachedExpandedButtonText = "▼ " + PluginName; } } private class SettingInfo { public string Key; public string Section; public ConfigEntryBase Entry; public string CachedDescription; public Type CachedSettingType; public object CachedAcceptableRange; } private static readonly Color MINT = new Color(0f, 0.87f, 0.68f, 1f); private static readonly Color MINT_DARK = new Color(0f, 0.65f, 0.5f, 1f); private static readonly Color MINT_LIGHT = new Color(0.4f, 1f, 0.9f, 1f); private static readonly Color MINT_BG = new Color(0.05f, 0.15f, 0.13f, 0.98f); private ManualLogSource log; private bool menuVisible = false; private bool needsSettingsRefresh = true; private Rect windowRect; private Vector2 scrollPos = Vector2.zero; private List allPluginSettings = new List(); private Texture2D mintTexture; private Texture2D darkTexture; private Texture2D buttonTexture; private Texture2D tooltipTexture; private Texture2D mintLightTexture; private Texture2D sectionHeaderTexture; private Texture2D sectionHeaderActiveTexture; private Texture2D boxBackgroundTexture; private Texture2D invisibleTexture; private Texture2D textFieldTexture; private Texture2D textFieldFocusedTexture; private GUIStyle windowStyle; private GUIStyle headerStyle; private GUIStyle labelStyle; private GUIStyle buttonStyle; private GUIStyle toggleStyle; private GUIStyle textFieldStyle; private GUIStyle boxStyle; private GUIStyle tooltipStyle; private GUIStyle sectionHeaderStyle; private bool stylesInitialized = false; private Dictionary cachedGUIContent = new Dictionary(); private Dictionary cachedDefaultValues = new Dictionary(); private GUILayoutOption width150; private GUILayoutOption width60; private GUILayoutOption width80; private GUILayoutOption width100; private GUILayoutOption width120; private GUILayoutOption width35; private GUILayoutOption expandWidth; private GUILayoutOption expandHeight; private const string STR_ON = "ON"; private const string STR_OFF = "OFF"; private const string STR_RESET = "RESET"; private const string STR_CLOSE = "✕ Close Menu"; private const string STR_ARROW_DOWN = "▼"; private const string STR_ARROW_RIGHT = "▶"; private const string STR_SECTION_ARROW_DOWN = "▼ "; private const string STR_SECTION_ARROW_RIGHT = "▶ "; private Vector2 lastMousePos; private string cachedTooltip = ""; private Rect cachedTooltipRect; private bool tooltipNeedsUpdate = false; private Dictionary sectionCollapsedStates = new Dictionary(); private Dictionary tooltipHeightCache = new Dictionary(); private Dictionary intStringCache = new Dictionary(); private Dictionary floatStringCache = new Dictionary(); private Dictionary sectionCollapsedButtonCache = new Dictionary(); private Dictionary sectionExpandedButtonCache = new Dictionary(); private StringBuilder keyBuilder = new StringBuilder(256); private bool settingsLoaded = false; private bool _priorCursorVisible = true; private CursorLockMode _priorCursorLockState = (CursorLockMode)0; private void Awake() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) log = ((BaseUnityPlugin)this).Logger; log.LogInfo((object)"╔════════════════════════════════════╗"); log.LogInfo((object)"║ Easy Delivery Menu LOADED! :3 ║"); log.LogInfo((object)"║ Press ~ or ` to open menu ║"); log.LogInfo((object)"╚════════════════════════════════════╝"); windowRect = new Rect(0f, 0f, 450f, (float)Screen.height); CreateTextures(); InitializeLayoutOptions(); } private void InitializeLayoutOptions() { width150 = GUILayout.Width(150f); width60 = GUILayout.Width(60f); width80 = GUILayout.Width(80f); width100 = GUILayout.Width(100f); width120 = GUILayout.Width(120f); width35 = GUILayout.Width(35f); expandWidth = GUILayout.ExpandWidth(true); expandHeight = GUILayout.ExpandHeight(true); } private void Update() { //IL_00b3: 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_0080: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown((KeyCode)96)) { menuVisible = !menuVisible; if (menuVisible) { ((Rect)(ref windowRect)).width = 450f; ((Rect)(ref windowRect)).height = Screen.height; ((Rect)(ref windowRect)).x = 0f; ((Rect)(ref windowRect)).y = 0f; _priorCursorVisible = Cursor.visible; _priorCursorLockState = Cursor.lockState; if (!settingsLoaded) { RefreshSettings(); settingsLoaded = true; } } else { Cursor.visible = _priorCursorVisible; Cursor.lockState = _priorCursorLockState; cachedGUIContent.Clear(); tooltipNeedsUpdate = false; } } if (menuVisible && ((Rect)(ref windowRect)).height != (float)Screen.height) { ((Rect)(ref windowRect)).height = Screen.height; } } private void LateUpdate() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Invalid comparison between Unknown and I4 if (menuVisible && (int)Cursor.lockState > 0) { Cursor.lockState = (CursorLockMode)0; } } private void OnGUI() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Invalid comparison between Unknown and I4 //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Invalid comparison between Unknown and I4 //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) if (menuVisible) { if (!stylesInitialized) { InitializeStyles(); stylesInitialized = true; } if ((int)Event.current.type == 7 && Time.frameCount % 3 == 0 && lastMousePos != Event.current.mousePosition) { lastMousePos = Event.current.mousePosition; tooltipNeedsUpdate = true; } if ((int)Event.current.type == 7 && !Cursor.visible) { Cursor.visible = true; } GUI.Window(12345, windowRect, new WindowFunction(DrawMenuWindow), "Easy Delivery Menu", windowStyle); } } private void DrawMenuWindow(int windowID) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Invalid comparison between Unknown and I4 //IL_00d1: Unknown result type (might be due to invalid IL or missing references) GUILayout.BeginVertical(Array.Empty()); scrollPos = GUILayout.BeginScrollView(scrollPos, false, true, (GUILayoutOption[])(object)new GUILayoutOption[1] { expandHeight }); int count = allPluginSettings.Count; for (int i = 0; i < count; i++) { DrawPlugin(allPluginSettings[i]); } GUILayout.Space(20f); GUILayout.EndScrollView(); DrawFooter(); GUILayout.EndVertical(); if ((int)Event.current.type == 7 && !string.IsNullOrEmpty(GUI.tooltip)) { if (tooltipNeedsUpdate) { UpdateTooltipCache(); tooltipNeedsUpdate = false; } if (!string.IsNullOrEmpty(cachedTooltip)) { GUI.Box(cachedTooltipRect, cachedTooltip, tooltipStyle); } } } private void UpdateTooltipCache() { //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) cachedTooltip = GUI.tooltip; if (!string.IsNullOrEmpty(cachedTooltip)) { GUIContent orCreateGUIContent = GetOrCreateGUIContent(cachedTooltip, ""); float num = 400f; if (!tooltipHeightCache.TryGetValue(cachedTooltip, out var value)) { value = tooltipStyle.CalcHeight(orCreateGUIContent, num) + 10f; tooltipHeightCache[cachedTooltip] = value; } float num2 = ((lastMousePos.x + num > ((Rect)(ref windowRect)).width) ? (((Rect)(ref windowRect)).width - num) : lastMousePos.x); float num3 = ((lastMousePos.y + 25f + value > ((Rect)(ref windowRect)).height) ? (lastMousePos.y - value) : (lastMousePos.y + 25f)); cachedTooltipRect = new Rect(num2, num3, num, value); } } private void DrawFooter() { //IL_0050: Unknown result type (might be due to invalid IL or missing references) GUILayout.BeginHorizontal(boxStyle, Array.Empty()); GUILayout.FlexibleSpace(); if (GUILayout.Button("✕ Close Menu", buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { width120 })) { menuVisible = false; Cursor.visible = _priorCursorVisible; Cursor.lockState = _priorCursorLockState; } GUILayout.EndHorizontal(); } private void DrawPlugin(PluginSettings plugin) { if (plugin.PluginName == "EasyDeliveryMenu") { Dictionary> settingsBySection = plugin.SettingsBySection; { foreach (KeyValuePair> item in settingsBySection) { if (!string.IsNullOrEmpty(item.Key)) { string key = plugin.PluginName + "." + item.Key; if (!sectionCollapsedStates.ContainsKey(key)) { sectionCollapsedStates[key] = false; } if (!sectionCollapsedButtonCache.ContainsKey(key)) { sectionCollapsedButtonCache[key] = "▶ " + item.Key; sectionExpandedButtonCache[key] = "▼ " + item.Key; } GUILayout.BeginVertical(boxStyle, Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); string text = (sectionCollapsedStates[key] ? sectionCollapsedButtonCache[key] : sectionExpandedButtonCache[key]); if (GUILayout.Button(text, sectionHeaderStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { expandWidth })) { sectionCollapsedStates[key] = !sectionCollapsedStates[key]; } GUILayout.EndHorizontal(); if (!sectionCollapsedStates[key]) { int count = item.Value.Count; for (int i = 0; i < count; i++) { DrawSetting(item.Value[i]); } } GUILayout.EndVertical(); GUILayout.Space(5f); } else { int count2 = item.Value.Count; for (int j = 0; j < count2; j++) { DrawSetting(item.Value[j]); } } } return; } } GUILayout.BeginVertical(boxStyle, Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); string text2 = (plugin.Collapsed ? plugin.CachedCollapsedButtonText : plugin.CachedExpandedButtonText); if (GUILayout.Button(text2, headerStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { expandWidth })) { plugin.Collapsed = !plugin.Collapsed; } GUILayout.EndHorizontal(); if (!plugin.Collapsed) { GUILayout.Space(5f); Dictionary> settingsBySection2 = plugin.SettingsBySection; foreach (KeyValuePair> item2 in settingsBySection2) { if (!string.IsNullOrEmpty(item2.Key)) { string key2 = plugin.PluginName + "." + item2.Key; if (!sectionCollapsedStates.ContainsKey(key2)) { sectionCollapsedStates[key2] = false; } if (!sectionCollapsedButtonCache.ContainsKey(key2)) { sectionCollapsedButtonCache[key2] = "▶ " + item2.Key; sectionExpandedButtonCache[key2] = "▼ " + item2.Key; } GUILayout.BeginHorizontal(Array.Empty()); string text3 = (sectionCollapsedStates[key2] ? sectionCollapsedButtonCache[key2] : sectionExpandedButtonCache[key2]); if (GUILayout.Button(text3, sectionHeaderStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { expandWidth })) { sectionCollapsedStates[key2] = !sectionCollapsedStates[key2]; } GUILayout.EndHorizontal(); if (!sectionCollapsedStates[key2]) { int count3 = item2.Value.Count; for (int k = 0; k < count3; k++) { DrawSetting(item2.Value[k]); } } } else { int count4 = item2.Value.Count; for (int l = 0; l < count4; l++) { DrawSetting(item2.Value[l]); } } GUILayout.Space(3f); } } GUILayout.EndVertical(); GUILayout.Space(5f); } private void DrawSetting(SettingInfo setting) { //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) GUILayout.BeginHorizontal(Array.Empty()); GUIContent orCreateGUIContent = GetOrCreateGUIContent(setting.Key, setting.CachedDescription); GUILayout.Label(orCreateGUIContent, labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { width150 }); try { Type cachedSettingType = setting.CachedSettingType; if (cachedSettingType == typeof(bool)) { DrawBoolSetting(setting); } else if (cachedSettingType == typeof(int)) { DrawIntSetting(setting); } else if (cachedSettingType == typeof(float)) { DrawFloatSetting(setting); } else if (cachedSettingType == typeof(string)) { DrawStringSetting(setting); } else if (cachedSettingType == typeof(KeyCode)) { GUILayout.Label(((object)(KeyCode)setting.Entry.BoxedValue/*cast due to .constrained prefix*/).ToString(), labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { width80 }); } else { string text = setting.Entry.BoxedValue?.ToString() ?? "null"; GUILayout.Label(text, labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { width120 }); } GUILayout.FlexibleSpace(); if (GUILayout.Button("RESET", buttonStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { width60 })) { ResetSettingToDefault(setting); } } catch (Exception ex) { GUILayout.Label("Error: " + ex.Message, labelStyle, Array.Empty()); } GUILayout.EndHorizontal(); } private void DrawBoolSetting(SettingInfo setting) { bool flag = (bool)setting.Entry.BoxedValue; bool flag2 = GUILayout.Toggle(flag, flag ? "ON" : "OFF", toggleStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { width60 }); if (flag2 != flag) { setting.Entry.BoxedValue = flag2; } } private void DrawIntSetting(SettingInfo setting) { if (setting.CachedAcceptableRange is AcceptableValueRange val) { int num = (int)setting.Entry.BoxedValue; float num2 = GUILayout.HorizontalSlider((float)num, (float)val.MinValue, (float)val.MaxValue, (GUILayoutOption[])(object)new GUILayoutOption[1] { width100 }); int num3 = Mathf.RoundToInt(num2); if (!intStringCache.TryGetValue(num3, out var value)) { value = num3.ToString(); intStringCache[num3] = value; } GUILayout.Label(value, labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { width35 }); if (num3 != num) { setting.Entry.BoxedValue = num3; } } else { string text = setting.Entry.BoxedValue.ToString(); string text2 = GUILayout.TextField(text, textFieldStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { width80 }); if (text2 != text && int.TryParse(text2, out var result)) { setting.Entry.BoxedValue = result; } } } private void DrawFloatSetting(SettingInfo setting) { if (setting.CachedAcceptableRange is AcceptableValueRange val) { float num = (float)setting.Entry.BoxedValue; float num2 = GUILayout.HorizontalSlider(num, val.MinValue, val.MaxValue, (GUILayoutOption[])(object)new GUILayoutOption[1] { width100 }); if (!floatStringCache.TryGetValue(num2, out var value)) { value = num2.ToString("F2"); floatStringCache[num2] = value; } GUILayout.Label(value, labelStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { width35 }); if (Math.Abs(num2 - num) > 0.001f) { setting.Entry.BoxedValue = num2; } } else { string text = setting.Entry.BoxedValue.ToString(); string text2 = GUILayout.TextField(text, textFieldStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { width80 }); if (text2 != text && float.TryParse(text2, out var result)) { setting.Entry.BoxedValue = result; } } } private void DrawStringSetting(SettingInfo setting) { string text = setting.Entry.BoxedValue?.ToString() ?? ""; string text2 = GUILayout.TextField(text, textFieldStyle, (GUILayoutOption[])(object)new GUILayoutOption[1] { width120 }); if (text2 != text) { setting.Entry.BoxedValue = text2; } } private void ResetSettingToDefault(SettingInfo setting) { object defaultValue = GetDefaultValue(setting); if (defaultValue != null) { setting.Entry.BoxedValue = defaultValue; } else if (setting.CachedSettingType == typeof(bool)) { setting.Entry.BoxedValue = false; } else if (setting.CachedSettingType == typeof(int)) { AcceptableValueRange val = setting.CachedAcceptableRange as AcceptableValueRange; setting.Entry.BoxedValue = val?.MinValue ?? 0; } else if (setting.CachedSettingType == typeof(float)) { AcceptableValueRange val2 = setting.CachedAcceptableRange as AcceptableValueRange; setting.Entry.BoxedValue = val2?.MinValue ?? 0f; } } private GUIContent GetOrCreateGUIContent(string text, string tooltip) { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown keyBuilder.Clear(); keyBuilder.Append(text); keyBuilder.Append("|"); keyBuilder.Append(tooltip); string key = keyBuilder.ToString(); if (!cachedGUIContent.TryGetValue(key, out var value)) { value = new GUIContent(text, tooltip); cachedGUIContent[key] = value; } return value; } private object GetDefaultValue(SettingInfo setting) { string key = setting.Entry.Definition.Section + "." + setting.Key; if (cachedDefaultValues.TryGetValue(key, out var value)) { return value; } object obj = null; try { obj = GetHardcodedDefault(setting.Key); if (obj == null) { obj = GetDefaultValueViaReflection(setting.Entry); } } catch (Exception) { } if (obj != null) { cachedDefaultValues[key] = obj; } return obj; } private object GetHardcodedDefault(string key) { return key switch { "Speed" => 1f, "Gravity" => 1f, "Vehicle Invincibility" => false, "Show HUD" => true, "Infinite fuel" => false, "Smooth driving" => false, "Instant vehicle reset" => false, "Snow Tires" => false, "Ice Chains" => false, "Bumper Bar" => false, "Always duct tape" => false, "Perfect traction" => false, "Blow up vehicle" => false, "Zero vehicle gravity" => false, "Money amount" => 0f, "Player Invincibility" => false, "Infinite energy" => false, "No freezing" => false, "No ragdoll" => false, "Random weather" => true, "Weather intensity" => 0, "Weather cycle" => 0, "Freeze weather" => false, "Speed up weather" => 0, "No fog" => false, "Freeze time" => false, "Reverse time" => false, "Change time" => 6f, "Speed up time" => 0, "Sync time" => false, "Fire spread" => 1f, "Fire intensity" => 1f, "Fire damage" => 1f, "Daylight amount" => 1f, "Darkness amount" => 1f, "No pixelated rendering" => false, "FPS amount" => 0, "Vsync" => false, "Show FPS" => false, "Freecam" => false, "Shaders" => false, "Unlock all achievements" => false, "Enter snowy peaks" => false, "Enter fishing town" => false, "Secure a package with duct tape" => false, "Brew a cup of tea to stay warm" => false, "Cook a fish" => false, "Active every radio tower" => false, "Reboot Ending" => false, "Shutdown Ending" => false, "Restore Ending" => false, "Find all the snowcats" => false, "Feed the birds" => false, "Show location" => false, "Show all EXEs" => false, "Draggable icons" => false, _ => null, }; } private object GetDefaultValueViaReflection(ConfigEntryBase entry) { Type type = ((object)entry.Description).GetType(); PropertyInfo property = type.GetProperty("DefaultValue"); if (property != null) { object value = property.GetValue(entry.Description); if (value != null) { return value; } } if (entry.Description.Tags != null) { object[] tags = entry.Description.Tags; foreach (object obj in tags) { if (obj == null) { continue; } Type type2 = obj.GetType(); PropertyInfo property2 = type2.GetProperty("DefaultValue"); if (property2 != null) { object value2 = property2.GetValue(obj); if (value2 != null) { return value2; } } } } PropertyInfo property3 = ((object)entry).GetType().GetProperty("BoxedDefaultValue", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (property3 != null) { object value3 = property3.GetValue(entry); if (value3 != null) { return value3; } } FieldInfo field = ((object)entry).GetType().GetField("DefaultValue", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { object value4 = field.GetValue(entry); if (value4 != null) { return value4; } } return null; } private void RefreshSettings() { allPluginSettings.Clear(); Dictionary.ValueCollection values = Chainloader.PluginInfos.Values; foreach (PluginInfo item in values) { BaseUnityPlugin instance = item.Instance; if (((instance != null) ? instance.Config : null) == null) { continue; } string name = item.Metadata.Name; string gUID = item.Metadata.GUID; switch (name) { case "Configuration Manager": case "Mint Config Manager": case "Mint Menu": continue; } if (name == "Easy Delivery Mint Menu" || gUID.Contains("configmanager") || gUID.Contains("mintmenu") || gUID.Contains("mintconfig")) { continue; } int count = item.Instance.Config.Count; PluginSettings pluginSettings = new PluginSettings { PluginName = name, Collapsed = false, Settings = new List(count) }; foreach (KeyValuePair item2 in item.Instance.Config) { ConfigEntryBase value = item2.Value; if (value == null) { continue; } string cachedDescription = ""; try { if (((value != null) ? value.Description : null) != null) { cachedDescription = value.Description.Description ?? ""; } } catch { } pluginSettings.Settings.Add(new SettingInfo { Key = value.Definition.Key, Section = value.Definition.Section, Entry = value, CachedDescription = cachedDescription, CachedSettingType = value.SettingType, CachedAcceptableRange = value.Description.AcceptableValues }); } if (pluginSettings.Settings.Count > 0) { pluginSettings.CacheSettingsBySection(); allPluginSettings.Add(pluginSettings); } } } private void CreateTextures() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) mintTexture = MakeTexture(1, 1, MINT); darkTexture = MakeTexture(1, 1, MINT_BG); buttonTexture = MakeTexture(1, 1, MINT_DARK); tooltipTexture = MakeTexture(1, 1, new Color(0.02f, 0.12f, 0.1f, 0.95f)); mintLightTexture = MakeTexture(1, 1, MINT_LIGHT); sectionHeaderTexture = MakeTexture(1, 1, new Color(0f, 0.7f, 0.55f, 1f)); sectionHeaderActiveTexture = MakeTexture(1, 1, new Color(0f, 0.6f, 0.45f, 1f)); boxBackgroundTexture = MakeTexture(2, 2, new Color(0.02f, 0.08f, 0.07f, 0.9f)); invisibleTexture = MakeTexture(1, 1, new Color(0f, 0f, 0f, 0f)); textFieldTexture = MakeTexture(1, 1, new Color(0.1f, 0.1f, 0.1f, 1f)); textFieldFocusedTexture = MakeTexture(1, 1, new Color(0.15f, 0.15f, 0.15f, 1f)); } private void InitializeStyles() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Expected O, but got Unknown //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Expected O, but got Unknown //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Expected O, but got Unknown //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Expected O, but got Unknown //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Expected O, but got Unknown //IL_01ba: 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_0248: Expected O, but got Unknown //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Expected O, but got Unknown //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_030c: Expected O, but got Unknown //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Expected O, but got Unknown //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Expected O, but got Unknown //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Expected O, but got Unknown //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_0481: Unknown result type (might be due to invalid IL or missing references) //IL_04a5: Unknown result type (might be due to invalid IL or missing references) //IL_04af: Expected O, but got Unknown //IL_04d1: Unknown result type (might be due to invalid IL or missing references) //IL_0502: Unknown result type (might be due to invalid IL or missing references) //IL_050c: Expected O, but got Unknown //IL_052e: Unknown result type (might be due to invalid IL or missing references) //IL_0551: Unknown result type (might be due to invalid IL or missing references) //IL_055b: Expected O, but got Unknown windowStyle = new GUIStyle(GUI.skin.window); windowStyle.normal.background = darkTexture; windowStyle.onNormal.background = darkTexture; windowStyle.focused.background = darkTexture; windowStyle.onFocused.background = darkTexture; windowStyle.hover.background = darkTexture; windowStyle.onHover.background = darkTexture; windowStyle.active.background = darkTexture; windowStyle.onActive.background = darkTexture; windowStyle.normal.textColor = MINT_LIGHT; windowStyle.fontSize = 16; windowStyle.fontStyle = (FontStyle)1; windowStyle.padding = new RectOffset(10, 10, 25, 10); windowStyle.border = new RectOffset(0, 0, 0, 0); boxStyle = new GUIStyle(GUI.skin.box); boxStyle.normal.background = boxBackgroundTexture; boxStyle.padding = new RectOffset(5, 5, 5, 5); boxStyle.margin = new RectOffset(2, 2, 2, 2); headerStyle = new GUIStyle(GUI.skin.button); headerStyle.normal.background = mintTexture; headerStyle.normal.textColor = Color.white; headerStyle.hover.background = mintLightTexture; headerStyle.active.background = mintTexture; headerStyle.focused.background = mintTexture; headerStyle.fontSize = 14; headerStyle.fontStyle = (FontStyle)1; headerStyle.alignment = (TextAnchor)3; headerStyle.padding = new RectOffset(10, 10, 5, 5); sectionHeaderStyle = new GUIStyle(GUI.skin.button); sectionHeaderStyle.normal.background = sectionHeaderTexture; sectionHeaderStyle.normal.textColor = Color.white; sectionHeaderStyle.hover.background = mintTexture; sectionHeaderStyle.active.background = sectionHeaderActiveTexture; sectionHeaderStyle.focused.background = sectionHeaderTexture; sectionHeaderStyle.fontSize = 12; sectionHeaderStyle.fontStyle = (FontStyle)1; sectionHeaderStyle.alignment = (TextAnchor)3; sectionHeaderStyle.padding = new RectOffset(8, 8, 4, 4); labelStyle = new GUIStyle(GUI.skin.label); labelStyle.normal.textColor = MINT_LIGHT; labelStyle.fontSize = 12; labelStyle.hover.background = invisibleTexture; labelStyle.onHover.background = invisibleTexture; labelStyle.active.background = invisibleTexture; labelStyle.onActive.background = invisibleTexture; buttonStyle = new GUIStyle(GUI.skin.button); buttonStyle.normal.background = buttonTexture; buttonStyle.normal.textColor = Color.white; buttonStyle.hover.background = mintTexture; buttonStyle.active.background = MakeTexture(1, 1, MINT_DARK); buttonStyle.focused.background = buttonTexture; buttonStyle.fontSize = 12; buttonStyle.fontStyle = (FontStyle)1; toggleStyle = new GUIStyle(GUI.skin.toggle); toggleStyle.normal.textColor = MINT_LIGHT; toggleStyle.onNormal.textColor = Color.white; toggleStyle.fontSize = 12; textFieldStyle = new GUIStyle(GUI.skin.textField); textFieldStyle.normal.background = textFieldTexture; textFieldStyle.normal.textColor = MINT_LIGHT; textFieldStyle.focused.background = textFieldFocusedTexture; textFieldStyle.fontSize = 12; tooltipStyle = new GUIStyle(); tooltipStyle.normal.background = tooltipTexture; tooltipStyle.normal.textColor = Color.white; tooltipStyle.fontSize = 11; tooltipStyle.padding = new RectOffset(8, 8, 6, 6); tooltipStyle.wordWrap = true; tooltipStyle.alignment = (TextAnchor)4; } private Texture2D MakeTexture(int width, int height, Color color) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown Color[] array = (Color[])(object)new Color[width * height]; for (int i = 0; i < array.Length; i++) { array[i] = color; } Texture2D val = new Texture2D(width, height); val.SetPixels(array); val.Apply(); return val; } private void OnDestroy() { if ((Object)(object)mintTexture != (Object)null) { Object.Destroy((Object)(object)mintTexture); } if ((Object)(object)darkTexture != (Object)null) { Object.Destroy((Object)(object)darkTexture); } if ((Object)(object)buttonTexture != (Object)null) { Object.Destroy((Object)(object)buttonTexture); } if ((Object)(object)tooltipTexture != (Object)null) { Object.Destroy((Object)(object)tooltipTexture); } if ((Object)(object)mintLightTexture != (Object)null) { Object.Destroy((Object)(object)mintLightTexture); } if ((Object)(object)sectionHeaderTexture != (Object)null) { Object.Destroy((Object)(object)sectionHeaderTexture); } if ((Object)(object)sectionHeaderActiveTexture != (Object)null) { Object.Destroy((Object)(object)sectionHeaderActiveTexture); } if ((Object)(object)boxBackgroundTexture != (Object)null) { Object.Destroy((Object)(object)boxBackgroundTexture); } if ((Object)(object)invisibleTexture != (Object)null) { Object.Destroy((Object)(object)invisibleTexture); } if ((Object)(object)textFieldTexture != (Object)null) { Object.Destroy((Object)(object)textFieldTexture); } if ((Object)(object)textFieldFocusedTexture != (Object)null) { Object.Destroy((Object)(object)textFieldFocusedTexture); } } } } namespace EasyDeliveryMenu.MonoBehaviours { internal class EasyDeliveryMenuComponent : MonoBehaviour { public void Awake() { } public void Start() { } public void Update() { } public void LateUpdate() { } } }