Fix GameOptionsData modifications not applying (#6)

This commit is contained in:
DatGuy1 authored and GitHub committed 2021-02-04 07:59:43 +01:00
1 parent e90f6bcdbc
commit e39deea11e
2 files changed
+4 -7

No files matched your search

+4
View File
@@ -1,4 +1,5 @@
using System;
using System.Linq;
using BepInEx;
using BepInEx.IL2CPP;
using HarmonyLib;
@@ -27,6 +28,9 @@ namespace Reactor.Debugger
var gameObject = new GameObject(nameof(DebuggerPlugin)).DontDestroy();
Component = gameObject.AddComponent<DebuggerComponent>();
GameOptionsData.MaxImpostors = GameOptionsData.RecommendedImpostors = Enumerable.Repeat((int) byte.MaxValue, byte.MaxValue).ToArray();
GameOptionsData.MinPlayers = Enumerable.Repeat(1, 4).ToArray();
Harmony.PatchAll();
Extensions.Extensions.once_sceneLoaded((_, _) =>
-7
View File
@@ -1,16 +1,9 @@
using System.Linq;
using HarmonyLib;
namespace Reactor.Debugger.Patches
{
public static class Test
{
static Test()
{
GameOptionsData.MaxImpostors = GameOptionsData.RecommendedImpostors = Enumerable.Repeat((int) byte.MaxValue, byte.MaxValue).ToArray();
GameOptionsData.MinPlayers = Enumerable.Repeat(1, 4).ToArray();
}
[HarmonyPatch(typeof(GameStartManager), nameof(GameStartManager.Update))]
public static class UpdatePatch
{