using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using HBMF.ModMenu;
using HarmonyLib;
using Il2CppGameCore.Effects;
using LargerMuzzleFlash;
using MelonLoader;
using MelonLoader.Preferences;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(Mod), "LargerMuzzleFlash", "1.1.0", "korbykob", null)]
[assembly: MelonGame("GexagonVR", "Hard Bullet")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("LargerMuzzleFlash")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("LargerMuzzleFlash")]
[assembly: AssemblyTitle("LargerMuzzleFlash")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace LargerMuzzleFlash;
[HarmonyPatch]
public class Mod : MelonMod
{
private static MelonPreferences_Entry<bool> enabled;
public override void OnInitializeMelon()
{
enabled = MelonPreferences.CreateCategory("LargerMuzzleFlash").CreateEntry<bool>("Enabled", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
Menu.CreateCategory("LARGER MUZZLE FLASH").CreateBool("ENABLE", enabled.Value, (Action<bool>)delegate(bool value)
{
enabled.Value = value;
});
}
[HarmonyPatch(typeof(PlayMuzzleFlashFromPool), "PlayEffect")]
[HarmonyPrefix]
public static bool Patch(PlayMuzzleFlashFromPool __instance)
{
//IL_001e: 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_008a: Unknown result type (might be due to invalid IL or missing references)
//IL_0060: 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)
GameObject muzzleFlashByPrefab = EffectsPool.instance.GetMuzzleFlashByPrefab(__instance._muzzleFlashPrefab);
muzzleFlashByPrefab.transform.position = ((Component)__instance).transform.position;
muzzleFlashByPrefab.transform.rotation = ((Component)__instance).transform.rotation;
if (enabled.Value)
{
muzzleFlashByPrefab.transform.localScale = __instance._muzzleFlashPrefab.transform.localScale * 2f;
}
else
{
muzzleFlashByPrefab.transform.localScale = __instance._muzzleFlashPrefab.transform.localScale;
}
muzzleFlashByPrefab.SetActive(true);
return false;
}
}