using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using FistVR; using HarmonyLib; using OtherLoader; using UnityEngine; using UnityEngine.Events; [assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] [module: UnverifiableCode] namespace KamikazeF0X.SWARM_25; [BepInPlugin("KamikazeF0X.SWARM_25", "SWARM_25", "1.0.2")] [BepInProcess("h3vr.exe")] [Description("Built with MeatKit")] [BepInDependency("h3vr.otherloader", "1.3.0")] public class SWARM_25Plugin : BaseUnityPlugin { private static readonly string BasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); internal static ManualLogSource Logger; private void Awake() { Logger = ((BaseUnityPlugin)this).Logger; LoadAssets(); } private void LoadAssets() { Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "KamikazeF0X.SWARM_25"); OtherLoader.RegisterDirectLoad(BasePath, "KamikazeF0X.SWARM_25", "", "", "swarm25", ""); } } public class PrefabLoader : MonoBehaviour { private AssetBundle LoadedPrefabAssetBundle; public string PrefabPath; public string Prefab_to_Load; private void Start() { LoadPrefab(PrefabPath); ActivatePrefab(Prefab_to_Load); } private void LoadPrefab(string bundleURL) { LoadedPrefabAssetBundle = AssetBundle.LoadFromFile(bundleURL); Debug.Log((object)((!((Object)(object)LoadedPrefabAssetBundle == (Object)null)) ? ("Loaded AssetBundle " + PrefabPath) : "AssetBundle Failed to load")); } private void ActivatePrefab(string Prefab_to_Load) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) Object val = LoadedPrefabAssetBundle.LoadAsset(Prefab_to_Load); Object.Instantiate(val, ((Component)this).transform.position, ((Component)this).transform.rotation); } } internal class Target : MonoBehaviour { [Tooltip("Clip to be played when shot.")] public List clips; [Tooltip("Range of volume for clip, chosen from randomly each time the target is shot.")] public Vector2 volumeRange = new Vector2(0.9f, 1.1f); [Tooltip("Range of pitch for clip, chosen from randomly each time the target is shot.")] public Vector2 pitchRange = new Vector2(0.97f, 1.03f); [Tooltip("Range of speed for clip, chosen from randomly each time the target is shot.")] public Vector2 speedRange = new Vector2(1f, 1f); [Tooltip("A Unity event, useful for triggering events that exist in base Unity code.")] public UnityEvent shotEvent; public void InitializeComponent() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown ReactiveSteelTarget val = ((Component)this).gameObject.AddComponent(); val.HitEvent = new AudioEvent(); val.HitEvent.Clips = clips; val.HitEvent.VolumeRange = volumeRange; val.HitEvent.PitchRange = pitchRange; val.HitEvent.ClipLengthRange = speedRange; if (val.HitEvent.Clips.Count == 0) { val.HitEvent.Clips = new List(); val.HitEvent.Clips.Add(new AudioClip()); } val.BulletHolePrefabs = (GameObject[])(object)new GameObject[0]; } }