Decompiled source of MorePlayers v1.0.0

WWAG_4Player.dll

Decompiled a year ago
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("WWAG_4Player")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("My first plugin")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("WWAG_4Player")]
[assembly: AssemblyTitle("WWAG_4Player")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[BepInPlugin("com.NikoTheFox.WWAG_4Player", "More players in Multiplayer", "1.0.0")]
public class FourPlayer : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Expected O, but got Unknown
		Harmony val = new Harmony("com.NikoTheFox.WWAG_4Player");
		val.PatchAll(Assembly.GetExecutingAssembly());
	}
}
[HarmonyPatch(typeof(NetworkSimpleHostPlayer), "StartClient")]
public static class StartClientPatch
{
	[HarmonyTranspiler]
	public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
	{
		List<CodeInstruction> list = new List<CodeInstruction>(instructions);
		for (int i = 0; i < list.Count; i++)
		{
			if (list[i].opcode == OpCodes.Ldc_I4_1)
			{
				list[i].operand = 15;
				list[i].opcode = OpCodes.Ldc_I4_S;
			}
		}
		return list.AsEnumerable();
	}
}
namespace WWAG_4Player;

public static class PluginInfo
{
	public const string PLUGIN_GUID = "WWAG_4Player";

	public const string PLUGIN_NAME = "WWAG_4Player";

	public const string PLUGIN_VERSION = "1.0.0";
}