using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace rxmJam_Face_PP_Bugfix
{
[BepInPlugin("realmscrossmyths.reyrealms.etg.rxm-jam_face-ppbugfix", "Prize Pistol Collission Bugfix", "1.0.0")]
[BepInDependency("etgmodding.etg.mtgapi", "1.9.2")]
[BepInDependency("alexandria.etgmod.alexandria", "0.5.10")]
public class Module : BaseUnityPlugin
{
[HarmonyPatch(typeof(PixelCollider), "Regenerate")]
internal static class WitchPistolFixPatch
{
private static void Postfix(PixelCollider __instance, Transform transform, bool allowRotation, bool allowScale)
{
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Invalid comparison between Unknown and I4
if (!allowScale || (int)__instance.ColliderGenerationMode > 0 || (__instance.m_dimensions.x >= 2 && __instance.m_dimensions.y >= 2))
{
return;
}
Projectile component = ((Component)transform).gameObject.GetComponent<Projectile>();
if (component != null)
{
Gun possibleSourceGun = component.PossibleSourceGun;
if (possibleSourceGun != null && !(((Object)possibleSourceGun).name != "ArtfulDodger_ChallengeGun"))
{
__instance.ManualWidth = Mathf.Max(__instance.ManualWidth, 4);
__instance.ManualHeight = Mathf.Max(__instance.ManualHeight, 4);
__instance.Regenerate(transform, false, false);
}
}
}
}
public const string GUID = "realmscrossmyths.reyrealms.etg.rxm-jam_face-ppbugfix";
public const string MOD_NAME = "Prize Pistol Collission Bugfix";
public const string VERSION = "1.0.0";
public const string MOD2_NAME = "The Jammed";
public const string MOD2_VERSION = "1.0.2";
public const string TEXT_COLOR1 = "#CCCCCC";
public const string TEXT_COLOR2 = "#DD0000";
public void Start()
{
ETGModMainBehaviour.WaitForGameManagerStart((Action<GameManager>)GMStart);
}
public void GMStart(GameManager manager)
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
try
{
new Harmony("realmscrossmyths.reyrealms.etg.rxm-jam_face-ppbugfix").PatchAll();
Log("Prize Pistol Collission Bugfix v1.0.0 from ", "The Jammed", " v1.0.2 started successfully.", "#CCCCCC", "#DD0000");
}
catch (Exception ex)
{
ETGModConsole.Log((object)ex.Message, false);
ETGModConsole.Log((object)ex.StackTrace, false);
}
}
public static void Log(string text1, string text2, string text3, string color1, string color2)
{
ETGModConsole.Log((object)("<color=" + color1 + ">" + text1 + "</color><color=" + color2 + ">" + text2 + "</color><color=" + color1 + ">" + text3 + "</color>"), false);
}
}
}