Decompiled source of HighQuotaRebalance Beta v0.4.5

HQRebalance.dll

Decompiled a week 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.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using GameNetcodeStuff;
using HQRebalance.Patches;
using HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("HQRebalance")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("HQRebalance")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("8ecf0e7a-a457-4359-ad0c-7f8bb4c29572")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace HQRebalance
{
	[BepInPlugin("OreoM.HQ60", "HQRebalance", "0.4.5")]
	public class HQRebalance : BaseUnityPlugin
	{
		private const string modGUID = "OreoM.HQ60";

		private const string modName = "HQRebalance";

		private const string modVersion = "0.4.5";

		internal static ManualLogSource mls;

		private readonly Harmony harmony = new Harmony("OreoM.HQ60");

		private static SelectableLevel[] patchedMoons;

		private void Awake()
		{
			mls = Logger.CreateLogSource("OreoM.HQ60");
			Patch();
			mls.LogInfo((object)"Patched");
		}

		private void Patch()
		{
			harmony.PatchAll(typeof(HQRebalance));
			harmony.PatchAll(typeof(JesterAIPatches));
			harmony.PatchAll(typeof(CaveDwellerAIPatches));
			harmony.PatchAll(typeof(TerminalPatches));
			harmony.PatchAll(typeof(StartOfRoundPatches));
			harmony.PatchAll(typeof(RoundManagerPatches));
			harmony.PatchAll(typeof(PlayerControllerBPatches));
			harmony.PatchAll(typeof(ManualCameraRendererPatches));
		}

		public static void SetupMoons(StartOfRound instance)
		{
			//IL_035e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0363: Unknown result type (might be due to invalid IL or missing references)
			//IL_0388: Unknown result type (might be due to invalid IL or missing references)
			//IL_038d: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cf: Expected O, but got Unknown
			//IL_0417: Unknown result type (might be due to invalid IL or missing references)
			//IL_041c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0441: Unknown result type (might be due to invalid IL or missing references)
			//IL_0446: Unknown result type (might be due to invalid IL or missing references)
			//IL_046b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0470: Unknown result type (might be due to invalid IL or missing references)
			//IL_047e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0488: Expected O, but got Unknown
			//IL_04ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0502: Unknown result type (might be due to invalid IL or missing references)
			//IL_0507: Unknown result type (might be due to invalid IL or missing references)
			//IL_052c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0531: Unknown result type (might be due to invalid IL or missing references)
			//IL_0556: Unknown result type (might be due to invalid IL or missing references)
			//IL_055b: Unknown result type (might be due to invalid IL or missing references)
			//IL_056a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0574: Expected O, but got Unknown
			//IL_0b6d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b72: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b84: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b8e: Expected O, but got Unknown
			//IL_0ed0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ed5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ee7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ef1: Expected O, but got Unknown
			if (patchedMoons != null)
			{
				instance.levels = patchedMoons;
				return;
			}
			patchedMoons = instance.levels;
			patchedMoons[6].minScrap = 21;
			patchedMoons[7].minScrap = 24;
			patchedMoons[7].maxScrap = 29;
			patchedMoons[8].minScrap = 18;
			patchedMoons[8].maxScrap = 22;
			patchedMoons[9].minScrap = 31;
			patchedMoons[9].maxScrap = 34;
			patchedMoons[10].minScrap = 32;
			patchedMoons[10].maxScrap = 37;
			patchedMoons[2].factorySizeMultiplier = 1f;
			patchedMoons[10].factorySizeMultiplier = 2f;
			patchedMoons[0].dungeonFlowTypes[0].rarity = 98;
			patchedMoons[0].dungeonFlowTypes[1].rarity = 1;
			patchedMoons[0].dungeonFlowTypes[2].rarity = 1;
			patchedMoons[1].dungeonFlowTypes[0].rarity = 49;
			patchedMoons[1].dungeonFlowTypes[1].rarity = 2;
			patchedMoons[1].dungeonFlowTypes[2].rarity = 49;
			patchedMoons[2].dungeonFlowTypes[0].rarity = 7;
			patchedMoons[2].dungeonFlowTypes[1].rarity = 1;
			patchedMoons[2].dungeonFlowTypes[2].rarity = 92;
			patchedMoons[5].dungeonFlowTypes[0].rarity = 13;
			patchedMoons[5].dungeonFlowTypes[1].rarity = 74;
			patchedMoons[5].dungeonFlowTypes[2].rarity = 13;
			patchedMoons[6].dungeonFlowTypes[1].rarity = 88;
			patchedMoons[6].dungeonFlowTypes[0].rarity = 2;
			patchedMoons[6].dungeonFlowTypes[2].rarity = 10;
			patchedMoons[7].dungeonFlowTypes[1].rarity = 10;
			patchedMoons[7].dungeonFlowTypes[0].rarity = 88;
			patchedMoons[7].dungeonFlowTypes[2].rarity = 2;
			patchedMoons[8].dungeonFlowTypes[0].rarity = 46;
			patchedMoons[8].dungeonFlowTypes[1].rarity = 8;
			patchedMoons[8].dungeonFlowTypes[2].rarity = 46;
			patchedMoons[9].dungeonFlowTypes[0].rarity = 2;
			patchedMoons[9].dungeonFlowTypes[1].rarity = 10;
			patchedMoons[9].dungeonFlowTypes[2].rarity = 88;
			patchedMoons[10].dungeonFlowTypes[0].rarity = 100;
			patchedMoons[10].dungeonFlowTypes[1].rarity = 100;
			patchedMoons[10].dungeonFlowTypes[2].rarity = 100;
			patchedMoons[12].dungeonFlowTypes[0].rarity = 76;
			patchedMoons[12].dungeonFlowTypes[1].rarity = 1;
			patchedMoons[12].dungeonFlowTypes[2].rarity = 23;
			Keyframe[] array = (Keyframe[])(object)new Keyframe[3]
			{
				new Keyframe(0f, 7.097602f, -12.1866f, -12.1866f, 0.3333f, 0.119f),
				new Keyframe(0.4764f, -1.126f, -27.2869f, -27.2869f, 0.1039f, 0.125f),
				new Keyframe(1f, -15f, 0f, 0f, 0f, 0f)
			};
			patchedMoons[8].daytimeEnemySpawnChanceThroughDay = new AnimationCurve(array);
			patchedMoons[8].daytimeEnemiesProbabilityRange = 1f;
			patchedMoons[8].spawnProbabilityRange = 8f;
			Keyframe[] array2 = (Keyframe[])(object)new Keyframe[3]
			{
				new Keyframe(0f, -3f, 19.70508f, 19.70508f, 0f, 0.2589182f),
				new Keyframe(0.3162474f, 2.817775f, 15.63821f, 15.63821f, 0.5307108f, 0.6788604f),
				new Keyframe(1f, 15f, 35.60403f, 35.60403f, 0.1551032f, 0f)
			};
			patchedMoons[6].enemySpawnChanceThroughoutDay = new AnimationCurve(array2);
			Keyframe[] array3 = (Keyframe[])(object)new Keyframe[5]
			{
				new Keyframe(0f, -3f, 15.1757f, 15.1757f, 0f, 0.3430422f),
				new Keyframe(0.1625553f, 1.142029f, 9.178675f, 9.178675f, 0.6591896f, 0.6591896f),
				new Keyframe(0.4976344f, 5.041142f, 6.361235f, 6.361235f, 0.3227605f, 0.3704014f),
				new Keyframe(0.6644974f, 6.988362f, 2.044127f, 2.044127f, 0.4955147f, 0.4224021f),
				new Keyframe(1f, 15f, 14.53138f, 14.53138f, 0.3106435f, 0f)
			};
			patchedMoons[10].enemySpawnChanceThroughoutDay = new AnimationCurve(array3);
			AnimationCurve numberToSpawn = patchedMoons[5].spawnableMapObjects[0].numberToSpawn;
			AnimationCurve numberToSpawn2 = patchedMoons[10].spawnableMapObjects[0].numberToSpawn;
			AnimationCurve numberToSpawn3 = patchedMoons[10].spawnableMapObjects[1].numberToSpawn;
			AnimationCurve numberToSpawn4 = patchedMoons[10].spawnableMapObjects[2].numberToSpawn;
			patchedMoons[6].spawnableMapObjects[0].numberToSpawn = numberToSpawn;
			patchedMoons[6].spawnableMapObjects[1].numberToSpawn = numberToSpawn4;
			patchedMoons[7].spawnableMapObjects[0].numberToSpawn = numberToSpawn3;
			patchedMoons[7].spawnableMapObjects[1].numberToSpawn = numberToSpawn;
			patchedMoons[7].spawnableMapObjects[2].numberToSpawn = numberToSpawn;
			patchedMoons[9].spawnableMapObjects[0].numberToSpawn = numberToSpawn2;
			patchedMoons[9].spawnableMapObjects[1].numberToSpawn = numberToSpawn;
			patchedMoons[9].spawnableMapObjects[2].numberToSpawn = numberToSpawn;
			Lootpool lootpool = new Lootpool(13, 0, 80, 29, 0, 2, 6, 0, 0, 13, 0, 0, 5, 32, 9, 10, 0, 42, 0, 17, 1, 0, 0, 22, 25, 80, 11, 0, 0, 66, 0, 0, 0, 0, 4, 8, 12, 0, 0, 8, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 0, 6, 1);
			Lootpool lootpool2 = new Lootpool(19, 18, 59, 100, 26, 0, 6, 0, 0, 19, 15, 12, 49, 0, 36, 34, 0, 10, 39, 18, 0, 0, 7, 14, 23, 35, 8, 0, 21, 23, 12, 7, 0, 0, 7, 19, 10, 12, 13, 0, 0, 23, 19, 34, 32, 0, 19, 0, 31, 6, 0, 3, 40, 11, 17, 1);
			Lootpool lootpool3 = new Lootpool(35, 33, 31, 54, 46, 0, 8, 51, 0, 35, 0, 12, 29, 0, 28, 39, 0, 30, 27, 20, 0, 0, 0, 8, 27, 25, 8, 0, 29, 16, 24, 11, 0, 0, 5, 22, 30, 19, 12, 0, 24, 22, 17, 40, 40, 0, 34, 0, 13, 7, 0, 0, 25, 6, 16, 1);
			Lootpool lootpool4 = new Lootpool(43, 0, 72, 48, 0, 2, 4, 0, 0, 43, 0, 11, 24, 0, 65, 0, 0, 42, 20, 24, 5, 0, 0, 0, 0, 49, 6, 0, 19, 42, 0, 6, 0, 0, 21, 27, 28, 4, 13, 0, 0, 19, 0, 29, 24, 0, 32, 0, 18, 9, 0, 0, 60, 0, 8, 1);
			Lootpool lootpool5 = new Lootpool(18, 0, 89, 63, 0, 0, 0, 0, 6, 18, 61, 40, 16, 0, 19, 0, 0, 40, 31, 19, 0, 0, 3, 17, 0, 67, 10, 0, 20, 65, 0, 8, 0, 0, 23, 19, 28, 0, 15, 0, 0, 0, 0, 27, 24, 11, 18, 0, 19, 9, 6, 61, 80, 0, 28, 1);
			Lootpool lootpool6 = new Lootpool(24, 57, 31, 68, 36, 0, 9, 52, 0, 24, 0, 31, 40, 0, 50, 29, 0, 30, 13, 23, 0, 0, 0, 21, 28, 27, 17, 0, 25, 16, 13, 9, 0, 0, 19, 24, 32, 17, 24, 0, 25, 0, 6, 40, 32, 0, 40, 0, 17, 9, 0, 0, 29, 14, 16, 1);
			Lootpool lootpool7 = new Lootpool(19, 44, 0, 6, 0, 3, 38, 0, 12, 19, 63, 5, 0, 0, 21, 0, 85, 0, 7, 82, 0, 14, 93, 0, 4, 0, 13, 23, 35, 0, 18, 17, 85, 89, 0, 0, 9, 17, 0, 19, 16, 28, 0, 0, 11, 91, 61, 0, 52, 73, 94, 63, 0, 0, 0, 1);
			Lootpool lootpool8 = new Lootpool(40, 47, 0, 18, 0, 3, 41, 0, 0, 40, 27, 0, 0, 0, 44, 0, 80, 0, 8, 41, 0, 62, 73, 0, 12, 12, 55, 24, 14, 0, 48, 37, 80, 67, 0, 0, 5, 50, 0, 67, 25, 0, 0, 0, 11, 56, 7, 21, 33, 94, 0, 27, 19, 0, 0, 1);
			Lootpool lootpool9 = new Lootpool(39, 37, 47, 33, 0, 0, 0, 0, 0, 39, 43, 0, 0, 0, 0, 0, 31, 0, 0, 23, 0, 33, 45, 0, 8, 38, 10, 16, 35, 0, 21, 22, 51, 14, 0, 0, 16, 38, 0, 36, 24, 0, 0, 0, 30, 21, 8, 36, 20, 35, 0, 46, 28, 0, 0, 1);
			Lootpool lootpool10 = new Lootpool(39, 56, 0, 17, 0, 0, 26, 0, 69, 31, 57, 0, 0, 0, 19, 0, 53, 0, 11, 15, 32, 55, 55, 0, 33, 16, 10, 30, 42, 0, 35, 25, 62, 14, 0, 0, 16, 20, 0, 42, 60, 39, 0, 0, 30, 27, 20, 52, 44, 64, 22, 57, 30, 0, 0, 1);
			Lootpool lootpool11 = new Lootpool(23, 0, 66, 52, 0, 0, 0, 0, 0, 18, 0, 14, 52, 0, 52, 0, 0, 0, 0, 17, 0, 0, 0, 9, 0, 81, 6, 0, 14, 100, 0, 8, 0, 0, 0, 0, 28, 0, 28, 0, 0, 26, 0, 28, 23, 12, 45, 0, 25, 43, 0, 0, 80, 0, 14, 1);
			patchedMoons[0].spawnableScrap = lootpool.GetLootpool();
			patchedMoons[1].spawnableScrap = lootpool2.GetLootpool();
			patchedMoons[2].spawnableScrap = lootpool3.GetLootpool();
			patchedMoons[4].spawnableScrap = lootpool4.GetLootpool();
			patchedMoons[8].spawnableScrap = lootpool5.GetLootpool();
			patchedMoons[5].spawnableScrap = lootpool6.GetLootpool();
			patchedMoons[6].spawnableScrap = lootpool7.GetLootpool();
			patchedMoons[7].spawnableScrap = lootpool8.GetLootpool();
			patchedMoons[9].spawnableScrap = lootpool9.GetLootpool();
			patchedMoons[10].spawnableScrap = lootpool10.GetLootpool();
			patchedMoons[12].spawnableScrap = lootpool11.GetLootpool();
			patchedMoons[4].DaytimeEnemies[0].rarity = 40;
			patchedMoons[4].DaytimeEnemies[2].rarity = 100;
			SpawnableEnemyWithRarity item = new SpawnableEnemyWithRarity
			{
				enemyType = ((EnemyAI)Resources.FindObjectsOfTypeAll<GiantKiwiAI>()[0]).enemyType,
				rarity = 100
			};
			patchedMoons[8].DaytimeEnemies.Add(item);
			patchedMoons[6].Enemies[2].rarity = 40;
			patchedMoons[6].Enemies[3].rarity = 30;
			patchedMoons[6].Enemies[4].rarity = 5;
			patchedMoons[6].Enemies[5].rarity = 50;
			patchedMoons[6].Enemies[6].rarity = 60;
			patchedMoons[6].Enemies[7].rarity = 40;
			patchedMoons[6].Enemies[8].rarity = 0;
			patchedMoons[6].Enemies[11].rarity = 20;
			patchedMoons[6].Enemies[12].rarity = 10;
			patchedMoons[6].Enemies.RemoveAll((SpawnableEnemyWithRarity i) => i.rarity == 0);
			patchedMoons[7].Enemies[4].rarity = 3;
			patchedMoons[7].Enemies[9].rarity = 10;
			patchedMoons[7].Enemies[10].rarity = 0;
			patchedMoons[7].Enemies[11].rarity = 8;
			patchedMoons[7].Enemies[12].rarity = 30;
			patchedMoons[7].Enemies[13].rarity = 20;
			patchedMoons[7].Enemies[14].rarity = 8;
			patchedMoons[7].Enemies.RemoveAll((SpawnableEnemyWithRarity i) => i.rarity == 0);
			patchedMoons[9].Enemies[0].rarity = 20;
			patchedMoons[9].Enemies[2].rarity = 60;
			patchedMoons[9].Enemies[3].rarity = 60;
			patchedMoons[9].Enemies[4].rarity = 30;
			patchedMoons[9].Enemies[5].rarity = 60;
			patchedMoons[9].Enemies[6].rarity = 60;
			patchedMoons[9].Enemies[7].rarity = 60;
			patchedMoons[9].Enemies[8].rarity = 80;
			patchedMoons[9].Enemies[9].rarity = 60;
			patchedMoons[9].Enemies[10].rarity = 0;
			patchedMoons[9].Enemies[11].rarity = 60;
			patchedMoons[9].Enemies[12].rarity = 30;
			SpawnableEnemyWithRarity item2 = new SpawnableEnemyWithRarity
			{
				enemyType = ((EnemyAI)Resources.FindObjectsOfTypeAll<ButlerEnemyAI>()[0]).enemyType,
				rarity = 20
			};
			patchedMoons[9].Enemies.Add(item2);
			patchedMoons[9].Enemies.RemoveAll((SpawnableEnemyWithRarity i) => i.rarity == 0);
			patchedMoons[7].OutsideEnemies[0].rarity = 0;
			patchedMoons[7].OutsideEnemies[2].rarity = 35;
			patchedMoons[7].OutsideEnemies[3].rarity = 35;
			patchedMoons[7].OutsideEnemies.RemoveAll((SpawnableEnemyWithRarity i) => i.rarity == 0);
			patchedMoons[9].OutsideEnemies[2].rarity = 0;
			patchedMoons[9].OutsideEnemies[3].rarity = 14;
			patchedMoons[9].Enemies.RemoveAll((SpawnableEnemyWithRarity i) => i.rarity == 0);
			instance.levels = patchedMoons;
		}
	}
	internal class Lootpool
	{
		public static Dictionary<string, Item> itemList = Resources.FindObjectsOfTypeAll<Item>().ToDictionary((Item item) => ((Object)item).name);

		private readonly List<SpawnableItemWithRarity> lootpoll;

		public Lootpool(int airhorn, int bell, int big_bolt, int bottles, int brush, int candy, int cash_register, int chemical_jug, int clock, int clown_horn, int comedy, int control_pad, int cookie_mold, int dust_pan, int easter_egg, int egg_beater, int fancy_lamp, int flask, int garbage_lid, int gift_box, int gold_bar, int golden_cup, int hairdryer, int flashbang, int pickles, int large_axle, int laser_pointer, int magic_ball, int mag_glass, int metal_sheet, int mug, int old_phone, int painting, int perfume, int pill_bottle, int plastic_cup, int plastic_fish, int red_soda, int remote, int ring, int rubber_duck, int soccer_ball, int wheel, int stop_sign, int tea_kettle, int teeth, int toiler_paper, int toothpaste, int toy_cube, int toy_robot, int toy_train, int tragedy, int engine, int whoopie, int yield_sign, int zed_dog)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Expected O, but got Unknown
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Expected O, but got Unknown
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Expected O, but got Unknown
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Expected O, but got Unknown
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Expected O, but got Unknown
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Expected O, but got Unknown
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Expected O, but got Unknown
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Expected O, but got Unknown
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Expected O, but got Unknown
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Expected O, but got Unknown
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: Expected O, but got Unknown
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d0: Expected O, but got Unknown
			//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f4: Expected O, but got Unknown
			//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0218: Expected O, but got Unknown
			//IL_0219: Unknown result type (might be due to invalid IL or missing references)
			//IL_021e: Unknown result type (might be due to invalid IL or missing references)
			//IL_022f: Unknown result type (might be due to invalid IL or missing references)
			//IL_023c: Expected O, but got Unknown
			//IL_023d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0242: Unknown result type (might be due to invalid IL or missing references)
			//IL_0253: Unknown result type (might be due to invalid IL or missing references)
			//IL_0260: Expected O, but got Unknown
			//IL_0261: Unknown result type (might be due to invalid IL or missing references)
			//IL_0266: Unknown result type (might be due to invalid IL or missing references)
			//IL_0277: Unknown result type (might be due to invalid IL or missing references)
			//IL_0284: Expected O, but got Unknown
			//IL_0285: Unknown result type (might be due to invalid IL or missing references)
			//IL_028a: Unknown result type (might be due to invalid IL or missing references)
			//IL_029b: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a8: Expected O, but got Unknown
			//IL_02a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cc: Expected O, but got Unknown
			//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f0: Expected O, but got Unknown
			//IL_02f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0307: Unknown result type (might be due to invalid IL or missing references)
			//IL_0314: Expected O, but got Unknown
			//IL_0315: Unknown result type (might be due to invalid IL or missing references)
			//IL_031a: Unknown result type (might be due to invalid IL or missing references)
			//IL_032b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0338: Expected O, but got Unknown
			//IL_0339: Unknown result type (might be due to invalid IL or missing references)
			//IL_033e: Unknown result type (might be due to invalid IL or missing references)
			//IL_034f: Unknown result type (might be due to invalid IL or missing references)
			//IL_035c: Expected O, but got Unknown
			//IL_035d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0362: Unknown result type (might be due to invalid IL or missing references)
			//IL_0373: Unknown result type (might be due to invalid IL or missing references)
			//IL_0380: Expected O, but got Unknown
			//IL_0381: Unknown result type (might be due to invalid IL or missing references)
			//IL_0386: Unknown result type (might be due to invalid IL or missing references)
			//IL_0397: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a4: Expected O, but got Unknown
			//IL_03a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c8: Expected O, but got Unknown
			//IL_03c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_03df: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ec: Expected O, but got Unknown
			//IL_03ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0403: Unknown result type (might be due to invalid IL or missing references)
			//IL_0410: Expected O, but got Unknown
			//IL_0411: Unknown result type (might be due to invalid IL or missing references)
			//IL_0416: Unknown result type (might be due to invalid IL or missing references)
			//IL_0427: Unknown result type (might be due to invalid IL or missing references)
			//IL_0434: Expected O, but got Unknown
			//IL_0435: Unknown result type (might be due to invalid IL or missing references)
			//IL_043a: Unknown result type (might be due to invalid IL or missing references)
			//IL_044b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0458: Expected O, but got Unknown
			//IL_0459: Unknown result type (might be due to invalid IL or missing references)
			//IL_045e: Unknown result type (might be due to invalid IL or missing references)
			//IL_046f: Unknown result type (might be due to invalid IL or missing references)
			//IL_047c: Expected O, but got Unknown
			//IL_047d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0482: Unknown result type (might be due to invalid IL or missing references)
			//IL_0493: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a0: Expected O, but got Unknown
			//IL_04a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c4: Expected O, but got Unknown
			//IL_04c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_04db: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e8: Expected O, but got Unknown
			//IL_04e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_050c: Expected O, but got Unknown
			//IL_050d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0512: Unknown result type (might be due to invalid IL or missing references)
			//IL_0523: Unknown result type (might be due to invalid IL or missing references)
			//IL_0530: Expected O, but got Unknown
			//IL_0531: Unknown result type (might be due to invalid IL or missing references)
			//IL_0536: Unknown result type (might be due to invalid IL or missing references)
			//IL_0547: Unknown result type (might be due to invalid IL or missing references)
			//IL_0554: Expected O, but got Unknown
			//IL_0555: Unknown result type (might be due to invalid IL or missing references)
			//IL_055a: Unknown result type (might be due to invalid IL or missing references)
			//IL_056b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0578: Expected O, but got Unknown
			//IL_0579: Unknown result type (might be due to invalid IL or missing references)
			//IL_057e: Unknown result type (might be due to invalid IL or missing references)
			//IL_058f: Unknown result type (might be due to invalid IL or missing references)
			//IL_059c: Expected O, but got Unknown
			//IL_059d: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c0: Expected O, but got Unknown
			//IL_05c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e4: Expected O, but got Unknown
			//IL_05e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_05fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0608: Expected O, but got Unknown
			//IL_0609: Unknown result type (might be due to invalid IL or missing references)
			//IL_060e: Unknown result type (might be due to invalid IL or missing references)
			//IL_061f: Unknown result type (might be due to invalid IL or missing references)
			//IL_062c: Expected O, but got Unknown
			//IL_062d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0632: Unknown result type (might be due to invalid IL or missing references)
			//IL_0643: Unknown result type (might be due to invalid IL or missing references)
			//IL_0650: Expected O, but got Unknown
			//IL_0651: Unknown result type (might be due to invalid IL or missing references)
			//IL_0656: Unknown result type (might be due to invalid IL or missing references)
			//IL_0667: Unknown result type (might be due to invalid IL or missing references)
			//IL_0674: Expected O, but got Unknown
			//IL_0675: Unknown result type (might be due to invalid IL or missing references)
			//IL_067a: Unknown result type (might be due to invalid IL or missing references)
			//IL_068b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0698: Expected O, but got Unknown
			//IL_0699: Unknown result type (might be due to invalid IL or missing references)
			//IL_069e: Unknown result type (might be due to invalid IL or missing references)
			//IL_06af: Unknown result type (might be due to invalid IL or missing references)
			//IL_06bc: Expected O, but got Unknown
			//IL_06bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e0: Expected O, but got Unknown
			//IL_06e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0704: Expected O, but got Unknown
			//IL_0705: Unknown result type (might be due to invalid IL or missing references)
			//IL_070a: Unknown result type (might be due to invalid IL or missing references)
			//IL_071b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0728: Expected O, but got Unknown
			//IL_0729: Unknown result type (might be due to invalid IL or missing references)
			//IL_072e: Unknown result type (might be due to invalid IL or missing references)
			//IL_073f: Unknown result type (might be due to invalid IL or missing references)
			//IL_074c: Expected O, but got Unknown
			//IL_074d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0752: Unknown result type (might be due to invalid IL or missing references)
			//IL_0763: Unknown result type (might be due to invalid IL or missing references)
			//IL_0770: Expected O, but got Unknown
			//IL_0771: Unknown result type (might be due to invalid IL or missing references)
			//IL_0776: Unknown result type (might be due to invalid IL or missing references)
			//IL_0787: Unknown result type (might be due to invalid IL or missing references)
			//IL_0794: Expected O, but got Unknown
			//IL_0795: Unknown result type (might be due to invalid IL or missing references)
			//IL_079a: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b8: Expected O, but got Unknown
			//IL_07b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_07be: Unknown result type (might be due to invalid IL or missing references)
			//IL_07cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_07dc: Expected O, but got Unknown
			//IL_07dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_07e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0800: Expected O, but got Unknown
			if (itemList == null)
			{
				HQRebalance.mls.LogError((object)"item list is null");
				return;
			}
			lootpoll = new List<SpawnableItemWithRarity>
			{
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("Airhorn"),
					rarity = airhorn
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("Bell"),
					rarity = bell
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("BigBolt"),
					rarity = big_bolt
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("BottleBin"),
					rarity = bottles
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("Brush"),
					rarity = brush
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("Candy"),
					rarity = candy
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("CashRegister"),
					rarity = cash_register
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("ChemicalJug"),
					rarity = chemical_jug
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("Clock"),
					rarity = clock
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("ClownHorn"),
					rarity = clown_horn
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("ComedyMask"),
					rarity = comedy
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("ControlPad"),
					rarity = control_pad
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("MoldPan"),
					rarity = cookie_mold
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("DustPan"),
					rarity = dust_pan
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("EasterEgg"),
					rarity = easter_egg
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("EggBeater"),
					rarity = egg_beater
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("FancyLamp"),
					rarity = fancy_lamp
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("Flask"),
					rarity = flask
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("GarbageLid"),
					rarity = garbage_lid
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("GiftBox"),
					rarity = gift_box
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("GoldBar"),
					rarity = gold_bar
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("FancyCup"),
					rarity = golden_cup
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("Hairdryer"),
					rarity = hairdryer
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("DiyFlashbang"),
					rarity = flashbang
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("PickleJar"),
					rarity = pickles
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("Cog1"),
					rarity = large_axle
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("FlashLaserPointer"),
					rarity = laser_pointer
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("7Ball"),
					rarity = magic_ball
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("MagnifyingGlass"),
					rarity = mag_glass
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("MetalSheet"),
					rarity = metal_sheet
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("Mug"),
					rarity = mug
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("Phone"),
					rarity = old_phone
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("FancyPainting"),
					rarity = painting
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("PerfumeBottle"),
					rarity = perfume
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("PillBottle"),
					rarity = pill_bottle
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("PlasticCup"),
					rarity = plastic_cup
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("FishTestProp"),
					rarity = plastic_fish
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("SodaCanRed"),
					rarity = red_soda
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("Remote"),
					rarity = remote
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("Ring"),
					rarity = ring
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("RubberDuck"),
					rarity = rubber_duck
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("SoccerBall"),
					rarity = soccer_ball
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("SteeringWheel"),
					rarity = wheel
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("StopSign"),
					rarity = stop_sign
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("TeaKettle"),
					rarity = tea_kettle
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("Dentures"),
					rarity = teeth
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("ToiletPaperRolls"),
					rarity = toiler_paper
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("Toothpaste"),
					rarity = toothpaste
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("ToyCube"),
					rarity = toy_cube
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("RobotToy"),
					rarity = toy_robot
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("ToyTrain"),
					rarity = toy_train
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("TragedyMask"),
					rarity = tragedy
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("EnginePart1"),
					rarity = engine
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("WhoopieCushion"),
					rarity = whoopie
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("YieldSign"),
					rarity = yield_sign
				},
				new SpawnableItemWithRarity
				{
					spawnableItem = ItemByName("Zeddog"),
					rarity = zed_dog
				}
			};
			lootpoll.RemoveAll((SpawnableItemWithRarity i) => i.rarity == 0);
		}

		private Item ItemByName(string name)
		{
			if (itemList.TryGetValue(name, out var value))
			{
				return value;
			}
			HQRebalance.mls.LogInfo((object)("Could not retrieve item of name: " + name));
			return null;
		}

		public List<SpawnableItemWithRarity> GetLootpool()
		{
			return lootpoll;
		}
	}
}
namespace HQRebalance.Patches
{
	[HarmonyPatch(typeof(CaveDwellerAI))]
	internal class CaveDwellerAIPatches
	{
		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		private static void PostStart(CaveDwellerAI __instance)
		{
			((EnemyAI)__instance).enemyType.increasedChanceInterior = -1;
		}

