Decompiled source of Shawesomes Awesome Wagons v2.0.1
Shawesomes_Awesome_Wagons.dll
Decompiled 6 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Logging; using HarmonyLib; using Jotunn.Configs; using Jotunn.Entities; using Jotunn.Managers; using Jotunn.Utils; using Shawesomes_Awesome_Wagons.VehicleSystem; using Shawesomes_Awesome_Wagons.shipflydrive; using UnityEngine; using UnityEngine.Networking; using UnityEngine.UI; using UnityEngine.Video; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("Shawesomes_Infinte_Multiverse")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Shawesomes_Infinte_Multiverse")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("e0e26f8d-a8f0-41a7-a502-951624fa6f31")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] public class VehicleContainer : MonoBehaviour { public Container m_container; public float m_updateInterval = 3f; public string m_loadParentName = "load"; public string[] m_loadVisNames = new string[0]; public float[] m_loadVisPercentages = new float[0]; private bool m_initialized; private readonly List<LoadVisualization> m_loadVis = new List<LoadVisualization>(); private float m_nextUpdateTime; private void Awake() { } private void Start() { if (m_loadVisNames.Length == 0) { return; } Transform val = FindChildRecursive(((Component)this).transform.root, m_loadParentName); if ((Object)(object)val != (Object)null) { ((Component)val).gameObject.SetActive(true); for (int i = 0; i < m_loadVisNames.Length; i++) { Transform val2 = FindChildRecursive(val, m_loadVisNames[i]); if ((Object)(object)val2 != (Object)null) { float minPercentage = ((i < m_loadVisPercentages.Length) ? m_loadVisPercentages[i] : 0f); m_loadVis.Add(new LoadVisualization { m_gameobject = ((Component)val2).gameObject, m_minPercentage = minPercentage }); ((Component)val2).gameObject.SetActive(false); } } } if (m_loadVis.Count > 0 && (Object)(object)m_container != (Object)null) { Initialize(); } } private void Update() { if (m_initialized && Time.time >= m_nextUpdateTime) { UpdateLoadVisualization(); m_nextUpdateTime = Time.time + m_updateInterval; } } private Transform FindChildRecursive(Transform parent, string name) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown if (((Object)parent).name == name) { return parent; } foreach (Transform item in parent) { Transform parent2 = item; Transform val = FindChildRecursive(parent2, name); if ((Object)(object)val != (Object)null) { return val; } } return null; } public void AddLoadVisualization(GameObject obj, float minPercentage) { if (!((Object)(object)obj == (Object)null)) { m_loadVis.Add(new LoadVisualization { m_gameobject = obj, m_minPercentage = minPercentage }); obj.SetActive(false); } } public void Initialize() { if (!m_initialized && !((Object)(object)m_container == (Object)null) && m_loadVis.Count != 0) { m_nextUpdateTime = Time.time + 1f; m_initialized = true; } } private void UpdateLoadVisualization() { if ((Object)(object)m_container == (Object)null) { return; } Inventory inventory = m_container.GetInventory(); if (inventory == null) { return; } float num = inventory.SlotsUsedPercentage(); foreach (LoadVisualization loadVi in m_loadVis) { if ((Object)(object)loadVi.m_gameobject != (Object)null) { bool active = num >= loadVi.m_minPercentage; loadVi.m_gameobject.SetActive(active); } } } public void ForceUpdate() { UpdateLoadVisualization(); } public float GetFillPercentage() { if ((Object)(object)m_container == (Object)null || m_container.GetInventory() == null) { return 0f; } return m_container.GetInventory().SlotsUsedPercentage(); } public bool IsContainerInUse() { return (Object)(object)m_container != (Object)null && m_container.IsInUse(); } public int GetLoadVisCount() { return m_loadVis.Count; } } [Serializable] public class LoadVisualization { public GameObject m_gameobject; public float m_minPercentage; } public class VehicleRadio : MonoBehaviour { private enum SongType { Hierarchy, CustomFile, StreamURL } private class SongEntry { public string Name; public string Path; public SongType Type; } public static string MUSIC_FOLDER_PATH = ""; private static readonly List<string> s_customMusicFiles = new List<string>(); private static bool s_musicFolderScanned; public KeyCode TOGGLE_RADIO_KEY = (KeyCode)114; public KeyCode NEXT_SONG_KEY = (KeyCode)93; public KeyCode PREV_SONG_KEY = (KeyCode)91; public KeyCode REFRESH_MUSIC_KEY = (KeyCode)286; public string RADIO_SPAWN_POINT = "Radio"; public string HIERARCHY_SONGS_PREFIX = "Song"; public float VOLUME = 1f; public bool LOOP_SONGS; public bool SHUFFLE; private readonly List<SongEntry> m_allSongs = new List<SongEntry>(); private int m_currentSongIndex; private Coroutine m_loadingCoroutine; private bool m_radioOn; private Transform m_radioSpawnPoint; private int m_shuffleIndex; private readonly List<int> m_shuffleOrder = new List<int>(); private AudioSource m_streamAudioSource; private AudioSource m_permanentAudioSource; private VideoPlayer m_radioVideoPlayer; private readonly List<AudioSource> m_hierarchySongs = new List<AudioSource>(); private void Awake() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown if (!string.IsNullOrEmpty(RADIO_SPAWN_POINT)) { m_radioSpawnPoint = FindChildRecursive(((Component)this).transform.root, RADIO_SPAWN_POINT); } GameObject val = (((Object)(object)m_radioSpawnPoint != (Object)null) ? ((Component)m_radioSpawnPoint).gameObject : ((Component)this).gameObject); GameObject val2 = new GameObject("RadioAudioSource"); val2.transform.SetParent(val.transform, false); m_permanentAudioSource = val2.AddComponent<AudioSource>(); m_permanentAudioSource.playOnAwake = false; m_permanentAudioSource.loop = false; m_permanentAudioSource.volume = VOLUME; m_permanentAudioSource.spatialBlend = 1f; m_permanentAudioSource.maxDistance = 50f; m_radioVideoPlayer = val2.AddComponent<VideoPlayer>(); m_radioVideoPlayer.playOnAwake = false; m_radioVideoPlayer.isLooping = false; m_radioVideoPlayer.renderMode = (VideoRenderMode)4; m_radioVideoPlayer.audioOutputMode = (VideoAudioOutputMode)1; m_radioVideoPlayer.SetTargetAudioSource((ushort)0, m_permanentAudioSource); m_permanentAudioSource.volume = VOLUME; if (!s_musicFolderScanned && !string.IsNullOrEmpty(MUSIC_FOLDER_PATH)) { ScanMusicFolder(); s_musicFolderScanned = true; } ScanHierarchySongs(); BuildSongList(); if (SHUFFLE) { GenerateShuffleOrder(); } } private void Update() { //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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_006a: Unknown result type (might be due to invalid IL or missing references) Vehicle component = ((Component)this).GetComponent<Vehicle>(); if ((Object)(object)Player.m_localPlayer != (Object)null && Player.m_localPlayer.m_doodadController == component) { if (Input.GetKeyDown(TOGGLE_RADIO_KEY)) { ToggleRadio(); } if (Input.GetKeyDown(NEXT_SONG_KEY) && m_radioOn) { NextSong(); } if (Input.GetKeyDown(PREV_SONG_KEY) && m_radioOn) { PreviousSong(); } } if (Input.GetKeyDown(REFRESH_MUSIC_KEY)) { RefreshMusicList(); } if (m_radioOn && LOOP_SONGS) { bool flag = false; if ((Object)(object)m_permanentAudioSource != (Object)null && (Object)(object)m_permanentAudioSource.clip != (Object)null && !m_permanentAudioSource.isPlaying) { flag = true; } else if ((Object)(object)m_streamAudioSource != (Object)null && (Object)(object)m_streamAudioSource.clip != (Object)null && !m_streamAudioSource.isPlaying) { flag = true; } if (flag) { NextSong(); } } } private void OnDestroy() { StopCurrentSong(); } private void ToggleRadio() { m_radioOn = !m_radioOn; if (m_radioOn) { PlayCurrentSong(); return; } StopCurrentSong(); Player localPlayer = Player.m_localPlayer; if ((Object)(object)localPlayer != (Object)null) { ((Character)localPlayer).Message((MessageType)2, "Radio Off", 0, (Sprite)null); } } private void ScanMusicFolder() { s_customMusicFiles.Clear(); if (!Directory.Exists(MUSIC_FOLDER_PATH)) { Directory.CreateDirectory(MUSIC_FOLDER_PATH); return; } string[] array = new string[3] { "*.mp3", "*.ogg", "*.wav" }; string[] array2 = array; foreach (string searchPattern in array2) { string[] files = Directory.GetFiles(MUSIC_FOLDER_PATH, searchPattern, SearchOption.TopDirectoryOnly); s_customMusicFiles.AddRange(files); } } private void ScanHierarchySongs() { m_hierarchySongs.Clear(); if ((Object)(object)m_radioSpawnPoint == (Object)null) { return; } AudioSource[] componentsInChildren = ((Component)m_radioSpawnPoint).GetComponentsInChildren<AudioSource>(true); AudioSource[] array = componentsInChildren; foreach (AudioSource val in array) { if (!((Object)(object)val == (Object)(object)m_permanentAudioSource) && (Object)(object)val.clip != (Object)null && ((Object)((Component)val).gameObject).name.StartsWith(HIERARCHY_SONGS_PREFIX)) { m_hierarchySongs.Add(val); } } } private void BuildSongList() { m_allSongs.Clear(); for (int i = 0; i < m_hierarchySongs.Count; i++) { AudioSource val = m_hierarchySongs[i]; m_allSongs.Add(new SongEntry { Name = ((Object)val.clip).name, Type = SongType.Hierarchy, Path = i.ToString() }); } foreach (string s_customMusicFile in s_customMusicFiles) { string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(s_customMusicFile); m_allSongs.Add(new SongEntry { Name = fileNameWithoutExtension, Type = SongType.CustomFile, Path = s_customMusicFile }); } } private void NextSong() { if (m_allSongs.Count != 0) { if (SHUFFLE) { m_shuffleIndex = (m_shuffleIndex + 1) % m_shuffleOrder.Count; m_currentSongIndex = m_shuffleOrder[m_shuffleIndex]; } else { m_currentSongIndex = (m_currentSongIndex + 1) % m_allSongs.Count; } PlayCurrentSong(); } } private void PreviousSong() { if (m_allSongs.Count == 0) { return; } if (SHUFFLE) { m_shuffleIndex--; if (m_shuffleIndex < 0) { m_shuffleIndex = m_shuffleOrder.Count - 1; } m_currentSongIndex = m_shuffleOrder[m_shuffleIndex]; } else { m_currentSongIndex--; if (m_currentSongIndex < 0) { m_currentSongIndex = m_allSongs.Count - 1; } } PlayCurrentSong(); } private void PlayCurrentSong() { if (m_allSongs.Count != 0) { StopCurrentSong(); SongEntry songEntry = m_allSongs[m_currentSongIndex]; switch (songEntry.Type) { case SongType.Hierarchy: PlayHierarchySong(songEntry); break; case SongType.CustomFile: case SongType.StreamURL: m_loadingCoroutine = ((MonoBehaviour)this).StartCoroutine(LoadAndPlayAudio(songEntry)); break; } Player localPlayer = Player.m_localPlayer; if ((Object)(object)localPlayer != (Object)null) { string text = ((songEntry.Type == SongType.Hierarchy) ? "\ud83c\udfbc" : ((songEntry.Type == SongType.CustomFile) ? "\ud83c\udfb5" : "\ud83d\udce1")); ((Character)localPlayer).Message((MessageType)2, $"{text} Now Playing: {songEntry.Name} ({m_currentSongIndex + 1}/{m_allSongs.Count})", 0, (Sprite)null); } } } private void PlayHierarchySong(SongEntry song) { if (int.TryParse(song.Path, out var result) && result >= 0 && result < m_hierarchySongs.Count) { AudioSource val = m_hierarchySongs[result]; if (!((Object)(object)val == (Object)null) && !((Object)(object)val.clip == (Object)null) && (Object)(object)m_permanentAudioSource != (Object)null) { m_permanentAudioSource.clip = val.clip; m_permanentAudioSource.volume = VOLUME; m_permanentAudioSource.loop = false; m_permanentAudioSource.Play(); } } } private IEnumerator LoadAndPlayAudio(SongEntry song) { AudioType audioType = (AudioType)13; string path = song.Path; if (song.Type == SongType.CustomFile) { path = "file://" + path; string ext = Path.GetExtension(song.Path).ToLower(); if (ext == ".ogg") { audioType = (AudioType)14; } else if (ext == ".wav") { audioType = (AudioType)20; } } UnityWebRequest www = UnityWebRequestMultimedia.GetAudioClip(path, audioType); try { ((DownloadHandlerAudioClip)www.downloadHandler).streamAudio = true; yield return www.SendWebRequest(); if ((int)www.result != 1) { Player localPlayer = Player.m_localPlayer; if ((Object)(object)localPlayer != (Object)null) { ((Character)localPlayer).Message((MessageType)2, "❌ Failed to load: " + song.Name, 0, (Sprite)null); } yield break; } AudioClip clip = DownloadHandlerAudioClip.GetContent(www); if ((Object)(object)clip == (Object)null) { yield break; } if ((Object)(object)m_streamAudioSource == (Object)null) { GameObject audioObj = new GameObject("RadioStream"); audioObj.transform.SetParent(((Object)(object)m_radioSpawnPoint != (Object)null) ? m_radioSpawnPoint : ((Component)this).transform); audioObj.transform.localPosition = Vector3.zero; m_streamAudioSource = audioObj.AddComponent<AudioSource>(); m_streamAudioSource.spatialBlend = 1f; m_streamAudioSource.maxDistance = 50f; m_streamAudioSource.rolloffMode = (AudioRolloffMode)1; } m_streamAudioSource.clip = clip; m_streamAudioSource.volume = VOLUME; m_streamAudioSource.loop = false; m_streamAudioSource.Play(); } finally { ((IDisposable)www)?.Dispose(); } } private void StopCurrentSong() { if (m_loadingCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(m_loadingCoroutine); m_loadingCoroutine = null; } if ((Object)(object)m_permanentAudioSource != (Object)null) { m_permanentAudioSource.Stop(); m_permanentAudioSource.clip = null; } if ((Object)(object)m_radioVideoPlayer != (Object)null) { m_radioVideoPlayer.Stop(); m_radioVideoPlayer.clip = null; } if ((Object)(object)m_streamAudioSource != (Object)null) { m_streamAudioSource.Stop(); m_streamAudioSource.clip = null; } } private void GenerateShuffleOrder() { m_shuffleOrder.Clear(); for (int i = 0; i < m_allSongs.Count; i++) { m_shuffleOrder.Add(i); } for (int num = m_shuffleOrder.Count - 1; num > 0; num--) { int index = Random.Range(0, num + 1); int value = m_shuffleOrder[num]; m_shuffleOrder[num] = m_shuffleOrder[index]; m_shuffleOrder[index] = value; } m_shuffleIndex = 0; if (m_shuffleOrder.Count > 0) { m_currentSongIndex = m_shuffleOrder[0]; } } private Transform FindChildRecursive(Transform parent, string name) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown if (((Object)parent).name == name) { return parent; } foreach (Transform item in parent) { Transform parent2 = item; Transform val = FindChildRecursive(parent2, name); if ((Object)(object)val != (Object)null) { return val; } } return null; } public string GetCurrentSongName() { if (m_allSongs.Count == 0) { return "No songs"; } return m_allSongs[m_currentSongIndex].Name; } public bool IsRadioOn() { return m_radioOn; } public void SetRadioState(bool on) { if (on != m_radioOn) { ToggleRadio(); } } private void RefreshMusicList() { if (string.IsNullOrEmpty(MUSIC_FOLDER_PATH)) { Player localPlayer = Player.m_localPlayer; if (localPlayer != null) { ((Character)localPlayer).Message((MessageType)2, "Using asset bundle - refresh not needed", 0, (Sprite)null); } return; } StopCurrentSong(); ScanMusicFolder(); m_currentSongIndex = 0; m_radioOn = false; int count = s_customMusicFiles.Count; Player localPlayer2 = Player.m_localPlayer; if (localPlayer2 != null) { ((Character)localPlayer2).Message((MessageType)2, $"Music list refreshed! Found {count} songs", 0, (Sprite)null); } } } namespace Shawesomes_Awesome_Wagons { [BepInPlugin("IDshawesome4u3", "Shawesomes_Awesome_Wagons", "2.0.1")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Shawesomes_Awesome_Wagons : BaseUnityPlugin { public Harmony harmony; public static GameObject Root; public string version = "1.0.0"; public static ManualLogSource logger; public static ManualLogSource harmonyLog; private static AssetBundle Shawcassets; public static List<GameObject> EffectList = new List<GameObject>(); public static bool ENABLE_REGISTRATION_DEBUG = true; public static bool ENABLE_EFFECT_DEBUG = true; public static bool ENABLE_ITEM_DEBUG = true; public static bool ENABLE_PIECE_DEBUG = true; private int cameraLogCounter = 0; public Vector3 m_cameraPositionOffset = Vector3.zero; private int m_currentPositionIndex = 0; public static bool ENABLE_CAMERA_ZOOM = true; public static bool PREVENT_BODY_CULLING = true; public static float MIN_CAMERA_DISTANCE = 0f; public static float MAX_CAMERA_DISTANCE = 10f; public static float DEFAULT_CAMERA_DISTANCE = 6f; public static float ZOOM_SPEED = 2f; public static KeyCode ZOOM_IN_KEY = (KeyCode)270; public static KeyCode ZOOM_OUT_KEY = (KeyCode)269; public static KeyCode RESET_ZOOM_KEY = (KeyCode)268; public static bool ENABLE_POSITION_ADJUSTMENT = true; public static float POSITION_ADJUSTMENT_SPEED = 0.01f; public static KeyCode ADJUST_LEFT_KEY = (KeyCode)276; public static KeyCode ADJUST_RIGHT_KEY = (KeyCode)275; public static KeyCode ADJUST_UP_KEY = (KeyCode)273; public static KeyCode ADJUST_DOWN_KEY = (KeyCode)274; public static KeyCode ADJUST_FORWARD_MODIFIER = (KeyCode)304; public static bool ENABLE_POSITION_TOGGLE = true; public static KeyCode TOGGLE_POSITION_KEY = (KeyCode)267; public static Vector3[] POSITION_PRESETS = (Vector3[])(object)new Vector3[4] { Vector3.zero, new Vector3(0f, 0f, -0.15f), new Vector3(0.3f, 0f, -0.2f), new Vector3(-0.3f, 0f, -0.2f) }; public static bool ENABLE_SAVE_SETTINGS = true; public static KeyCode SAVE_SETTINGS_KEY = (KeyCode)271; private static readonly string[] DivineFuelLoreMessages = new string[20] { "In the forges beneath the Nine Realms, Shawesome smelted Arcanium for the first time...", "When the world trembled, he captured lightning in metal — and named it Arcanium.", "From the molten heart of Muspelheim, Shawesome forged an energy that rivaled the gods themselves.", "Legends whisper that even Odin gazed upon Shawesome’s creation and smiled — not in approval, but in awe.", "After perfecting the Arcanium smelting process, Shawesome dared the impossible — refining the impossible into *Aether*.", "Arcanium was power. But refined through godly will, it became Asgardian Aether — the Supreme Fuel of Eternity.", "Forged from starlight and thunder, refined through divine will — the Asgardians once called it the Breath of the Bifrost.", "When mortals see blue flames dance upon the forge, they know: Shawesome has begun smelting again...", "Few dared to touch raw Arcanium. Fewer survived. Only Shawesome made it *sing*.", "Some say the Allfather sent ravens to steal the secret. Others say he sent thunder to hide it forever.", "Initializing Divine Fuel System... calibrating cosmic smelters...", "Compiling Asgardian Reactor Blueprints... success.", "Warning: Exposure to raw Arcanium Aether may cause spontaneous enlightenment.", "Do not inhale Aether vapors. Unless you are Shawesome. In which case... carry on.", "Loading Aether reactors... hold onto your axes, mortals.", "Arcanium Aether: now 97% less likely to rupture space-time (patch v2.1).", "Smelting complete. Asgardian Augmentation levels at maximum saturation.", "Scanning for divine signatures... detected: YOU. You have been chosen.", "If the forge hums in ancient tongues — it’s working as intended.", "Remember: Never mix Aether with mead. We learned that the hard way." }; [HarmonyPostfix] [HarmonyPatch(typeof(ItemStyle), "Setup")] private static void PostfixIDropStart(ItemStyle __instance, int style) { //IL_00ad: 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_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_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_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) IEquipmentVisual[] componentsInChildren = ((Component)((Component)__instance).transform.parent).GetComponentsInChildren<IEquipmentVisual>(); for (int i = 0; i < componentsInChildren.Length; i++) { if (((object)componentsInChildren[i]).GetType() != typeof(ItemStyle)) { continue; } IEquipmentVisual obj = componentsInChildren[i]; MonoBehaviour val = (MonoBehaviour)(object)((obj is MonoBehaviour) ? obj : null); if (!Object.op_Implicit((Object)(object)val)) { continue; } Material material = ((Component)val).GetComponent<Renderer>().material; material.SetFloat("_Style", (float)style); Color[] colorArray = material.GetColorArray("_StyleColors"); Color[] colorArray2 = material.GetColorArray("_StyleTints"); if (colorArray != null) { material.SetColor("_Color", colorArray[Math.Min(colorArray.Length - 1, style)]); } if (colorArray2 != null) { material.SetColor("_TintColor", colorArray2[Math.Min(colorArray2.Length - 1, style)]); } Color[] colorArray3 = material.GetColorArray("_StyleGradient0"); Color[] colorArray4 = material.GetColorArray("_StyleGradient1"); if (colorArray3 == null && colorArray4 == null) { continue; } ParticleSystem component = ((Component)val).GetComponent<ParticleSystem>(); if (Object.op_Implicit((Object)(object)component)) { ColorOverLifetimeModule colorOverLifetime = component.colorOverLifetime; MinMaxGradient color = ((ColorOverLifetimeModule)(ref colorOverLifetime)).color; GradientColorKey[] array = (GradientColorKey[])((MinMaxGradient)(ref color)).gradient.colorKeys.Clone(); if (colorArray3 != null) { array[0].color = colorArray3[style]; } if (colorArray4 != null) { array[1].color = colorArray4[style]; } color = ((ColorOverLifetimeModule)(ref colorOverLifetime)).color; Gradient gradient = ((MinMaxGradient)(ref color)).gradient; gradient.colorKeys = array; ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = new MinMaxGradient(gradient); } } } public void Awake() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown logger = ((BaseUnityPlugin)this).Logger; harmonyLog = ((BaseUnityPlugin)this).Logger; VanillaShaders.InitLogFilter(); VanillaShaders.RegisterAssetBundle("shaw_aw"); harmony = new Harmony("IDshawesome4u3"); Root = new GameObject("Shaw Root"); Object.DontDestroyOnLoad((Object)(object)Root); harmony.PatchAll(typeof(VehiclePatches)); harmony.PatchAll(typeof(VehicleCamera_BodyCulling_Patch)); LogDivineStartup(); LoadCameraSettings(); ((object)ItemManager.Instance).ToString(); Shawcassets = AssetUtils.LoadAssetBundleFromResources("shaw_aw", Assembly.GetExecutingAssembly()); RegistrationDebugLogger.Initialize(((BaseUnityPlugin)this).Logger, Shawcassets); string directoryName = Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location); VehicleRadio.MUSIC_FOLDER_PATH = Path.Combine(directoryName, "ShawRadio(MP3)"); if (!Directory.Exists(VehicleRadio.MUSIC_FOLDER_PATH)) { Directory.CreateDirectory(VehicleRadio.MUSIC_FOLDER_PATH); harmonyLog.LogMessage((object)("Created Music folder: " + VehicleRadio.MUSIC_FOLDER_PATH)); } else { harmonyLog.LogMessage((object)("VehicleRadio music folder: " + VehicleRadio.MUSIC_FOLDER_PATH)); } LoadAssets(); PrefabManager.OnVanillaPrefabsAvailable += additems; PrefabManager.OnPrefabsRegistered += delegate { AddEffectsToZNet(); }; IEnumerable<MethodBase> patchedMethods = harmony.GetPatchedMethods(); foreach (MethodBase item in patchedMethods) { } } public static void LogDivineStartup() { Random random = new Random(); string text = DivineFuelLoreMessages[random.Next(DivineFuelLoreMessages.Length)]; harmonyLog.LogWarning((object)("[DivineFuel Chronicles] " + text)); } public static void LoadAssets() { RegistrationDebugLogger.LogSection("EFFECT REGISTRATION"); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeGOW/bow_projectile2.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeGOW/bow_projectile3.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeGOW/batmobile_boost_projectile.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeGOW/batmissile_projectile.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeGOW/batmissile_projectile1.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeGOW/shaw_ice_projectile.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeGOW/shawesomeexplosion.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeGOW/shawesomeexplosion1.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeGOW/vfx_shawtechdmg_impact.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeGOW/vfx_shawtechdmg_impact1.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/PrefabInstance/sfx_firework_explode1.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/PrefabInstance/IceBlocker2.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/BOOST_SFX.prefab", EffectList, localOnly: true); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/BOOST_vfx.prefab", EffectList, localOnly: true); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/BOOST_vfx1.prefab", EffectList, localOnly: true); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/BOOST_vfx2.prefab", EffectList, localOnly: true); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/ignition.prefab", EffectList, localOnly: true); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/ignition_fire_vfx.prefab", EffectList, localOnly: true); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/vfx_Burning1.prefab", EffectList, localOnly: true); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/hover_switch_sfx1.prefab", EffectList, localOnly: true); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/cdcomplete_sfx.prefab", EffectList, localOnly: true); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/overheat_sfx.prefab", EffectList, localOnly: true); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/overheat_vfx.prefab", EffectList, localOnly: true); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/fx_Puke1.prefab", EffectList, localOnly: true); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/1.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/2.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/3.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/4.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/5.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/6.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/7.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/8.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/9.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/10.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/11.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/12.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/13.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/14.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/15.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/16.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/17.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/18.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/19.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/20.prefab", EffectList); RegistrationDebugLogger.RegisterEffect("Assets/ShawesomeWagons/21.prefab", EffectList); RegistrationDebugLogger.LogEffectSummary(); } public static void AddEffectsToZNet() { foreach (GameObject effect in EffectList) { if ((Object)(object)effect == (Object)null) { harmonyLog.LogWarning((object)"NULL GameObject in EffectList! Check your asset paths!"); continue; } ZNetView component = effect.GetComponent<ZNetView>(); if ((Object)(object)component == (Object)null) { component = effect.AddComponent<ZNetView>(); component.m_persistent = false; component.m_distant = false; } int stableHashCode = StringExtensionMethods.GetStableHashCode(((Object)effect).name); if ((Object)(object)ZNetScene.instance != (Object)null && !ZNetScene.instance.m_namedPrefabs.ContainsKey(stableHashCode)) { PrefabManager.Instance.RegisterToZNetScene(effect); } } } public static void additems() { RegistrationDebugLogger.LogSection("ITEM REGISTRATION"); AdddivineFuelprep(); Adddivinefuel(); RegistrationDebugLogger.LogItemSummary(); RegistrationDebugLogger.LogSection("PIECE/VEHICLE REGISTRATION"); AddshawesomeWagon(); Addhwagon(); Addshawmc(); Addshawhelcycle(); Addshawicecycle(); AddshawfbAircraft(); Addshawhalocart(); Addshawbatcart(); Addsxfighter(); Adddhaktank(); Addtolroko(); RegistrationDebugLogger.LogPieceSummary(); RegistrationDebugLogger.LogFinalSummary(); PrefabManager.OnVanillaPrefabsAvailable -= additems; } public static void Addtolroko() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_0cb7: Unknown result type (might be due to invalid IL or missing references) //IL_0cce: Unknown result type (might be due to invalid IL or missing references) //IL_0cd3: Unknown result type (might be due to invalid IL or missing references) //IL_0cec: Unknown result type (might be due to invalid IL or missing references) //IL_0cf1: Unknown result type (might be due to invalid IL or missing references) //IL_0d10: Unknown result type (might be due to invalid IL or missing references) //IL_0d15: Unknown result type (might be due to invalid IL or missing references) //IL_0d2e: Unknown result type (might be due to invalid IL or missing references) //IL_0d33: Unknown result type (might be due to invalid IL or missing references) //IL_0d4a: Unknown result type (might be due to invalid IL or missing references) //IL_0d4f: Unknown result type (might be due to invalid IL or missing references) //IL_0d68: Unknown result type (might be due to invalid IL or missing references) //IL_0d6d: Unknown result type (might be due to invalid IL or missing references) //IL_0d84: Unknown result type (might be due to invalid IL or missing references) //IL_0d89: Unknown result type (might be due to invalid IL or missing references) //IL_0db1: Unknown result type (might be due to invalid IL or missing references) //IL_0db6: Unknown result type (might be due to invalid IL or missing references) //IL_0dcd: Unknown result type (might be due to invalid IL or missing references) //IL_0dd2: Unknown result type (might be due to invalid IL or missing references) //IL_0deb: Unknown result type (might be due to invalid IL or missing references) //IL_0df0: Unknown result type (might be due to invalid IL or missing references) //IL_0e07: Unknown result type (might be due to invalid IL or missing references) //IL_0e0c: Unknown result type (might be due to invalid IL or missing references) //IL_0e25: Unknown result type (might be due to invalid IL or missing references) //IL_0e2a: Unknown result type (might be due to invalid IL or missing references) //IL_0e62: Unknown result type (might be due to invalid IL or missing references) //IL_0e6c: Unknown result type (might be due to invalid IL or missing references) //IL_0e76: Unknown result type (might be due to invalid IL or missing references) //IL_0e8c: Unknown result type (might be due to invalid IL or missing references) //IL_0e99: Unknown result type (might be due to invalid IL or missing references) //IL_0e9e: Unknown result type (might be due to invalid IL or missing references) //IL_0eb4: Unknown result type (might be due to invalid IL or missing references) //IL_0eb9: Unknown result type (might be due to invalid IL or missing references) //IL_0ecf: Unknown result type (might be due to invalid IL or missing references) //IL_0ed4: Unknown result type (might be due to invalid IL or missing references) //IL_0eea: Unknown result type (might be due to invalid IL or missing references) //IL_0eef: Unknown result type (might be due to invalid IL or missing references) //IL_0f0e: Unknown result type (might be due to invalid IL or missing references) //IL_0f18: Unknown result type (might be due to invalid IL or missing references) //IL_0f22: Unknown result type (might be due to invalid IL or missing references) //IL_0f2c: Unknown result type (might be due to invalid IL or missing references) //IL_0f36: Unknown result type (might be due to invalid IL or missing references) //IL_0f46: Unknown result type (might be due to invalid IL or missing references) //IL_0f4e: Unknown result type (might be due to invalid IL or missing references) //IL_0f55: Expected O, but got Unknown //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0105: 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_0112: 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_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: 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_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0209: 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_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: 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_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_0b01: Unknown result type (might be due to invalid IL or missing references) //IL_0b0a: Unknown result type (might be due to invalid IL or missing references) //IL_0b16: Unknown result type (might be due to invalid IL or missing references) //IL_0b22: Unknown result type (might be due to invalid IL or missing references) //IL_0b2a: Unknown result type (might be due to invalid IL or missing references) //IL_0b36: Unknown result type (might be due to invalid IL or missing references) //IL_0b68: Unknown result type (might be due to invalid IL or missing references) //IL_0b6d: Unknown result type (might be due to invalid IL or missing references) //IL_0b83: Unknown result type (might be due to invalid IL or missing references) //IL_0b88: Unknown result type (might be due to invalid IL or missing references) //IL_0b9e: Unknown result type (might be due to invalid IL or missing references) //IL_0ba3: Unknown result type (might be due to invalid IL or missing references) //IL_0582: Unknown result type (might be due to invalid IL or missing references) //IL_065f: Unknown result type (might be due to invalid IL or missing references) //IL_0773: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_09bd: Unknown result type (might be due to invalid IL or missing references) //IL_0a4f: Unknown result type (might be due to invalid IL or missing references) //IL_0a54: Unknown result type (might be due to invalid IL or missing references) //IL_0a6a: Unknown result type (might be due to invalid IL or missing references) //IL_0a6f: Unknown result type (might be due to invalid IL or missing references) //IL_04e0: Unknown result type (might be due to invalid IL or missing references) //IL_0513: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Unknown result type (might be due to invalid IL or missing references) //IL_051f: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Unknown result type (might be due to invalid IL or missing references) //IL_052b: Unknown result type (might be due to invalid IL or missing references) //IL_0530: Unknown result type (might be due to invalid IL or missing references) //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_054b: Unknown result type (might be due to invalid IL or missing references) //IL_0a86: Unknown result type (might be due to invalid IL or missing references) //IL_0a8f: Unknown result type (might be due to invalid IL or missing references) //IL_0a98: Unknown result type (might be due to invalid IL or missing references) //IL_0aa4: Unknown result type (might be due to invalid IL or missing references) PieceConfig val = new PieceConfig(); val.PieceTable = PieceTables.Hammer; val.CraftingStation = CraftingStations.Workbench; val.Category = PieceCategories.Misc; val.AddRequirement(new RequirementConfig("MechanicalSpring", 25, 0, false)); val.AddRequirement(new RequirementConfig("CharredCogwheel", 25, 0, false)); val.AddRequirement(new RequirementConfig("BlackMetal", 200, 0, false)); val.AddRequirement(new RequirementConfig("Flametal", 100, 0, false)); GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeWagons/Shwsmtrko.prefab"); Transform val3 = FindChildRecursive(val2.transform, "driverseat"); if ((Object)(object)val3 != (Object)null) { Vehicle vehicle = ((Component)val3).gameObject.AddComponent<Vehicle>(); vehicle.DISABLE_DRIVING = true; vehicle.m_driveMode = Vehicle.DriveMode.RWD; vehicle.m_steeringMode = Vehicle.SteeringMode.Front; vehicle.m_steeringOffset = new Vector3(0f, 0f, 0f); vehicle.m_wheelTorqueDir = new Vector3(0f, 0f, 1f); vehicle.m_forceMode = (ForceMode)1; vehicle.m_driverSeatPositionOffset = new Vector3(0f, 0f, 0f); vehicle.m_driverSeatRotationOffset = new Vector3(0f, 0f, 0f); vehicle.m_hoverText = "Vehicle"; vehicle.m_maxUseRange = 10f; vehicle.m_detachOffset = new Vector3(0f, 0.5f, 0f); vehicle.m_attachAnimation = "attach_chair"; vehicle.m_customAnimationController = Shawcassets.LoadAsset<RuntimeAnimatorController>("Assets/ShawesomeWagons/driverseat_animation4.controller"); vehicle.m_wheelTorque = 100f; vehicle.m_maxSteeringAngle = 30f; vehicle.m_steeringSpeed = 2f; vehicle.m_forwardForce = 30f; vehicle.m_reverseForce = 10f; vehicle.m_turnForce = 5f; vehicle.m_downForce = 10f; vehicle.m_brakeForce = 80f; vehicle.m_brakeKey = (KeyCode)306; vehicle.m_fullStopBrakeForce = 200f; vehicle.m_mass = 100f; vehicle.m_drag = 1f; vehicle.m_angularDrag = 10f; vehicle.m_centerOfMassOffset = new Vector3(0f, 1f, 0f); try { HoverCar hoverCar = val2.AddComponent<HoverCar>(); hoverCar.DISABLE_IGNITION_ON_MODE_SWITCH = true; hoverCar.ENABLE_HOVER_SYSTEM = true; hoverCar.TOGGLE_HOVER_KEY = (KeyCode)113; hoverCar.AIRBORNE_THRESHOLD = 2f; hoverCar.LEVEL_THRESHOLD = 10f; hoverCar.ENABLE_GROUND_TAKEOFF = true; hoverCar.TAKEOFF_HEIGHT = 3f; hoverCar.TAKEOFF_FORCE = 1000f; hoverCar.STABILIZATION_SPEED = 7f; hoverCar.AUTO_STABILIZE_AIRBORNE = true; hoverCar.REQUIRE_ARCANIUM_FUEL = true; hoverCar.REQUIRED_FUEL_NAME = "ArcaniumAether"; hoverCar.ENABLE_WHEEL_SWAP = true; hoverCar.GROUND_WHEELS_PARENT = "Wheels"; hoverCar.HOVER_THRUSTERS_PARENT = "Hover"; hoverCar.FRONT_WHEEL_TRIM = 1f; hoverCar.REAR_WHEEL_TRIM = 1f; hoverCar.ASCENDING_FRONT_MULTIPLIER = 1.15f; hoverCar.DESCENDING_FRONT_MULTIPLIER = 1.15f; hoverCar.FORWARD_FRONT_MULTIPLIER = 2f; hoverCar.FORWARD_REAR_MULTIPLIER = 2f; hoverCar.HOVER_ALTITUDE_FORCE = 870f; hoverCar.HOVER_MOVE_FORCE = 400f; hoverCar.HOVER_STRAFE_FORCE = 2000f; hoverCar.HOVER_TURN_FORCE = 100f; hoverCar.HOVER_VERTICAL_FORCE = 1200f; hoverCar.HOVER_DRAG = 4f; hoverCar.HOVER_ANGULAR_DRAG = 10f; hoverCar.USE_MOUSE_LOOK_STEERING = true; hoverCar.MOUSE_TURN_SENSITIVITY = 111f; hoverCar.HOVER_UP_KEY = (KeyCode)32; hoverCar.HOVER_DOWN_KEY = (KeyCode)301; hoverCar.HOVER_STRAFE_LEFT_KEY = (KeyCode)97; hoverCar.HOVER_STRAFE_RIGHT_KEY = (KeyCode)100; } catch (Exception) { } VehicleFuelSystem component = ((Component)vehicle).GetComponent<VehicleFuelSystem>(); if ((Object)(object)component != (Object)null) { component.m_fuelTankSize = 10f; component.m_fuelConsumptionRate = 0.05f; component.m_requireFuelToDrive = true; component.ClearFuelTypes(); component.AddFuelType("ArcaniumAether", 3.5f, 1.7f, 4f, 1f); component.AddFuelType("Eitr", 2.7f, 2f, 2f, 1.5f); component.AddFuelType("Tar", 2.2f, 2f, 1.5f); component.AddFuelType("Coal", 1.7f, 1.7f, 1f, 2.5f); component.AddFuelType("Resin", 1f, 2f, 0.5f, 3f); } VehicleLightSystem component2 = ((Component)vehicle).GetComponent<VehicleLightSystem>(); if ((Object)(object)component2 != (Object)null) { component2.m_toggleLightsKey = (KeyCode)108; component2.m_turnSignalBlinkRate = 0.5f; component2.m_overrideLightSettings = false; component2.m_headLightIntensity = 2f; component2.m_brakeLightIntensity = 1.5f; component2.m_headLightColor = Color.white; component2.m_brakeLightColor = Color.red; component2.m_reverseLightColor = Color.white; component2.m_turnSignalColor = new Color(1f, 0.5f, 0f); } VehicleEffectSystem vehicleEffectSystem = ((Component)val3).gameObject.AddComponent<VehicleEffectSystem>(); vehicleEffectSystem.DISABLE_IGNITION_ON_MODE_SWITCH = true; vehicleEffectSystem.DRIVING_SPEED_THRESHOLD = 1f; vehicleEffectSystem.DUST_SPEED_THRESHOLD = 6f; vehicleEffectSystem.HONK_KEY = (KeyCode)104; vehicleEffectSystem.HONK_COOLDOWN = 0.5f; vehicleEffectSystem.HONK_SCARES_ENEMIES = true; vehicleEffectSystem.HONK_SCARE_RADIUS = 30f; vehicleEffectSystem.HONK_SCARE_DURATION = 10f; VehicleMissileSystem vehicleMissileSystem = ((Component)val3).gameObject.AddComponent<VehicleMissileSystem>(); vehicleMissileSystem.MISSILE_LAUNCH_DURATION = 0.3f; vehicleMissileSystem.MISSILE_LAUNCH_FORCE = 2f; vehicleMissileSystem.MISSILE_SWIRL_DURATION = 0.8f; vehicleMissileSystem.MISSILE_SWIRL_RADIUS = 3f; vehicleMissileSystem.MISSILE_SWIRL_SPEED = 8f; vehicleMissileSystem.MISSILE_CIRCLE_DURATION = 0.5f; vehicleMissileSystem.MISSILE_CIRCLE_RADIUS = 4f; vehicleMissileSystem.MISSILE_ACCEL_RATE = 1.5f; vehicleMissileSystem.MISSILE_MAX_SPEED = 2.5f; vehicleMissileSystem.MISSILE_MIN_SPEED = 0.8f; vehicleMissileSystem.MISSILE_TURN_SMOOTH = 10f; vehicleMissileSystem.GROUP1_ENABLED = true; vehicleMissileSystem.GROUP1_NAME = "Left Cannons"; vehicleMissileSystem.GROUP1_FIRE_KEY = (KeyCode)323; vehicleMissileSystem.GROUP1_SPAWN_POINTS = "Missile 1,Missile 2,Missile 3,Missile 4"; vehicleMissileSystem.GROUP1_MISSILES_PER_POINT = 1; vehicleMissileSystem.GROUP1_COOLDOWN = 25f; vehicleMissileSystem.GROUP1_STAGGER_DELAY = 0.4f; vehicleMissileSystem.GROUP1_TARGET_RANGE = 50f; vehicleMissileSystem.GROUP1_PROJECTILE_PREFAB = "batmissile_projectile"; vehicleMissileSystem.GROUP1_PROJECTILE_SPEED = 15f; vehicleMissileSystem.GROUP1_HOMING_STRENGTH = 0.8f; vehicleMissileSystem.GROUP1_AMMO_ITEM = "TurretBoltFlametal"; vehicleMissileSystem.GROUP1_AMMO_COST = 1; vehicleMissileSystem.GROUP1_LAUNCH_DURATION = 0.1f; vehicleMissileSystem.GROUP1_LAUNCH_FORCE = 1f; vehicleMissileSystem.GROUP1_SWIRL_DURATION = 0.8f; vehicleMissileSystem.GROUP1_SWIRL_RADIUS = 0.4f; vehicleMissileSystem.GROUP1_SWIRL_SPEED = 50f; vehicleMissileSystem.GROUP1_CIRCLE_DURATION = 0.5f; vehicleMissileSystem.GROUP1_CIRCLE_RADIUS = 4f; vehicleMissileSystem.GROUP1_ACCEL_RATE = 1.5f; vehicleMissileSystem.GROUP1_MAX_SPEED = 2.5f; vehicleMissileSystem.GROUP1_MIN_SPEED = 0.8f; vehicleMissileSystem.GROUP1_TURN_SMOOTH = 10f; vehicleMissileSystem.GROUP2_ENABLED = true; vehicleMissileSystem.GROUP2_NAME = "Right Cannons"; vehicleMissileSystem.GROUP2_FIRE_KEY = (KeyCode)324; vehicleMissileSystem.GROUP2_SPAWN_POINTS = "Missile 5,Missile 6,Missile 7,Missile 8"; vehicleMissileSystem.GROUP2_MISSILES_PER_POINT = 1; vehicleMissileSystem.GROUP2_COOLDOWN = 25f; vehicleMissileSystem.GROUP2_STAGGER_DELAY = 0.4f; vehicleMissileSystem.GROUP2_TARGET_RANGE = 50f; vehicleMissileSystem.GROUP2_PROJECTILE_PREFAB = "batmissile_projectile"; vehicleMissileSystem.GROUP2_PROJECTILE_SPEED = 15f; vehicleMissileSystem.GROUP2_HOMING_STRENGTH = 0.8f; vehicleMissileSystem.GROUP2_AMMO_ITEM = "TurretBoltFlametal"; vehicleMissileSystem.GROUP2_AMMO_COST = 1; vehicleMissileSystem.GROUP2_LAUNCH_DURATION = 0.1f; vehicleMissileSystem.GROUP2_LAUNCH_FORCE = 1f; vehicleMissileSystem.GROUP2_SWIRL_DURATION = 0.8f; vehicleMissileSystem.GROUP2_SWIRL_RADIUS = 0.4f; vehicleMissileSystem.GROUP2_SWIRL_SPEED = 50f; vehicleMissileSystem.GROUP2_CIRCLE_DURATION = 0.5f; vehicleMissileSystem.GROUP2_CIRCLE_RADIUS = 4f; vehicleMissileSystem.GROUP2_ACCEL_RATE = 1.5f; vehicleMissileSystem.GROUP2_MAX_SPEED = 2.5f; vehicleMissileSystem.GROUP2_MIN_SPEED = 0.8f; vehicleMissileSystem.GROUP2_TURN_SMOOTH = 10f; vehicleMissileSystem.GROUP3_ENABLED = false; vehicleMissileSystem.GROUP4_ENABLED = true; vehicleMissileSystem.GROUP4_NAME = "All Missiles"; vehicleMissileSystem.GROUP4_FIRE_KEY = (KeyCode)102; vehicleMissileSystem.GROUP4_SPAWN_POINTS = "Missile 1,Missile 2,Missile 3,Missile 4,Missile 5,Missile 6,Missile 7,Missile 8"; vehicleMissileSystem.GROUP4_MISSILES_PER_POINT = 1; vehicleMissileSystem.GROUP4_COOLDOWN = 40f; vehicleMissileSystem.GROUP4_STAGGER_DELAY = 0.4f; vehicleMissileSystem.GROUP4_TARGET_RANGE = 50f; vehicleMissileSystem.GROUP4_PROJECTILE_PREFAB = "batmissile_projectile"; vehicleMissileSystem.GROUP4_PROJECTILE_SPEED = 15f; vehicleMissileSystem.GROUP4_HOMING_STRENGTH = 0.8f; vehicleMissileSystem.GROUP4_AMMO_ITEM = "TurretBoltFlametal"; vehicleMissileSystem.GROUP4_AMMO_COST = 1; vehicleMissileSystem.GROUP4_LAUNCH_DURATION = 0.1f; vehicleMissileSystem.GROUP4_LAUNCH_FORCE = 1f; vehicleMissileSystem.GROUP4_SWIRL_DURATION = 1f; vehicleMissileSystem.GROUP4_SWIRL_RADIUS = 0.4f; vehicleMissileSystem.GROUP4_SWIRL_SPEED = 50f; vehicleMissileSystem.GROUP4_CIRCLE_DURATION = 1f; vehicleMissileSystem.GROUP4_CIRCLE_RADIUS = 4f; vehicleMissileSystem.GROUP4_ACCEL_RATE = 1f; vehicleMissileSystem.GROUP4_MAX_SPEED = 2.5f; vehicleMissileSystem.GROUP4_MIN_SPEED = 0.8f; vehicleMissileSystem.GROUP4_TURN_SMOOTH = 10f; VehicleGunSystem vehicleGunSystem = ((Component)val3).gameObject.AddComponent<VehicleGunSystem>(); vehicleGunSystem.GUN_PROJECTILE_PREFAB = "bow_projectile2"; vehicleGunSystem.GUN_PROJECTILE_SPEED = 80f; vehicleGunSystem.GUN_FIRE_RATE = 0.15f; vehicleGunSystem.GUN_FIRE_KEY = (KeyCode)325; vehicleGunSystem.AMMO_ITEM = "BlackMetal"; vehicleGunSystem.AMMO_COST_PER_SHOT = 1; vehicleGunSystem.FIRE_MODE = VehicleGunSystem.GunFireMode.Alternating; vehicleGunSystem.HEAT_PER_SHOT = 3f; vehicleGunSystem.HEAT_COOLDOWN_RATE = 5f; vehicleGunSystem.OVERHEAT_COOLDOWN_TIME = 10f; vehicleGunSystem.MAX_HEAT = 100f; vehicleGunSystem.LEFT_GUN_SPAWN_1 = "Gun L1"; vehicleGunSystem.LEFT_GUN_SPAWN_2 = "Gun L2"; vehicleGunSystem.RIGHT_GUN_SPAWN_1 = "Gun R1"; vehicleGunSystem.RIGHT_GUN_SPAWN_2 = "Gun R2"; vehicleGunSystem.SPAWN_POSITION_OFFSET = new Vector3(0f, 0f, 0f); vehicleGunSystem.SPAWN_ROTATION_OFFSET = new Vector3(0f, 180f, 0f); try { VehicleRadio vehicleRadio = ((Component)val3).gameObject.AddComponent<VehicleRadio>(); vehicleRadio.TOGGLE_RADIO_KEY = (KeyCode)114; vehicleRadio.NEXT_SONG_KEY = (KeyCode)93; vehicleRadio.PREV_SONG_KEY = (KeyCode)91; vehicleRadio.REFRESH_MUSIC_KEY = (KeyCode)256; vehicleRadio.RADIO_SPAWN_POINT = "Radio"; vehicleRadio.VOLUME = 1f; vehicleRadio.LOOP_SONGS = false; vehicleRadio.SHUFFLE = false; } catch (Exception) { } try { VehicleVideoSystem vehicleVideoSystem = ((Component)val3).gameObject.AddComponent<VehicleVideoSystem>(); vehicleVideoSystem.USE_LOCAL_FILES = true; vehicleVideoSystem.LOCAL_VIDEO_FOLDER = "ShawVideo(MP4-WebM-MOV-AVI-MKV-M4V)"; vehicleVideoSystem.TOGGLE_VIDEO_KEY = (KeyCode)118; vehicleVideoSystem.PLAY_PAUSE_KEY = (KeyCode)112; vehicleVideoSystem.NEXT_VIDEO_KEY = (KeyCode)281; vehicleVideoSystem.PREV_VIDEO_KEY = (KeyCode)280; vehicleVideoSystem.STOP_VIDEO_KEY = (KeyCode)8; vehicleVideoSystem.REFRESH_VIDEOS_KEY = (KeyCode)256; vehicleVideoSystem.VIDEO_VOLUME = 0.5f; vehicleVideoSystem.LOOP_VIDEOS = false; vehicleVideoSystem.AUTO_PLAY_NEXT = true; vehicleVideoSystem.SCREEN_LOCAL_POSITION = new Vector3(0f, 1.2f, 0.8f); vehicleVideoSystem.SCREEN_LOCAL_ROTATION = new Vector3(0f, 180f, 0f); vehicleVideoSystem.SCREEN_SCALE = new Vector3(1.6f, 0.9f, 1f); vehicleVideoSystem.RENDER_TEXTURE_WIDTH = 1920; vehicleVideoSystem.RENDER_TEXTURE_HEIGHT = 1080; } catch (Exception) { } Transform val4 = FindChildRecursive(val2.transform, "FuelTank"); Container val5 = ((val4 != null) ? ((Component)val4).GetComponent<Container>() : null); if ((Object)(object)val5 != (Object)null) { VehicleContainer vehicleContainer = ((Component)val3).gameObject.AddComponent<VehicleContainer>(); vehicleContainer.m_container = val5; vehicleContainer.m_updateInterval = 2f; vehicleContainer.m_loadParentName = "load"; vehicleContainer.m_loadVisNames = new string[10] { "default", "default (1)", "default (2)", "default (3)", "default (4)", "default (5)", "default (6)", "barrel", "bucket", "cookiemilk" }; vehicleContainer.m_loadVisPercentages = new float[10] { 1f, 10f, 20f, 30f, 40f, 50f, 60f, 80f, 95f, 100f }; } } VehicleHUD vehicleHUD = ((Component)val3).gameObject.AddComponent<VehicleHUD>(); vehicleHUD.TOGGLE_ALL_EXCEPT_MAIN_KEY = (KeyCode)262; vehicleHUD.SHOW_HUD = true; vehicleHUD.HUD_POSITION = new Vector2(150f, 0f); vehicleHUD.FONT_SIZE = 16; vehicleHUD.FONT_NAME = "Courier New"; vehicleHUD.TEXT_COLOR = Color.white; vehicleHUD.BAR_LENGTH = 10; vehicleHUD.SHOW_FUEL_PROFICIENCY = true; vehicleHUD.FUEL_PROFICIENCY_POSITION = new Vector2(413f, -200f); vehicleHUD.FUEL_PROFICIENCY_FONT_SIZE = 14; vehicleHUD.FUEL_PROFICIENCY_FONT_NAME = "Courier New"; vehicleHUD.FUEL_PROFICIENCY_TEXT_COLOR = Color.white; vehicleHUD.SHOW_VEHICLE_CONTROLS = true; vehicleHUD.VEHICLE_CONTROLS_POSITION = new Vector2(213f, 10f); vehicleHUD.VEHICLE_CONTROLS_FONT_SIZE = 14; vehicleHUD.VEHICLE_CONTROLS_FONT_NAME = "Courier New"; vehicleHUD.VEHICLE_CONTROLS_TEXT_COLOR = Color.white; vehicleHUD.SHOW_HOVER_CONTROLS = true; vehicleHUD.HOVER_CONTROLS_POSITION = new Vector2(-150f, 10f); vehicleHUD.HOVER_CONTROLS_FONT_SIZE = 14; vehicleHUD.HOVER_CONTROLS_FONT_NAME = "Courier New"; vehicleHUD.HOVER_CONTROLS_TEXT_COLOR = new Color(0f, 1f, 1f); vehicleHUD.SHOW_VIDEO_CONTROLS = true; vehicleHUD.VIDEO_CONTROLS_POSITION = new Vector2(500f, 10f); vehicleHUD.VIDEO_CONTROLS_FONT_SIZE = 14; vehicleHUD.VIDEO_CONTROLS_FONT_NAME = "Courier New"; vehicleHUD.VIDEO_CONTROLS_TEXT_COLOR = Color.white; vehicleHUD.SHOW_CAMERA_CONTROLS = true; vehicleHUD.CAMERA_CONTROLS_POSITION = new Vector2(200f, 10f); vehicleHUD.CAMERA_CONTROLS_FONT_SIZE = 14; vehicleHUD.CAMERA_CONTROLS_FONT_NAME = "Courier New"; vehicleHUD.CAMERA_CONTROLS_TEXT_COLOR = Color.white; ENABLE_CAMERA_ZOOM = true; MIN_CAMERA_DISTANCE = 0f; MAX_CAMERA_DISTANCE = 10f; DEFAULT_CAMERA_DISTANCE = 6f; ZOOM_SPEED = 2f; ZOOM_IN_KEY = (KeyCode)270; ZOOM_OUT_KEY = (KeyCode)269; RESET_ZOOM_KEY = (KeyCode)268; PREVENT_BODY_CULLING = true; ENABLE_POSITION_TOGGLE = true; TOGGLE_POSITION_KEY = (KeyCode)267; POSITION_PRESETS = (Vector3[])(object)new Vector3[4] { Vector3.zero, new Vector3(0f, 0f, -0.15f), new Vector3(0.3f, 0f, -0.2f), new Vector3(-0.3f, 0f, -0.2f) }; ENABLE_POSITION_ADJUSTMENT = true; POSITION_ADJUSTMENT_SPEED = 0.01f; ADJUST_LEFT_KEY = (KeyCode)276; ADJUST_RIGHT_KEY = (KeyCode)275; ADJUST_UP_KEY = (KeyCode)273; ADJUST_DOWN_KEY = (KeyCode)274; ADJUST_FORWARD_MODIFIER = (KeyCode)304; ENABLE_SAVE_SETTINGS = true; SAVE_SETTINGS_KEY = (KeyCode)278; CustomPiece customPiece = new CustomPiece(val2, true, val); RegistrationDebugLogger.AddPiece(customPiece); } public static void Adddhaktank() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: 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_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: 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_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_0415: Unknown result type (might be due to invalid IL or missing references) //IL_0443: Unknown result type (might be due to invalid IL or missing references) //IL_0520: Unknown result type (might be due to invalid IL or missing references) //IL_0634: Unknown result type (might be due to invalid IL or missing references) //IL_074d: Unknown result type (might be due to invalid IL or missing references) //IL_087e: Unknown result type (might be due to invalid IL or missing references) //IL_0910: Unknown result type (might be due to invalid IL or missing references) //IL_0915: Unknown result type (might be due to invalid IL or missing references) //IL_092b: Unknown result type (might be due to invalid IL or missing references) //IL_0930: Unknown result type (might be due to invalid IL or missing references) //IL_0947: Unknown result type (might be due to invalid IL or missing references) //IL_0950: Unknown result type (might be due to invalid IL or missing references) //IL_0959: Unknown result type (might be due to invalid IL or missing references) //IL_0965: Unknown result type (might be due to invalid IL or missing references) //IL_09c2: Unknown result type (might be due to invalid IL or missing references) //IL_09cb: Unknown result type (might be due to invalid IL or missing references) //IL_09d7: Unknown result type (might be due to invalid IL or missing references) //IL_09e3: Unknown result type (might be due to invalid IL or missing references) //IL_09eb: Unknown result type (might be due to invalid IL or missing references) //IL_09f7: Unknown result type (might be due to invalid IL or missing references) //IL_0a29: Unknown result type (might be due to invalid IL or missing references) //IL_0a2e: Unknown result type (might be due to invalid IL or missing references) //IL_0a44: Unknown result type (might be due to invalid IL or missing references) //IL_0a49: Unknown result type (might be due to invalid IL or missing references) //IL_0a5f: Unknown result type (might be due to invalid IL or missing references) //IL_0a64: Unknown result type (might be due to invalid IL or missing references) //IL_0b79: Unknown result type (might be due to invalid IL or missing references) //IL_0b92: Unknown result type (might be due to invalid IL or missing references) //IL_0b97: Unknown result type (might be due to invalid IL or missing references) //IL_0bb3: Unknown result type (might be due to invalid IL or missing references) //IL_0bb8: Unknown result type (might be due to invalid IL or missing references) //IL_0bda: Unknown result type (might be due to invalid IL or missing references) //IL_0bdf: Unknown result type (might be due to invalid IL or missing references) //IL_0bfb: Unknown result type (might be due to invalid IL or missing references) //IL_0c00: Unknown result type (might be due to invalid IL or missing references) //IL_0c19: Unknown result type (might be due to invalid IL or missing references) //IL_0c1e: Unknown result type (might be due to invalid IL or missing references) //IL_0c3a: Unknown result type (might be due to invalid IL or missing references) //IL_0c3f: Unknown result type (might be due to invalid IL or missing references) //IL_0c58: Unknown result type (might be due to invalid IL or missing references) //IL_0c5d: Unknown result type (might be due to invalid IL or missing references) //IL_0c79: Unknown result type (might be due to invalid IL or missing references) //IL_0c7e: Unknown result type (might be due to invalid IL or missing references) //IL_0c97: Unknown result type (might be due to invalid IL or missing references) //IL_0c9c: Unknown result type (might be due to invalid IL or missing references) //IL_0cb8: Unknown result type (might be due to invalid IL or missing references) //IL_0cbd: Unknown result type (might be due to invalid IL or missing references) PieceConfig val = new PieceConfig(); val.PieceTable = PieceTables.Hammer; val.CraftingStation = CraftingStations.Forge; val.Category = PieceCategories.Misc; val.AddRequirement(new RequirementConfig("MechanicalSpring", 25, 0, false)); val.AddRequirement(new RequirementConfig("CharredCogwheel", 25, 0, false)); val.AddRequirement(new RequirementConfig("BlackMetal", 200, 0, false)); val.AddRequirement(new RequirementConfig("FlametalNew", 100, 0, false)); GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeWagons/sdhaktank.prefab"); Transform val3 = FindChildRecursive(val2.transform, "driverseat"); if ((Object)(object)val3 != (Object)null) { Vehicle vehicle = ((Component)val3).gameObject.AddComponent<Vehicle>(); vehicle.DISABLE_DRIVING = false; vehicle.m_driveMode = Vehicle.DriveMode.RWD; vehicle.m_steeringMode = Vehicle.SteeringMode.Front; vehicle.m_wheelTorqueDir = new Vector3(0f, 0f, 1f); vehicle.m_forceMode = (ForceMode)1; TankTurret tankTurret = ((Component)val3).gameObject.AddComponent<TankTurret>(); tankTurret.ENABLE_TURRET_CONTROL = true; tankTurret.TURRET_PITCH_MIN = -45f; tankTurret.TURRET_PITCH_MAX = 20f; tankTurret.TURRET_YAW_GAMEOBJECT = "TankTop"; tankTurret.TURRET_PITCH_GAMEOBJECT = "TankBarrel"; vehicle.m_steeringOffset = new Vector3(0f, 0f, 0f); vehicle.m_wheelTorqueDir = new Vector3(0f, 0f, 1f); vehicle.m_forceMode = (ForceMode)1; vehicle.m_driverSeatPositionOffset = new Vector3(0f, 0f, 0f); vehicle.m_driverSeatRotationOffset = new Vector3(0f, 0f, 0f); vehicle.m_hoverText = "Vehicle"; vehicle.m_maxUseRange = 10f; vehicle.m_detachOffset = new Vector3(0f, 0.5f, 0f); vehicle.m_attachAnimation = "attach_chair"; vehicle.m_customAnimationController = Shawcassets.LoadAsset<RuntimeAnimatorController>("Assets/ShawesomeWagons/driverseat_animation.controller"); vehicle.m_wheelTorque = 100f; vehicle.m_maxSteeringAngle = 30f; vehicle.m_steeringSpeed = 2f; vehicle.m_forwardForce = 30f; vehicle.m_reverseForce = 10f; vehicle.m_turnForce = 5f; vehicle.m_downForce = 10f; vehicle.m_brakeForce = 80f; vehicle.m_brakeKey = (KeyCode)306; vehicle.m_fullStopBrakeForce = 200f; vehicle.m_mass = 100f; vehicle.m_drag = 1f; vehicle.m_angularDrag = 10f; vehicle.m_centerOfMassOffset = new Vector3(0f, 1f, 0f); VehicleFuelSystem vehicleFuelSystem = ((Component)val3).gameObject.AddComponent<VehicleFuelSystem>(); vehicleFuelSystem.m_fuelTankSize = 30f; vehicleFuelSystem.m_fuelConsumptionRate = 0.1f; vehicleFuelSystem.m_requireFuelToDrive = true; vehicleFuelSystem.ClearFuelTypes(); vehicleFuelSystem.AddFuelType("ArcaniumAether", 3.5f, 1.7f, 4f, 1f); vehicleFuelSystem.AddFuelType("Eitr", 2.7f, 2f, 2f, 1.5f); vehicleFuelSystem.AddFuelType("Tar", 2.2f, 2f, 1.5f); vehicleFuelSystem.AddFuelType("Coal", 1.7f, 1.7f, 1f, 2.5f); vehicleFuelSystem.AddFuelType("Resin", 1f, 2f, 0.5f, 3f); VehicleLightSystem vehicleLightSystem = ((Component)val3).gameObject.AddComponent<VehicleLightSystem>(); vehicleLightSystem.m_toggleLightsKey = (KeyCode)108; vehicleLightSystem.m_turnSignalBlinkRate = 0.5f; vehicleLightSystem.m_overrideLightSettings = false; vehicleLightSystem.m_headLightIntensity = 2f; vehicleLightSystem.m_brakeLightIntensity = 1.5f; vehicleLightSystem.m_headLightColor = Color.white; vehicleLightSystem.m_brakeLightColor = Color.red; vehicleLightSystem.m_reverseLightColor = Color.white; vehicleLightSystem.m_turnSignalColor = new Color(1f, 0.5f, 0f); VehicleEffectSystem vehicleEffectSystem = ((Component)val3).gameObject.AddComponent<VehicleEffectSystem>(); vehicleEffectSystem.DRIVING_SPEED_THRESHOLD = 1f; vehicleEffectSystem.DUST_SPEED_THRESHOLD = 6f; vehicleEffectSystem.HONK_KEY = (KeyCode)104; vehicleEffectSystem.HONK_COOLDOWN = 0.5f; vehicleEffectSystem.HONK_SCARES_ENEMIES = true; vehicleEffectSystem.HONK_SCARE_RADIUS = 30f; vehicleEffectSystem.HONK_SCARE_DURATION = 10f; VehicleMissileSystem vehicleMissileSystem = ((Component)val3).gameObject.AddComponent<VehicleMissileSystem>(); vehicleMissileSystem.MISSILE_LAUNCH_DURATION = 0.3f; vehicleMissileSystem.MISSILE_LAUNCH_FORCE = 2f; vehicleMissileSystem.MISSILE_SWIRL_DURATION = 0.8f; vehicleMissileSystem.MISSILE_SWIRL_RADIUS = 3f; vehicleMissileSystem.MISSILE_SWIRL_SPEED = 8f; vehicleMissileSystem.MISSILE_CIRCLE_DURATION = 0.5f; vehicleMissileSystem.MISSILE_CIRCLE_RADIUS = 4f; vehicleMissileSystem.MISSILE_ACCEL_RATE = 1.5f; vehicleMissileSystem.MISSILE_MAX_SPEED = 2.5f; vehicleMissileSystem.MISSILE_MIN_SPEED = 0.8f; vehicleMissileSystem.MISSILE_TURN_SMOOTH = 10f; vehicleMissileSystem.GROUP1_ENABLED = true; vehicleMissileSystem.GROUP1_NAME = "Left Cannons"; vehicleMissileSystem.GROUP1_FIRE_KEY = (KeyCode)323; vehicleMissileSystem.GROUP1_SPAWN_POINTS = "Missile 1,Missile 2,Missile 3"; vehicleMissileSystem.GROUP1_MISSILES_PER_POINT = 1; vehicleMissileSystem.GROUP1_COOLDOWN = 25f; vehicleMissileSystem.GROUP1_STAGGER_DELAY = 0.4f; vehicleMissileSystem.GROUP1_TARGET_RANGE = 50f; vehicleMissileSystem.GROUP1_PROJECTILE_PREFAB = "batmissile_projectile"; vehicleMissileSystem.GROUP1_PROJECTILE_SPEED = 15f; vehicleMissileSystem.GROUP1_HOMING_STRENGTH = 0.8f; vehicleMissileSystem.GROUP1_AMMO_ITEM = "TurretBoltFlametal"; vehicleMissileSystem.GROUP1_AMMO_COST = 1; vehicleMissileSystem.GROUP1_LAUNCH_DURATION = 0.1f; vehicleMissileSystem.GROUP1_LAUNCH_FORCE = 1f; vehicleMissileSystem.GROUP1_SWIRL_DURATION = 0.8f; vehicleMissileSystem.GROUP1_SWIRL_RADIUS = 0.4f; vehicleMissileSystem.GROUP1_SWIRL_SPEED = 50f; vehicleMissileSystem.GROUP1_CIRCLE_DURATION = 0.5f; vehicleMissileSystem.GROUP1_CIRCLE_RADIUS = 4f; vehicleMissileSystem.GROUP1_ACCEL_RATE = 1.5f; vehicleMissileSystem.GROUP1_MAX_SPEED = 2.5f; vehicleMissileSystem.GROUP1_MIN_SPEED = 0.8f; vehicleMissileSystem.GROUP1_TURN_SMOOTH = 10f; vehicleMissileSystem.GROUP2_ENABLED = true; vehicleMissileSystem.GROUP2_NAME = "Right Cannons"; vehicleMissileSystem.GROUP2_FIRE_KEY = (KeyCode)324; vehicleMissileSystem.GROUP2_SPAWN_POINTS = "Missile 5,Missile 6,Missile 7,Missile 8"; vehicleMissileSystem.GROUP2_MISSILES_PER_POINT = 1; vehicleMissileSystem.GROUP2_COOLDOWN = 25f; vehicleMissileSystem.GROUP2_STAGGER_DELAY = 0.4f; vehicleMissileSystem.GROUP2_TARGET_RANGE = 50f; vehicleMissileSystem.GROUP2_PROJECTILE_PREFAB = "batmissile_projectile"; vehicleMissileSystem.GROUP2_PROJECTILE_SPEED = 15f; vehicleMissileSystem.GROUP2_HOMING_STRENGTH = 0.8f; vehicleMissileSystem.GROUP2_AMMO_ITEM = "TurretBoltFlametal"; vehicleMissileSystem.GROUP2_AMMO_COST = 1; vehicleMissileSystem.GROUP2_LAUNCH_DURATION = 0.1f; vehicleMissileSystem.GROUP2_LAUNCH_FORCE = 1f; vehicleMissileSystem.GROUP2_SWIRL_DURATION = 0.8f; vehicleMissileSystem.GROUP2_SWIRL_RADIUS = 0.4f; vehicleMissileSystem.GROUP2_SWIRL_SPEED = 50f; vehicleMissileSystem.GROUP2_CIRCLE_DURATION = 0.5f; vehicleMissileSystem.GROUP2_CIRCLE_RADIUS = 4f; vehicleMissileSystem.GROUP2_ACCEL_RATE = 1.5f; vehicleMissileSystem.GROUP2_MAX_SPEED = 2.5f; vehicleMissileSystem.GROUP2_MIN_SPEED = 0.8f; vehicleMissileSystem.GROUP2_TURN_SMOOTH = 10f; vehicleMissileSystem.GROUP3_ENABLED = false; vehicleMissileSystem.GROUP4_ENABLED = true; vehicleMissileSystem.GROUP4_NAME = "Main Cannon"; vehicleMissileSystem.GROUP4_FIRE_KEY = (KeyCode)32; vehicleMissileSystem.GROUP4_SPAWN_POINTS = "Missile 4"; vehicleMissileSystem.GROUP4_MISSILES_PER_POINT = 1; vehicleMissileSystem.GROUP4_COOLDOWN = 5f; vehicleMissileSystem.GROUP4_STAGGER_DELAY = 0.4f; vehicleMissileSystem.GROUP4_TARGET_RANGE = 50f; vehicleMissileSystem.GROUP4_PROJECTILE_PREFAB = "batmissile_projectile"; vehicleMissileSystem.GROUP4_PROJECTILE_SPEED = 15f; vehicleMissileSystem.GROUP4_HOMING_STRENGTH = 1f; vehicleMissileSystem.GROUP4_AMMO_ITEM = "TurretBoltFlametal"; vehicleMissileSystem.GROUP4_AMMO_COST = 1; vehicleMissileSystem.GROUP4_LAUNCH_DURATION = 0.3f; vehicleMissileSystem.GROUP4_LAUNCH_FORCE = 1f; vehicleMissileSystem.GROUP4_SWIRL_DURATION = 1f; vehicleMissileSystem.GROUP4_SWIRL_RADIUS = 0.4f; vehicleMissileSystem.GROUP4_SWIRL_SPEED = 50f; vehicleMissileSystem.GROUP4_CIRCLE_DURATION = 0f; vehicleMissileSystem.GROUP4_CIRCLE_RADIUS = 0f; vehicleMissileSystem.GROUP4_ACCEL_RATE = 1f; vehicleMissileSystem.GROUP4_MAX_SPEED = 2.5f; vehicleMissileSystem.GROUP4_MIN_SPEED = 0.8f; vehicleMissileSystem.GROUP4_TURN_SMOOTH = 10f; VehicleGunSystem vehicleGunSystem = ((Component)val3).gameObject.AddComponent<VehicleGunSystem>(); vehicleGunSystem.GUN_PROJECTILE_PREFAB = "bow_projectile3"; vehicleGunSystem.GUN_PROJECTILE_SPEED = 44f; vehicleGunSystem.GUN_FIRE_RATE = 0.15f; vehicleGunSystem.GUN_FIRE_KEY = (KeyCode)325; vehicleGunSystem.AMMO_ITEM = "BlackMetal"; vehicleGunSystem.AMMO_COST_PER_SHOT = 1; vehicleGunSystem.FIRE_MODE = VehicleGunSystem.GunFireMode.Alternating; vehicleGunSystem.HEAT_PER_SHOT = 3f; vehicleGunSystem.HEAT_COOLDOWN_RATE = 5f; vehicleGunSystem.OVERHEAT_COOLDOWN_TIME = 10f; vehicleGunSystem.MAX_HEAT = 100f; vehicleGunSystem.LEFT_GUN_SPAWN_1 = "Guns L"; vehicleGunSystem.RIGHT_GUN_SPAWN_1 = "Guns R"; vehicleGunSystem.LEFT_GUN_SPAWN_2 = "Guns L1"; vehicleGunSystem.RIGHT_GUN_SPAWN_2 = "Guns R1"; vehicleGunSystem.SPAWN_POSITION_OFFSET = new Vector3(0f, 0f, 0f); vehicleGunSystem.SPAWN_ROTATION_OFFSET = new Vector3(0f, 180f, 0f); try { VehicleRadio vehicleRadio = ((Component)val3).gameObject.AddComponent<VehicleRadio>(); vehicleRadio.TOGGLE_RADIO_KEY = (KeyCode)114; vehicleRadio.NEXT_SONG_KEY = (KeyCode)93; vehicleRadio.PREV_SONG_KEY = (KeyCode)91; vehicleRadio.REFRESH_MUSIC_KEY = (KeyCode)256; vehicleRadio.RADIO_SPAWN_POINT = "Radio"; vehicleRadio.VOLUME = 1f; vehicleRadio.LOOP_SONGS = false; vehicleRadio.SHUFFLE = false; } catch (Exception) { } try { VehicleVideoSystem vehicleVideoSystem = ((Component)val3).gameObject.AddComponent<VehicleVideoSystem>(); vehicleVideoSystem.USE_LOCAL_FILES = true; vehicleVideoSystem.LOCAL_VIDEO_FOLDER = "ShawVideo(MP4-WebM-MOV-AVI-MKV-M4V)"; vehicleVideoSystem.TOGGLE_VIDEO_KEY = (KeyCode)118; vehicleVideoSystem.PLAY_PAUSE_KEY = (KeyCode)112; vehicleVideoSystem.NEXT_VIDEO_KEY = (KeyCode)281; vehicleVideoSystem.PREV_VIDEO_KEY = (KeyCode)280; vehicleVideoSystem.STOP_VIDEO_KEY = (KeyCode)8; vehicleVideoSystem.REFRESH_VIDEOS_KEY = (KeyCode)256; vehicleVideoSystem.VIDEO_VOLUME = 0.5f; vehicleVideoSystem.LOOP_VIDEOS = false; vehicleVideoSystem.AUTO_PLAY_NEXT = true; vehicleVideoSystem.SCREEN_LOCAL_POSITION = new Vector3(0f, 1.2f, 0.8f); vehicleVideoSystem.SCREEN_LOCAL_ROTATION = new Vector3(0f, 180f, 0f); vehicleVideoSystem.SCREEN_SCALE = new Vector3(1.6f, 0.9f, 1f); vehicleVideoSystem.RENDER_TEXTURE_WIDTH = 1920; vehicleVideoSystem.RENDER_TEXTURE_HEIGHT = 1080; } catch (Exception) { } Transform val4 = FindChildRecursive(val2.transform, "FuelTank"); Container val5 = ((val4 != null) ? ((Component)val4).GetComponent<Container>() : null); if ((Object)(object)val5 != (Object)null) { VehicleContainer vehicleContainer = ((Component)val3).gameObject.AddComponent<VehicleContainer>(); vehicleContainer.m_container = val5; vehicleContainer.m_updateInterval = 2f; vehicleContainer.m_loadParentName = "load"; vehicleContainer.m_loadVisNames = new string[10] { "default", "default (1)", "default (2)", "default (3)", "default (4)", "default (5)", "default (6)", "barrel", "bucket", "cookiemilk" }; vehicleContainer.m_loadVisPercentages = new float[10] { 1f, 10f, 20f, 30f, 40f, 50f, 60f, 80f, 95f, 100f }; } VehicleHUD vehicleHUD = ((Component)val3).gameObject.AddComponent<VehicleHUD>(); vehicleHUD.TOGGLE_ALL_EXCEPT_MAIN_KEY = (KeyCode)262; vehicleHUD.SHOW_HUD = true; vehicleHUD.HUD_POSITION = new Vector2(150f, 0f); vehicleHUD.FONT_SIZE = 16; vehicleHUD.FONT_NAME = "Courier New"; vehicleHUD.TEXT_COLOR = Color.white; vehicleHUD.BAR_LENGTH = 10; vehicleHUD.SHOW_FUEL_PROFICIENCY = true; vehicleHUD.FUEL_PROFICIENCY_POSITION = new Vector2(413f, -200f); vehicleHUD.FUEL_PROFICIENCY_FONT_SIZE = 14; vehicleHUD.FUEL_PROFICIENCY_FONT_NAME = "Courier New"; vehicleHUD.FUEL_PROFICIENCY_TEXT_COLOR = Color.white; vehicleHUD.SHOW_VEHICLE_CONTROLS = true; vehicleHUD.VEHICLE_CONTROLS_POSITION = new Vector2(213f, 10f); vehicleHUD.VEHICLE_CONTROLS_FONT_SIZE = 14; vehicleHUD.VEHICLE_CONTROLS_FONT_NAME = "Courier New"; vehicleHUD.VEHICLE_CONTROLS_TEXT_COLOR = Color.white; vehicleHUD.SHOW_VIDEO_CONTROLS = true; vehicleHUD.VIDEO_CONTROLS_POSITION = new Vector2(500f, 10f); vehicleHUD.VIDEO_CONTROLS_FONT_SIZE = 14; vehicleHUD.VIDEO_CONTROLS_FONT_NAME = "Courier New"; vehicleHUD.VIDEO_CONTROLS_TEXT_COLOR = Color.white; vehicleHUD.SHOW_CAMERA_CONTROLS = true; vehicleHUD.CAMERA_CONTROLS_POSITION = new Vector2(200f, 10f); vehicleHUD.CAMERA_CONTROLS_FONT_SIZE = 14; vehicleHUD.CAMERA_CONTROLS_FONT_NAME = "Courier New"; vehicleHUD.CAMERA_CONTROLS_TEXT_COLOR = Color.white; } RegistrationDebugLogger.RegisterPieceFromPrefab(val2, ((Object)val2).name, fixReference: true, val); } public static void Addsxfighter() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_0cdb: Unknown result type (might be due to invalid IL or missing references) //IL_0cf2: Unknown result type (might be due to invalid IL or missing references) //IL_0cf7: Unknown result type (might be due to invalid IL or missing references) //IL_0d10: Unknown result type (might be due to invalid IL or missing references) //IL_0d15: Unknown result type (might be due to invalid IL or missing references) //IL_0d34: Unknown result type (might be due to invalid IL or missing references) //IL_0d39: Unknown result type (might be due to invalid IL or missing references) //IL_0d52: Unknown result type (might be due to invalid IL or missing references) //IL_0d57: Unknown result type (might be due to invalid IL or missing references) //IL_0d6e: Unknown result type (might be due to invalid IL or missing references) //IL_0d73: Unknown result type (might be due to invalid IL or missing references) //IL_0d8c: Unknown result type (might be due to invalid IL or missing references) //IL_0d91: Unknown result type (might be due to invalid IL or missing references) //IL_0da8: Unknown result type (might be due to invalid IL or missing references) //IL_0dad: Unknown result type (might be due to invalid IL or missing references) //IL_0dd5: Unknown result type (might be due to invalid IL or missing references) //IL_0dda: Unknown result type (might be due to invalid IL or missing references) //IL_0df1: Unknown result type (might be due to invalid IL or missing references) //IL_0df6: Unknown result type (might be due to invalid IL or missing references) //IL_0e0f: Unknown result type (might be due to invalid IL or missing references) //IL_0e14: Unknown result type (might be due to invalid IL or missing references) //IL_0e2b: Unknown result type (might be due to invalid IL or missing references) //IL_0e30: Unknown result type (might be due to invalid IL or missing references) //IL_0e49: Unknown result type (might be due to invalid IL or missing references) //IL_0e4e: Unknown result type (might be due to invalid IL or missing references) //IL_0e86: Unknown result type (might be due to invalid IL or missing references) //IL_0e90: Unknown result type (might be due to invalid IL or missing references) //IL_0e9a: Unknown result type (might be due to invalid IL or missing references) //IL_0eb0: Unknown result type (might be due to invalid IL or missing references) //IL_0ebd: Unknown result type (might be due to invalid IL or missing references) //IL_0ec2: Unknown result type (might be due to invalid IL or missing references) //IL_0ed8: Unknown result type (might be due to invalid IL or missing references) //IL_0edd: Unknown result type (might be due to invalid IL or missing references) //IL_0ef3: Unknown result type (might be due to invalid IL or missing references) //IL_0ef8: Unknown result type (might be due to invalid IL or missing references) //IL_0f0e: Unknown result type (might be due to invalid IL or missing references) //IL_0f13: Unknown result type (might be due to invalid IL or missing references) //IL_0f32: Unknown result type (might be due to invalid IL or missing references) //IL_0f3c: Unknown result type (might be due to invalid IL or missing references) //IL_0f46: Unknown result type (might be due to invalid IL or missing references) //IL_0f50: Unknown result type (might be due to invalid IL or missing references) //IL_0f5a: Unknown result type (might be due to invalid IL or missing references) //IL_0f6a: Unknown result type (might be due to invalid IL or missing references) //IL_0f72: Unknown result type (might be due to invalid IL or missing references) //IL_0f79: Expected O, but got Unknown //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0105: 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_0112: 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_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: 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_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0209: 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_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: 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_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_0b01: Unknown result type (might be due to invalid IL or missing references) //IL_0b0a: Unknown result type (might be due to invalid IL or missing references) //IL_0b16: Unknown result type (might be due to invalid IL or missing references) //IL_0b22: Unknown result type (might be due to invalid IL or missing references) //IL_0b2a: Unknown result type (might be due to invalid IL or missing references) //IL_0b36: Unknown result type (might be due to invalid IL or missing references) //IL_0b68: Unknown result type (might be due to invalid IL or missing references) //IL_0b6d: Unknown result type (might be due to invalid IL or missing references) //IL_0b83: Unknown result type (might be due to invalid IL or missing references) //IL_0b88: Unknown result type (might be due to invalid IL or missing references) //IL_0b9e: Unknown result type (might be due to invalid IL or missing references) //IL_0ba3: Unknown result type (might be due to invalid IL or missing references) //IL_0582: Unknown result type (might be due to invalid IL or missing references) //IL_065f: Unknown result type (might be due to invalid IL or missing references) //IL_0773: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_09bd: Unknown result type (might be due to invalid IL or missing references) //IL_0a4f: Unknown result type (might be due to invalid IL or missing references) //IL_0a54: Unknown result type (might be due to invalid IL or missing references) //IL_0a6a: Unknown result type (might be due to invalid IL or missing references) //IL_0a6f: Unknown result type (might be due to invalid IL or missing references) //IL_04e0: Unknown result type (might be due to invalid IL or missing references) //IL_0513: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Unknown result type (might be due to invalid IL or missing references) //IL_051f: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Unknown result type (might be due to invalid IL or missing references) //IL_052b: Unknown result type (might be due to invalid IL or missing references) //IL_0530: Unknown result type (might be due to invalid IL or missing references) //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_054b: Unknown result type (might be due to invalid IL or missing references) //IL_0a86: Unknown result type (might be due to invalid IL or missing references) //IL_0a8f: Unknown result type (might be due to invalid IL or missing references) //IL_0a98: Unknown result type (might be due to invalid IL or missing references) //IL_0aa4: Unknown result type (might be due to invalid IL or missing references) PieceConfig val = new PieceConfig(); val.PieceTable = PieceTables.Hammer; val.CraftingStation = CraftingStations.Workbench; val.Category = PieceCategories.Misc; val.AddRequirement(new RequirementConfig("MechanicalSpring", 25, 0, false)); val.AddRequirement(new RequirementConfig("CharredCogwheel", 25, 0, false)); val.AddRequirement(new RequirementConfig("BlackMetal", 200, 0, false)); val.AddRequirement(new RequirementConfig("Flametal", 100, 0, false)); GameObject val2 = Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeWagons/Ulrichxfighter.prefab"); Transform val3 = FindChildRecursive(val2.transform, "driverseat"); if ((Object)(object)val3 != (Object)null) { Vehicle vehicle = ((Component)val3).gameObject.AddComponent<Vehicle>(); vehicle.DISABLE_DRIVING = true; vehicle.m_driveMode = Vehicle.DriveMode.RWD; vehicle.m_steeringMode = Vehicle.SteeringMode.Front; vehicle.m_steeringOffset = new Vector3(0f, 0f, 0f); vehicle.m_wheelTorqueDir = new Vector3(0f, 0f, 1f); vehicle.m_forceMode = (ForceMode)1; vehicle.m_driverSeatPositionOffset = new Vector3(0f, 0f, 0f); vehicle.m_driverSeatRotationOffset = new Vector3(0f, 0f, 0f); vehicle.m_hoverText = "Vehicle"; vehicle.m_maxUseRange = 10f; vehicle.m_detachOffset = new Vector3(0f, 0.5f, 0f); vehicle.m_attachAnimation = "attach_chair"; vehicle.m_customAnimationController = Shawcassets.LoadAsset<RuntimeAnimatorController>("Assets/ShawesomeWagons/driverseat_animation.controller"); vehicle.m_wheelTorque = 100f; vehicle.m_maxSteeringAngle = 30f; vehicle.m_steeringSpeed = 2f; vehicle.m_forwardForce = 30f; vehicle.m_reverseForce = 10f; vehicle.m_turnForce = 5f; vehicle.m_downForce = 10f; vehicle.m_brakeForce = 80f; vehicle.m_brakeKey = (KeyCode)306; vehicle.m_fullStopBrakeForce = 200f; vehicle.m_mass = 100f; vehicle.m_drag = 1f; vehicle.m_angularDrag = 10f; vehicle.m_centerOfMassOffset = new Vector3(0f, 1f, 0f); try { HoverCar hoverCar = val2.AddComponent<HoverCar>(); hoverCar.DISABLE_IGNITION_ON_MODE_SWITCH = true; hoverCar.ENABLE_HOVER_SYSTEM = true; hoverCar.TOGGLE_HOVER_KEY = (KeyCode)113; hoverCar.AIRBORNE_THRESHOLD = 2f; hoverCar.LEVEL_THRESHOLD = 10f; hoverCar.ENABLE_GROUND_TAKEOFF = true; hoverCar.TAKEOFF_HEIGHT = 3f; hoverCar.TAKEOFF_FORCE = 2000f; hoverCar.STABILIZATION_SPEED = 4f; hoverCar.AUTO_STABILIZE_AIRBORNE = true; hoverCar.REQUIRE_ARCANIUM_FUEL = true; hoverCar.REQUIRED_FUEL_NAME = "ArcaniumAether"; hoverCar.ENABLE_WHEEL_SWAP = true; hoverCar.GROUND_WHEELS_PARENT = "Wheels"; hoverCar.HOVER_THRUSTERS_PARENT = "Hover"; hoverCar.FRONT_WHEEL_TRIM = 1f; hoverCar.REAR_WHEEL_TRIM = 1f; hoverCar.ASCENDING_FRONT_MULTIPLIER = 0.7f; hoverCar.DESCENDING_FRONT_MULTIPLIER = 1.15f; hoverCar.FORWARD_FRONT_MULTIPLIER = 2f; hoverCar.FORWARD_REAR_MULTIPLIER = 2f; hoverCar.HOVER_ALTITUDE_FORCE = 890f; hoverCar.HOVER_MOVE_FORCE = 700f; hoverCar.HOVER_STRAFE_FORCE = 5000f; hoverCar.HOVER_TURN_FORCE = 5000f; hoverCar.HOVER_VERTICAL_FORCE = 3000f; hoverCar.HOVER_DRAG = 3f; hoverCar.HOVER_ANGULAR_DRAG = 8f; hoverCar.USE_MOUSE_LOOK_STEERING = true; hoverCar.MOUSE_TURN_SENSITIVITY = 7f; hoverCar.HOVER_UP_KEY = (KeyCode)32; hoverCar.HOVER_DOWN_KEY = (KeyCode)301; hoverCar.HOVER_STRAFE_LEFT_KEY = (KeyCode)97; hoverCar.HOVER_STRAFE_RIGHT_KEY = (KeyCode)100; } catch (Exception) { } VehicleFuelSystem component = ((Component)vehicle).GetComponent<VehicleFuelSystem>(); if ((Object)(object)component != (Object)null) { component.m_fuelTankSize = 10f; component.m_fuelConsumptionRate = 0.05f; component.m_requireFuelToDrive = true; component.ClearFuelTypes(); component.AddFuelType("ArcaniumAether", 3.5f, 1.7f, 4f, 1f); component.AddFuelType("Eitr", 2.7f, 2f, 2f, 1.5f); component.AddFuelType("Tar", 2.2f, 2f, 1.5f); component.AddFuelType("Coal", 1.7f, 1.7f, 1f, 2.5f); component.AddFuelType("Resin", 1f, 2f, 0.5f, 3f); } VehicleLightSystem component2 = ((Component)vehicle).GetComponent<VehicleLightSystem>(); if ((Object)(object)component2 != (Object)null) { component2.m_toggleLightsKey = (KeyCode)108; component2.m_turnSignalBlinkRate = 0.5f; component2.m_overrideLightSettings = false; component2.m_headLightIntensity = 2f; component2.m_brakeLightIntensity = 1.5f; component2.m_headLightColor = Color.white; component2.m_brakeLightColor = Color.red; component2.m_reverseLightColor = Color.white; component2.m_turnSignalColor = new Color(1f, 0.5f, 0f); } VehicleEffectSystem vehicleEffectSystem = ((Component)val3).gameObject.AddComponent<VehicleEffectSystem>(); vehicleEffectSystem.DISABLE_IGNITION_ON_MODE_SWITCH = true; vehicleEffectSystem.DRIVING_SPEED_THRESHOLD = 1f; vehicleEffectSystem.DUST_SPEED_THRESHOLD = 6f; vehicleEffectSystem.HONK_KEY = (KeyCode)104; vehicleEffectSystem.HONK_COOLDOWN = 0.5f; vehicleEffectSystem.HONK_SCARES_ENEMIES = true; vehicleEffectSystem.HONK_SCARE_RADIUS = 30f; vehicleEffectSystem.HONK_SCARE_DURATION = 10f; VehicleMissileSystem vehicleMissileSystem = ((Component)val3).gameObject.AddComponent<VehicleMissileSystem>(); vehicleMissileSystem.MISSILE_LAUNCH_DURATION = 0.3f; vehicleMissileSystem.MISSILE_LAUNCH_FORCE = 2f; vehicleMissileSystem.MISSILE_SWIRL_DURATION = 0.8f; vehicleMissileSystem.MISSILE_SWIRL_RADIUS = 3f; vehicleMissileSystem.MISSILE_SWIRL_SPEED = 8f; vehicleMissileSystem.MISSILE_CIRCLE_DURATION = 0.5f; vehicleMissileSystem.MISSILE_CIRCLE_RADIUS = 4f; vehicleMissileSystem.MISSILE_ACCEL_RATE = 1.5f; vehicleMissileSystem.MISSILE_MAX_SPEED = 2.5f; vehicleMissileSystem.MISSILE_MIN_SPEED = 0.8f; vehicleMissileSystem.MISSILE_TURN_SMOOTH = 10f; vehicleMissileSystem.GROUP1_ENABLED = true; vehicleMissileSystem.GROUP1_NAME = "Left Cannons"; vehicleMissileSystem.GROUP1_FIRE_KEY = (KeyCode)323; vehicleMissileSystem.GROUP1_SPAWN_POINTS = "Missile 1,Missile 2,Missile 3,Missile 4"; vehicleMissileSystem.GROUP1_MISSILES_PER_POINT = 1; vehicleMissileSystem.GROUP1_COOLDOWN = 25f; vehicleMissileSystem.GROUP1_STAGGER_DELAY = 0.4f; vehicleMissileSystem.GROUP1_TARGET_RANGE = 50f; vehicleMissileSystem.GROUP1_PROJECTILE_PREFAB = "batmissile_projectile"; vehicleMissileSystem.GROUP1_PROJECTILE_SPEED = 15f; vehicleMissileSystem.GROUP1_HOMING_STRENGTH = 0.8f; vehicleMissileSystem.GROUP1_AMMO_ITEM = "TurretBoltFlametal"; vehicleMissileSystem.GROUP1_AMMO_COST = 1; vehicleMissileSystem.GROUP1_LAUNCH_DURATION = 0.1f; vehicleMissileSystem.GROUP1_LAUNCH_FORCE = 1f; vehicleMissileSystem.GROUP1_SWIRL_DURATION = 0.8f; vehicleMissileSystem.GROUP1_SWIRL_RADIUS = 0.4f; vehicleMissileSystem.GROUP1_SWIRL_SPEED = 50f; vehicleMissileSystem.GROUP1_CIRCLE_DURATION = 0.5f; vehicleMissileSystem.GROUP1_CIRCLE_RADIUS = 4f; vehicleMissileSystem.GROUP1_ACCEL_RATE = 1.5f; vehicleMissileSystem.GROUP1_MAX_SPEED = 2.5f; vehicleMissileSystem.GROUP1_MIN_SPEED = 0.8f; vehicleMissileSystem.GROUP1_TURN_SMOOTH = 10f; vehicleMissileSystem.GROUP2_ENABLED = true; vehicleMissileSystem.GROUP2_NAME = "Right Cannons"; vehicleMissileSystem.GROUP2_FIRE_KEY = (KeyCode)324; vehicleMissileSystem.GROUP2_SPAWN_POINTS = "Missile 5,Missile 6,Missile 7,Missile 8"; vehicleMissileSystem.GROUP2_MISSILES_PER_POINT = 1; vehicleMissileSystem.GROUP2_COOLDOWN = 25f; vehicleMissileSystem.GROUP2_STAGGER_DELAY = 0.4f; vehicleMissileSystem.GROUP2_TARGET_RANGE = 50f; vehicleMissileSystem.GROUP2_PROJECTILE_PREFAB = "batmissile_projectile"; vehicleMissileSystem.GROUP2_PROJECTILE_SPEED = 15f; vehicleMissileSystem.GROUP2_HOMING_STRENGTH = 0.8f; vehicleMissileSystem.GROUP2_AMMO_ITEM = "TurretBoltFlametal"; vehicleMissileSystem.GROUP2_AMMO_COST = 1; vehicleMissileSystem.GROUP2_LAUNCH_DURATION = 0.1f; vehicleMissileSystem.GROUP2_LAUNCH_FORCE = 1f; vehicleMissileSystem.GROUP2_SWIRL_DURATION = 0.8f; vehicleMissileSystem.GROUP2_SWIRL_RADIUS = 0.4f; vehicleMissileSystem.GROUP2_SWIRL_SPEED = 50f; vehicleMissileSystem.GROUP2_CIRCLE_DURATION = 0.5f; vehicleMissileSystem.GROUP2_CIRCLE_RADIUS = 4f; vehicleMissileSystem.GROUP2_ACCEL_RATE = 1.5f; vehicleMissileSystem.GROUP2_MAX_SPEED = 2.5f; vehicleMissileSystem.GROUP2_MIN_SPEED = 0.8f; vehicleMissileSystem.GROUP2_TURN_SMOOTH = 10f; vehicleMissileSystem.GROUP3_ENABLED = false; vehicleMissileSystem.GROUP4_ENABLED = true; vehicleMissileSystem.GROUP4_NAME = "All Missiles"; vehicleMissileSystem.GROUP4_FIRE_KEY = (KeyCode)102; vehicleMissileSystem.GROUP4_SPAWN_POINTS = "Missile 1,Missile 2,Missile 3,Missile 4,Missile 5,Missile 6,Missile 7,Missile 8"; vehicleMissileSystem.GROUP4_MISSILES_PER_POINT = 1; vehicleMissileSystem.GROUP4_COOLDOWN = 40f; vehicleMissileSystem.GROUP4_STAGGER_DELAY = 0.4f; vehicleMissileSystem.GROUP4_TARGET_RANGE = 50f; vehicleMissileSystem.GROUP4_PROJECTILE_PREFAB = "batmissile_projectile"; vehicleMissileSystem.GROUP4_PROJECTILE_SPEED = 15f; vehicleMissileSystem.GROUP4_HOMING_STRENGTH = 0.8f; vehicleMissileSystem.GROUP4_AMMO_ITEM = "TurretBoltFlametal"; vehicleMissileSystem.GROUP4_AMMO_COST = 1; vehicleMissileSystem.GROUP4_LAUNCH_DURATION = 0.1f; vehicleMissileSystem.GROUP4_LAUNCH_FORCE = 1f; vehicleMissileSystem.GROUP4_SWIRL_DURATION = 1f; vehicleMissileSystem.GROUP4_SWIRL_RADIUS = 0.4f; vehicleMissileSystem.GROUP4_SWIRL_SPEED = 50f; vehicleMissileSystem.GROUP4_CIRCLE_DURATION = 1f; vehicleMissileSystem.GROUP4_CIRCLE_RADIUS = 4f; vehicleMissileSystem.GROUP4_ACCEL_RATE = 1f; vehicleMissileSystem.GROUP4_MAX_SPEED = 2.5f; vehicleMissileSystem.GROUP4_MIN_SPEED = 0.8f; vehicleMissileSystem.GROUP4_TURN_SMOOTH = 10f; VehicleGunSystem vehicleGunSystem = ((Component)val3).gameObject.AddComponent<VehicleGunSystem>(); vehicleGunSystem.GUN_PROJECTILE_PREFAB = "bow_projectile2"; vehicleGunSystem.GUN_PROJECTILE_SPEED = 80f; vehicleGunSystem.GUN_FIRE_RATE = 0.15f; vehicleGunSystem.GUN_FIRE_KEY = (KeyCode)325; vehicleGunSystem.AMMO_ITEM = "BlackMetal"; vehicleGunSystem.AMMO_COST_PER_SHOT = 1; vehicleGunSystem.FIRE_MODE = VehicleGunSystem.GunFireMode.Alternating; vehicleGunSystem.HEAT_PER_SHOT = 3f; vehicleGunSystem.HEAT_COOLDOWN_RATE = 5f; vehicleGunSystem.OVERHEAT_COOLDOWN_TIME = 10f; vehicleGunSystem.MAX_HEAT = 100f; vehicleGunSystem.LEFT_GUN_SPAWN_1 = "Gun L1"; vehicleGunSystem.LEFT_GUN_SPAWN_2 = "Gun L2"; vehicleGunSystem.RIGHT_GUN_SPAWN_1 = "Gun R1"; vehicleGunSystem.RIGHT_GUN_SPAWN_2 = "Gun R2"; vehicleGunSystem.SPAWN_POSITION_OFFSET = new Vector3(0f, 0f, 0f); vehicleGunSystem.SPAWN_ROTATION_OFFSET = new Vector3(0f, 180f, 0f); try { VehicleRadio vehicleRadio = ((Component)val3).gameObject.AddComponent<VehicleRadio>(); vehicleRadio.TOGGLE_RADIO_KEY = (KeyCode)114; vehicleRadio.NEXT_SONG_KEY = (KeyCode)93; vehicleRadio.PREV_SONG_KEY = (KeyCode)91; vehicleRadio.REFRESH_MUSIC_KEY = (KeyCode)256; vehicleRadio.RADIO_SPAWN_POINT = "Radio"; vehicleRadio.VOLUME = 1f; vehicleRadio.LOOP_SONGS = false; vehicleRadio.SHUFFLE = false; } catch (Exception) { } try { VehicleVideoSystem vehicleVideoSystem = ((Component)val3).gameObject.AddComponent<VehicleVideoSystem>(); vehicleVideoSystem.USE_LOCAL_FILES = true; vehicleVideoSystem.LOCAL_VIDEO_FOLDER = "ShawVideo(MP4-WebM-MOV-AVI-MKV-M4V)"; vehicleVideoSystem.TOGGLE_VIDEO_KEY = (KeyCode)118; vehicleVideoSystem.PLAY_PAUSE_KEY = (KeyCode)112; vehicleVideoSystem.NEXT_VIDEO_KEY = (KeyCode)281; vehicleVideoSystem.PREV_VIDEO_KEY = (KeyCode)280; vehicleVideoSystem.STOP_VIDEO_KEY = (KeyCode)8; vehicleVideoSystem.REFRESH_VIDEOS_KEY = (KeyCode)256; vehicleVideoSystem.VIDEO_VOLUME = 0.5f; vehicleVideoSystem.LOOP_VIDEOS = false; vehicleVideoSystem.AUTO_PLAY_NEXT = true; vehicleVideoSystem.SCREEN_LOCAL_POSITION = new Vector3(0f, 1.2f, 0.8f); vehicleVideoSystem.SCREEN_LOCAL_ROTATION = new Vector3(0f, 180f, 0f); vehicleVideoSystem.SCREEN_SCALE = new Vector3(1.6f, 0.9f, 1f); vehicleVideoSystem.RENDER_TEXTURE_WIDTH = 1920; vehicleVideoSystem.RENDER_TEXTURE_HEIGHT = 1080; vehicleVideoSystem.VIDEO_PLAYLIST = new List<string> { "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4", "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" }; } catch (Exception) { } Transform val4 = FindChildRecursive(val2.transform, "FuelTank"); Container val5 = ((val4 != null) ? ((Component)val4).GetComponent<Container>() : null); if ((Object)(object)val5 != (Object)null) { VehicleContainer vehicleContainer = ((Component)val3).gameObject.AddComponent<VehicleContainer>(); vehicleContainer.m_container = val5; vehicleContainer.m_updateInterval = 2f; vehicleContainer.m_loadParentName = "load"; vehicleContainer.m_loadVisNames = new string[10] { "default", "default (1)", "default (2)", "default (3)", "default (4)", "default (5)", "default (6)", "barrel", "bucket", "cookiemilk" }; vehicleContainer.m_loadVisPercentages = new float[10] { 1f, 10f, 20f, 30f, 40f, 50f, 60f, 80f, 95f, 100f }; } } VehicleHUD vehicleHUD = ((Component)val3).gameObject.AddComponent<VehicleHUD>(); vehicleHUD.TOGGLE_ALL_EXCEPT_MAIN_KEY = (KeyCode)262; vehicleHUD.SHOW_HUD = true; vehicleHUD.HUD_POSITION = new Vector2(150f, 0f); vehicleHUD.FONT_SIZE = 16; vehicleHUD.FONT_NAME = "Courier New"; vehicleHUD.TEXT_COLOR = Color.white; vehicleHUD.BAR_LENGTH = 10; vehicleHUD.SHOW_FUEL_PROFICIENCY = true; vehicleHUD.FUEL_PROFICIENCY_POSITION = new Vector2(413f, -200f); vehicleHUD.FUEL_PROFICIENCY_FONT_SIZE = 14; vehicleHUD.FUEL_PROFICIENCY_FONT_NAME = "Courier New"; vehicleHUD.FUEL_PROFICIENCY_TEXT_COLOR = Color.white; vehicleHUD.SHOW_VEHICLE_CONTROLS = true; vehicleHUD.VEHICLE_CONTROLS_POSITION = new Vector2(213f, 10f); vehicleHUD.VEHICLE_CONTROLS_FONT_SIZE = 14; vehicleHUD.VEHICLE_CONTROLS_FONT_NAME = "Courier New"; veh