Decompiled source of ArenaFix v0.1.1

Mods/ArenaFix.dll

Decompiled a year ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using ArenaFix;
using HarmonyLib;
using Il2CppSystem;
using MelonLoader;
using Microsoft.CodeAnalysis;
using SLZ.AI;
using SLZ.Bonelab;
using SLZ.Data;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("ArenaFix")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany(null)]
[assembly: AssemblyProduct("ArenaFix")]
[assembly: AssemblyCopyright("Copyright (c) 2023 Frederick (Millzy) Mills")]
[assembly: AssemblyTrademark(null)]
[assembly: ComVisible(false)]
[assembly: AssemblyFileVersion("0.1.1")]
[assembly: NeutralResourcesLanguage("en")]
[assembly: MelonInfo(typeof(Mod), "ArenaFix", "0.1.1", "Millzy", null)]
[assembly: MelonGame("Stress Level Zero", "BONELAB")]
[assembly: MelonID("dev.millzy.ArenaFix")]
[assembly: VerifyLoaderVersion("0.5.7")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("0.1.1.39618")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.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 ArenaFix
{
	public class Mod : MelonMod
	{
	}
	internal static class BuildInfo
	{
		public const string Name = "ArenaFix";

		public const string Author = "Millzy";

		public const string Version = "0.1.1";

		public const string Description = "Some minor patches to reduce/prevent softlocks in Fantasy Arena.";

		public const string Id = "dev.millzy.ArenaFix";
	}
}
namespace ArenaFix.HarmonyPatches
{
	[HarmonyPatch(typeof(Arena_GameController))]
	[HarmonyPatch("NPC_Registration")]
	public static class Arena_GameController_NPC_Registration
	{
		[HarmonyPrefix]
		private static void Prefix(NPC_Data data)
		{
			EnemyProfile enemyProfile = data.enemyProfile;
			if (enemyProfile.enemyTitle != "OMNI PROJECTOR HAZMAT")
			{
				enemyProfile.entranceTimeVal = 45f;
			}
		}
	}
	[HarmonyPatch(typeof(Arena_GameController))]
	[HarmonyPatch("Start")]
	public static class Arena_GameController_Start
	{
		[HarmonyPostfix]
		private static void Postfix(Arena_GameController __instance)
		{
			GenGameControl_Trigger nPCEntranceTrigger = __instance.NPCEntranceTrigger;
			nPCEntranceTrigger.OnNPC_ProxyExit += Action<TriggerRefProxy>.op_Implicit((Action<TriggerRefProxy>)delegate(TriggerRefProxy triggerRefProxy)
			{
				triggerRefProxy._aiManager.StartArenaEntranceTimer(45f);
			});
		}
	}
}