		[HarmonyPatch("HitEnemy")]
		[HarmonyPrefix]
		private static void PreHitEnemy(CaveDwellerAI __instance, int force)
		{
			if (!((EnemyAI)__instance).inSpecialAnimation && ((EnemyAI)__instance).currentBehaviourStateIndex != 0)
			{
				((EnemyAI)__instance).enemyHP = ((EnemyAI)__instance).enemyHP - (force - 1);
			}
		}

		[HarmonyPatch("BabyUpdate")]
		[HarmonyPostfix]
		private static void PostBabyUpdate(CaveDwellerAI __instance)
		{
			if ((Object)(object)Traverse.Create((object)__instance).Field("observingPlayer").GetValue<PlayerControllerB>() != (Object)null)
			{
				__instance.hasPlayerFoundBaby = true;
			}
			if (__instance.eatingScrap && !__instance.hasPlayerFoundBaby)
			{
				__instance.eatingScrap = false;
			}
			if (__instance.babyCrying && !__instance.hasPlayerFoundBaby)
			{
				Traverse.Create((object)__instance).Method("SetCryingLocalClient", new object[1] { false }).GetValue();
				__instance.SetBabyCryingServerRpc(false);
			}
		}
	}
	[HarmonyPatch(typeof(JesterAI))]
	internal class JesterAIPatches
	{
		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		private static void PostStart(JesterAI __instance)
		{
			((Component)__instance.mainCollider).gameObject.GetComponent<Collider>().isTrigger = true;
			((EnemyAI)__instance).enemyType.pushPlayerForce = 6.5f;
		}

		[HarmonyPatch("SetJesterInitialValues")]
		[HarmonyPostfix]
		private static void PostSetJesterInitialValues(JesterAI __instance)
		{
			__instance.mainCollider.isTrigger = true;
			__instance.beginCrankingTimer = 1.25f * (__instance.beginCrankingTimer - 13f) + 30f * StartOfRound.Instance.currentLevel.factorySizeMultiplier - 10f;
		}
	}
	[HarmonyPatch(typeof(ManualCameraRenderer))]
	internal class ManualCameraRendererPatches
	{
		[HarmonyPatch("CheckIfPlayerIsInCaves")]
		[HarmonyPrefix]
		private static bool CheckIfPlayerIsInCavesPrePatch(ManualCameraRenderer __instance)
		{
			return false;
		}
	}
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerBPatches
	{
		[HarmonyPatch("CalculateGroundNormal")]
		[HarmonyPrefix]
		private static bool OverwriteCalculateGroundNormal(PlayerControllerB __instance)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			Traverse obj = Traverse.Create((object)__instance);
			RaycastHit val = default(RaycastHit);
			if (Physics.Raycast(((Component)__instance).transform.position + Vector3.up * 0.2f, -Vector3.up, ref val, 6f, 268438273, (QueryTriggerInteraction)1))
			{
				__instance.playerGroundNormal = ((RaycastHit)(ref val)).normal;
			}
			else
			{
				__instance.playerGroundNormal = Vector3.up;
			}
			obj.Field("hit").SetValue((object)val);
			return false;
		}

		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void PostUpdate(PlayerControllerB __instance)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			if (((Component)__instance).transform.position.y <= -80f && __instance.isUnderwater)
			{
				__instance.isMovementHindered = 0;
			}
		}
	}
	[HarmonyPatch(typeof(RoundManager))]
	internal class RoundManagerPatches
	{
		[HarmonyPatch("Awake")]
		[HarmonyPostfix]
		private static void PostAwake(RoundManager __instance)
		{
			__instance.dungeonFlowTypes[4].MapTileSize = 1.1f;
			__instance.dungeonFlowTypes[4].dungeonFlow.Lines[0].Length = 0.15f;
			__instance.dungeonFlowTypes[4].dungeonFlow.Lines[1].Length = 0.65f;
			__instance.dungeonFlowTypes[4].dungeonFlow.Lines[1].Position = 0.15f;
			__instance.dungeonFlowTypes[4].dungeonFlow.Lines[2].Length = 0.20000002f;
			__instance.dungeonFlowTypes[4].dungeonFlow.Lines[2].Position = 0.79999995f;
		}

		[HarmonyPatch("SpawnScrapInLevel")]
		[HarmonyTranspiler]
		private static IEnumerable<CodeInstruction> TranpileSpawnScrapInLevel(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_S && list[i].operand is sbyte b && b == 20)
				{
					HQRebalance.mls.LogInfo((object)"No sid");
					list[i].operand = -1;
				}
				if (list[i].opcode == OpCodes.Ldc_I4_6)
				{
					list[i].opcode = OpCodes.Ldc_I4_0;
				}
			}
			return list.AsEnumerable();
		}

		[HarmonyPatch("RefreshEnemiesList")]
		[HarmonyPostfix]
		private static void PostRefresheEnemiesList(RoundManager __instance)
		{
			((Component)__instance.indoorFog).gameObject.SetActive(false);
		}
	}
	[HarmonyPatch(typeof(StartOfRound))]
	internal class StartOfRoundPatches
	{
		[HarmonyPatch("Start")]
		[HarmonyPrefix]
		private static void PreStart(StartOfRound __instance)
		{
			HQRebalance.SetupMoons(__instance);
		}
	}
	[HarmonyPatch(typeof(Terminal))]
	internal class TerminalPatches
	{
		[HarmonyPatch("Awake")]
		[HarmonyPostfix]
		private static void PostAwake(Terminal __instance)
		{
			TerminalNode result = __instance.terminalNodes.allKeywords[27].compatibleNouns[10].result;
			result.itemCost = 3000;
			result.terminalOptions[1].result.itemCost = 3000;
		}
	}
}