using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Text.RegularExpressions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using MonsterPlushiesOnly.Patches.MonsterPatches;
using TerminalApi;
using TerminalApi.Classes;
using TerminalApi.Events;
using Unity.Netcode;
using UnityEngine;
using scavengerPlush;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("MonsterPlushiesOnly")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("HP")]
[assembly: AssemblyProduct("MonsterPlushiesOnly")]
[assembly: AssemblyCopyright("Copyright © HP 2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("9ca9a9e0-33c1-4ff1-a730-f15690903d54")]
[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 MonsterPlushiesOnly
{
internal class Gradients
{
private static Color HexToColor(string hex)
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: 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)
Color result = default(Color);
ColorUtility.TryParseHtmlString("#" + hex, ref result);
return result;
}
private static string ColorToHex(Color color)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
//IL_003f: Unknown result type (might be due to invalid IL or missing references)
Color32 val = Color32.op_Implicit(color);
return $"{val.r:X2}{val.g:X2}{val.b:X2}{val.a:X2}";
}
public static bool CheckGradientCode(string ColorCode)
{
Regex regex = new Regex("^[0-9A-Fa-f]{6}\\s[0-9A-Fa-f]{6}$");
if (!regex.IsMatch(ColorCode))
{
return false;
}
return true;
}
public static string GradientColorText(string startColorHex, string endColorHex, string text)
{
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0078: Unknown result type (might be due to invalid IL or missing references)
//IL_0091: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: Unknown result type (might be due to invalid IL or missing references)
//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
if (startColorHex.Length != 6 || endColorHex.Length != 6)
{
return text;
}
Color val = HexToColor(startColorHex);
Color val2 = HexToColor(endColorHex);
int length = text.Length;
float num = (val2.r - val.r) / (float)length;
float num2 = (val2.g - val.g) / (float)length;
float num3 = (val2.b - val.b) / (float)length;
float num4 = (val2.a - val.a) / (float)length;
string text2 = "";
for (int i = 0; i < length; i++)
{
float num5 = val.r + num * (float)i;
float num6 = val.g + num2 * (float)i;
float num7 = val.b + num3 * (float)i;
float num8 = val.a + num4 * (float)i;
string arg = ColorToHex(new Color(num5, num6, num7, num8));
text2 += $"<color=#{arg}>{text[i]}</color>";
}
return text2;
}
}
[HarmonyPatch]
internal class MonsterPlushieLogs
{
[HarmonyPatch(typeof(StartOfRound))]
internal class StartOfRoundPatch
{
[HarmonyPatch("ShipLeave")]
[HarmonyPrefix]
public static void ShipLeavePatch(StartOfRound __instance)
{
ScanNodeProperties[] array = Object.FindObjectsOfType<ScanNodeProperties>();
for (int i = 0; i < array.Length; i++)
{
EnemyAI component = ((Component)array[i]).GetComponent<EnemyAI>();
if (array[i].creatureScanID > -1 && (Object)(object)component != (Object)null)
{
Plugin.Instance.logger.LogInfo((object)("Found Creature Scan ID " + array[i].creatureScanID + " of monster " + component.enemyType.enemyName));
}
}
}
}
public static int LoggedPlushies;
public static int LoggedScavengerCount;
public static int LoggedHoardingBugCount;
public static int LoggedBunkerSpiderCount;
public static int LoggedComedyMaskedCount;
public static int LoggedTragedyMaskedCount;
public static int LoggedThumperCount;
public static int LoggedNutcrackerCount;
public static int LoggedEyelessDogCount;
public static int LoggedForestKeeperCount;
public static int LoggedBrackenCount;
public static int LoggedJesterCount;
public static int LoggedCoilheadCount;
public static string LoggedScavengerVString;
public static string LoggedHoardingBugVString;
public static string LoggedBunkerSpiderVString;
public static string LoggedComedyMaskedVString;
public static string LoggedTragedyMaskedVString;
public static string LoggedThumperVString;
public static string LoggedNutcrackerVString;
public static string LoggedEyelessDogVString;
public static string LoggedForestKeeperVString;
public static string LoggedBrackenVString;
public static string LoggedJesterVString;
public static string LoggedCoilheadVString;
public static void ReloadUpdatedValues()
{
LoggedScavengerVString = ((LoggedScavengerCount >= 5) ? (GetValueConfig(Plugin.PlushieKey.ScavengerPlushie) ?? "") : "");
LoggedHoardingBugVString = ((LoggedHoardingBugCount >= 5) ? (GetValueConfig(Plugin.PlushieKey.HoardingBugPlushie) ?? "") : "");
LoggedBunkerSpiderVString = ((LoggedBunkerSpiderCount >= 5) ? (GetValueConfig(Plugin.PlushieKey.BunkerSpiderPlushie) ?? "") : "");
LoggedComedyMaskedVString = ((LoggedComedyMaskedCount >= 5) ? (GetValueConfig(Plugin.PlushieKey.ComedyMaskedPlushie) ?? "") : "");
LoggedTragedyMaskedVString = ((LoggedTragedyMaskedCount >= 5) ? (GetValueConfig(Plugin.PlushieKey.TragedyMaskedPlushie) ?? "") : "");
LoggedThumperVString = ((LoggedThumperCount >= 5) ? (GetValueConfig(Plugin.PlushieKey.ThumperPlushie) ?? "") : "");
LoggedNutcrackerVString = ((LoggedNutcrackerCount >= 5) ? (GetValueConfig(Plugin.PlushieKey.NutcrackerPlushie) ?? "") : "");
LoggedEyelessDogVString = ((LoggedEyelessDogCount >= 5) ? (GetValueConfig(Plugin.PlushieKey.EyelessDogPlushie) ?? "") : "");
LoggedForestKeeperVString = ((LoggedForestKeeperCount >= 5) ? (GetValueConfig(Plugin.PlushieKey.ForestKeeperPlushie) ?? "") : "");
LoggedBrackenVString = ((LoggedBrackenCount >= 5) ? (GetValueConfig(Plugin.PlushieKey.BrackenPlushie) ?? "") : "");
LoggedJesterVString = ((LoggedJesterCount >= 5) ? (GetValueConfig(Plugin.PlushieKey.JesterPlushie) ?? "") : "");
LoggedCoilheadVString = ((LoggedCoilheadCount >= 5) ? (GetValueConfig(Plugin.PlushieKey.CoilheadPlushie) ?? "") : "");
LoggedScavengerVString += ((LoggedScavengerCount >= 10) ? (GetAppValueConfig(Plugin.PlushieKey.ScavengerPlushie) ?? "") : "");
LoggedHoardingBugVString += ((LoggedHoardingBugCount >= 10) ? (GetAppValueConfig(Plugin.PlushieKey.HoardingBugPlushie) ?? "") : "");
LoggedBunkerSpiderVString += ((LoggedBunkerSpiderCount >= 10) ? (GetAppValueConfig(Plugin.PlushieKey.BunkerSpiderPlushie) ?? "") : "");
LoggedComedyMaskedVString += ((LoggedComedyMaskedCount >= 10) ? (GetAppValueConfig(Plugin.PlushieKey.ComedyMaskedPlushie) ?? "") : "");
LoggedTragedyMaskedVString += ((LoggedTragedyMaskedCount >= 10) ? (GetAppValueConfig(Plugin.PlushieKey.TragedyMaskedPlushie) ?? "") : "");
LoggedThumperVString += ((LoggedThumperCount >= 10) ? (GetAppValueConfig(Plugin.PlushieKey.ThumperPlushie) ?? "") : "");
LoggedNutcrackerVString += ((LoggedNutcrackerCount >= 10) ? (GetAppValueConfig(Plugin.PlushieKey.NutcrackerPlushie) ?? "") : "");
LoggedEyelessDogVString += ((LoggedEyelessDogCount >= 10) ? (GetAppValueConfig(Plugin.PlushieKey.EyelessDogPlushie) ?? "") : "");
LoggedForestKeeperVString += ((LoggedForestKeeperCount >= 10) ? (GetAppValueConfig(Plugin.PlushieKey.ForestKeeperPlushie) ?? "") : "");
LoggedBrackenVString += ((LoggedBrackenCount >= 10) ? (GetAppValueConfig(Plugin.PlushieKey.BrackenPlushie) ?? "") : "");
LoggedJesterVString += ((LoggedJesterCount >= 10) ? (GetAppValueConfig(Plugin.PlushieKey.JesterPlushie) ?? "") : "");
LoggedCoilheadVString += ((LoggedCoilheadCount >= 10) ? (GetAppValueConfig(Plugin.PlushieKey.CoilheadPlushie) ?? "") : "");
LoggedScavengerVString += ((LoggedScavengerCount >= 15) ? (GetWeightConfig(Plugin.PlushieKey.ScavengerPlushie) ?? "") : "");
}
public static string GetValueConfig(Plugin.PlushieKey plushieKey)
{
return plushieKey switch
{
Plugin.PlushieKey.HoardingBugPlushie => $"({Plugin.Instance.Configuration.HoardingBugPlushieMinValue.Value}-{Plugin.Instance.Configuration.HoardingBugPlushieMaxValue.Value})",
Plugin.PlushieKey.BunkerSpiderPlushie => $"({Plugin.Instance.Configuration.BunkerSpiderPlushieMinValue.Value}-{Plugin.Instance.Configuration.BunkerSpiderPlushieMaxValue.Value})",
Plugin.PlushieKey.BrackenPlushie => $"({Plugin.Instance.Configuration.BrackenPlushieMinValue.Value}-{Plugin.Instance.Configuration.BrackenPlushieMaxValue.Value})",
Plugin.PlushieKey.NutcrackerPlushie => $"({Plugin.Instance.Configuration.NutcrackerPlushieMinValue.Value}-{Plugin.Instance.Configuration.NutcrackerPlushieMaxValue.Value})",
Plugin.PlushieKey.ForestKeeperPlushie => $"({Plugin.Instance.Configuration.ForestKeeperPlushieMinValue.Value}-{Plugin.Instance.Configuration.ForestKeeperPlushieMaxValue.Value})",
Plugin.PlushieKey.EyelessDogPlushie => $"({Plugin.Instance.Configuration.EyelessDogPlushieMinValue.Value}-{Plugin.Instance.Configuration.EyelessDogPlushieMaxValue.Value})",
Plugin.PlushieKey.JesterPlushie => "(???-???)",
Plugin.PlushieKey.CoilheadPlushie => "(???-???)",
Plugin.PlushieKey.ScavengerPlushie => $"({Plugin.Instance.Configuration.ScavengerPlushieMinValue.Value}-{Plugin.Instance.Configuration.ScavengerPlushieMaxValue.Value})",
Plugin.PlushieKey.ThumperPlushie => $"({Plugin.Instance.Configuration.ThumperPlushieMinValue.Value}-{Plugin.Instance.Configuration.ThumperPlushieMaxValue.Value})",
Plugin.PlushieKey.ComedyMaskedPlushie => $"({Plugin.Instance.Configuration.MaskedPlushiesMinValue.Value}-{Plugin.Instance.Configuration.MaskedPlushiesMaxValue.Value})",
Plugin.PlushieKey.TragedyMaskedPlushie => $"({Plugin.Instance.Configuration.MaskedPlushiesMinValue.Value}-{Plugin.Instance.Configuration.MaskedPlushiesMaxValue.Value})",
_ => "(???-???)",
};
}
public static string GetWeightConfig(Plugin.PlushieKey plushieKey)
{
string text = "<color=#82ceff>(";
if (plushieKey == Plugin.PlushieKey.ScavengerPlushie)
{
text += $"{Plugin.ScavengerSpawnWeight.Value}%";
}
return text + ")</color>";
}
public static string GetAppValueConfig(Plugin.PlushieKey plushieKey)
{
string text = "<color=#ffac4c>(";
if (plushieKey == Plugin.PlushieKey.HoardingBugPlushie)
{
text += $"{Plugin.Instance.Configuration.HoardingBugPlushieMinApparatusValue.Value}-{Plugin.Instance.Configuration.HoardingBugPlushieMaxApparatusValue.Value}";
}
if (plushieKey == Plugin.PlushieKey.BunkerSpiderPlushie)
{
text += $"{Plugin.Instance.Configuration.BunkerSpiderPlushieMinApparatusValue.Value}-{Plugin.Instance.Configuration.BunkerSpiderPlushieMaxApparatusValue.Value}";
}
if (plushieKey == Plugin.PlushieKey.BrackenPlushie)
{
text += $"{Plugin.Instance.Configuration.BrackenPlushieMinApparatusValue.Value}-{Plugin.Instance.Configuration.BrackenPlushieMaxApparatusValue.Value}";
}
if (plushieKey == Plugin.PlushieKey.NutcrackerPlushie)
{
text += $"{Plugin.Instance.Configuration.NutcrackerPlushieMinApparatusValue.Value}-{Plugin.Instance.Configuration.NutcrackerPlushieMaxApparatusValue.Value}";
}
if (plushieKey == Plugin.PlushieKey.ForestKeeperPlushie)
{
text += $"{Plugin.Instance.Configuration.ForestKeeperPlushieMinApparatusValue.Value}-{Plugin.Instance.Configuration.ForestKeeperPlushieMaxApparatusValue.Value}";
}
if (plushieKey == Plugin.PlushieKey.EyelessDogPlushie)
{
text += $"{Plugin.Instance.Configuration.EyelessDogPlushieMinApparatusValue.Value}-{Plugin.Instance.Configuration.EyelessDogPlushieMaxApparatusValue.Value}";
}
if (plushieKey == Plugin.PlushieKey.JesterPlushie)
{
text += $"{Plugin.Instance.Configuration.JesterPlushieMinApparatusValue.Value}-{Plugin.Instance.Configuration.JesterPlushieMaxApparatusValue.Value}";
}
if (plushieKey == Plugin.PlushieKey.CoilheadPlushie)
{
text += $"{Plugin.Instance.Configuration.CoilheadPlushieMinApparatusValue.Value}-{Plugin.Instance.Configuration.CoilheadPlushieMaxApparatusValue.Value}";
}
if (plushieKey == Plugin.PlushieKey.ScavengerPlushie)
{
text += $"{Plugin.Instance.Configuration.ScavengerPlushieMinApparatusValue.Value}-{Plugin.Instance.Configuration.ScavengerPlushieMaxApparatusValue.Value}";
}
if (plushieKey == Plugin.PlushieKey.ThumperPlushie)
{
text += $"{Plugin.Instance.Configuration.ThumperPlushieMinApparatusValue.Value}-{Plugin.Instance.Configuration.ThumperPlushieMaxApparatusValue.Value}";
}
if (plushieKey == Plugin.PlushieKey.ComedyMaskedPlushie)
{
text += $"{Plugin.Instance.Configuration.MaskedPlushieMinApparatusValue.Value}-{Plugin.Instance.Configuration.MaskedPlushieMaxApparatusValue.Value}";
}
if (plushieKey == Plugin.PlushieKey.TragedyMaskedPlushie)
{
text += $"{Plugin.Instance.Configuration.MaskedPlushieMinApparatusValue.Value}-{Plugin.Instance.Configuration.MaskedPlushieMaxApparatusValue.Value}";
}
return text + ")</color>";
}
[HarmonyPrefix]
[HarmonyPatch(typeof(HUDManager), "AddNewScrapFoundToDisplay")]
private static void AddScrapValueToQuota(GrabbableObject GObject)
{
if (((Object)GObject).name.Contains("BrackenPlush"))
{
if (LoggedBrackenCount == 0)
{
LoggedPlushies++;
}
LoggedBrackenCount++;
ConfigEntry<int> saveBracken = Plugin.Instance.Configuration.SaveBracken;
int value = saveBracken.Value;
saveBracken.Value = value + 1;
}
if (((Object)GObject).name.Contains("Bunkspidplush"))
{
if (LoggedBunkerSpiderCount == 0)
{
LoggedPlushies++;
}
LoggedBunkerSpiderCount++;
ConfigEntry<int> saveBunkerSpider = Plugin.Instance.Configuration.SaveBunkerSpider;
int value = saveBunkerSpider.Value;
saveBunkerSpider.Value = value + 1;
}
if (((Object)GObject).name.Contains("CoilHeadPlush"))
{
if (LoggedCoilheadCount == 0)
{
LoggedPlushies++;
}
LoggedCoilheadCount++;
ConfigEntry<int> saveCoilhead = Plugin.Instance.Configuration.SaveCoilhead;
int value = saveCoilhead.Value;
saveCoilhead.Value = value + 1;
}
if (((Object)GObject).name.Contains("EyelessDog"))
{
if (LoggedEyelessDogCount == 0)
{
LoggedPlushies++;
}
LoggedEyelessDogCount++;
ConfigEntry<int> saveEyelessDog = Plugin.Instance.Configuration.SaveEyelessDog;
int value = saveEyelessDog.Value;
saveEyelessDog.Value = value + 1;
}
if (((Object)GObject).name.Contains("ForestPlush"))
{
if (LoggedForestKeeperCount == 0)
{
LoggedPlushies++;
}
LoggedForestKeeperCount++;
ConfigEntry<int> saveForestKeeper = Plugin.Instance.Configuration.SaveForestKeeper;
int value = saveForestKeeper.Value;
saveForestKeeper.Value = value + 1;
}
if (((Object)GObject).name.Contains("Lootbugplush"))
{
if (LoggedHoardingBugCount == 0)
{
LoggedPlushies++;
}
LoggedHoardingBugCount++;
ConfigEntry<int> saveHoardingBug = Plugin.Instance.Configuration.SaveHoardingBug;
int value = saveHoardingBug.Value;
saveHoardingBug.Value = value + 1;
}
if (((Object)GObject).name.Contains("JesterPlush"))
{
if (LoggedJesterCount == 0)
{
LoggedPlushies++;
}
LoggedJesterCount++;
ConfigEntry<int> saveJester = Plugin.Instance.Configuration.SaveJester;
int value = saveJester.Value;
saveJester.Value = value + 1;
}
if (((Object)GObject).name.Contains("ComedyPlush"))
{
if (LoggedComedyMaskedCount == 0)
{
LoggedPlushies++;
}
LoggedComedyMaskedCount++;
ConfigEntry<int> saveComedyMasked = Plugin.Instance.Configuration.SaveComedyMasked;
int value = saveComedyMasked.Value;
saveComedyMasked.Value = value + 1;
}
if (((Object)GObject).name.Contains("TragedyPlush"))
{
if (LoggedTragedyMaskedCount == 0)
{
LoggedPlushies++;
}
LoggedTragedyMaskedCount++;
ConfigEntry<int> saveTragedyMasked = Plugin.Instance.Configuration.SaveTragedyMasked;
int value = saveTragedyMasked.Value;
saveTragedyMasked.Value = value + 1;
}
if (((Object)GObject).name.Contains("NutCracker"))
{
if (LoggedNutcrackerCount == 0)
{
LoggedPlushies++;
}
LoggedNutcrackerCount++;
ConfigEntry<int> saveNutcracker = Plugin.Instance.Configuration.SaveNutcracker;
int value = saveNutcracker.Value;
saveNutcracker.Value = value + 1;
}
if (((Object)GObject).name.Contains("ScavengerPlush"))
{
if (LoggedScavengerCount == 0)
{
LoggedPlushies++;
}
LoggedScavengerCount++;
ConfigEntry<int> saveScavenger = Plugin.Instance.Configuration.SaveScavenger;
int value = saveScavenger.Value;
saveScavenger.Value = value + 1;
}
if (((Object)GObject).name.Contains("Thumper"))
{
if (LoggedThumperCount == 0)
{
LoggedPlushies++;
}
LoggedThumperCount++;
ConfigEntry<int> saveThumper = Plugin.Instance.Configuration.SaveThumper;
int value = saveThumper.Value;
saveThumper.Value = value + 1;
}
Plugin.Instance.Configuration.SaveCount.Value = LoggedPlushies;
}
}
[BepInPlugin("Windyways.MonsterPlushiesOnly", "Monster Plushies Only", "1.3.1")]
public class Plugin : BaseUnityPlugin
{
public enum PlushieKey
{
NullEnemy,
HoardingBugPlushie,
BrackenPlushie,
ForestKeeperPlushie,
EyelessDogPlushie,
ThumperPlushie,
BunkerSpiderPlushie,
NutcrackerPlushie,
ScavengerPlushie,
TragedyMaskedPlushie,
ComedyMaskedPlushie,
CoilheadPlushie,
JesterPlushie
}
private const string modGUID = "Windyways.MonsterPlushiesOnly";
private const string modName = "Monster Plushies Only";
private const string modVersion = "1.3.1";
public readonly Harmony harmony = new Harmony("Windyways.MonsterPlushiesOnly");
public static Plugin Instance;
internal ManualLogSource logger;
internal MonsterPlushiesOnlyConfig Configuration;
public List<SpawnableItemWithRarity> sivr;
public List<NetworkObjectReference> listOfNWR = new List<NetworkObjectReference>();
public List<int> listOfScrapValues = new List<int>();
public static Item GiftBox;
public bool isSet;
private CommandInfo info = new CommandInfo
{
DisplayTextSupplier = () => "Dunno what to put here, hi.\n\n",
Category = "Other",
Description = "Shows all the collected plushies."
};
private void Awake()
{
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00be: Expected O, but got Unknown
//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
//IL_00d0: Expected O, but got Unknown
if ((Object)(object)Instance == (Object)null)
{
Instance = this;
}
logger = Logger.CreateLogSource("Windyways.MonsterPlushiesOnly");
logger.LogInfo((object)" -- Loading Monster Plushies Only");
logger.LogInfo((object)" | Registering Configuration Options...");
Configuration = new MonsterPlushiesOnlyConfig(((BaseUnityPlugin)this).Config);
Configuration.RegisterOptions();
logger.LogInfo((object)" | Patching All...");
harmony.PatchAll();
logger.LogInfo((object)" | Retrieving Plushlog Data...");
RetrievePlushieLogData();
logger.LogInfo((object)" | Adding Terminal Commands...");
Events.TerminalBeginUsing += new TerminalEventHandler(OnBeginUsing);
Events.TerminalAwake += new TerminalEventHandler(TerminalIsAwake);
logger.LogInfo((object)" -- Monster Plushies Only Loaded Successfully!");
}
private void RetrievePlushieLogData()
{
MonsterPlushieLogs.LoggedBrackenCount = Instance.Configuration.SaveBracken.Value;
MonsterPlushieLogs.LoggedBunkerSpiderCount = Instance.Configuration.SaveBunkerSpider.Value;
MonsterPlushieLogs.LoggedNutcrackerCount = Instance.Configuration.SaveNutcracker.Value;
MonsterPlushieLogs.LoggedJesterCount = Instance.Configuration.SaveJester.Value;
MonsterPlushieLogs.LoggedCoilheadCount = Instance.Configuration.SaveCoilhead.Value;
MonsterPlushieLogs.LoggedEyelessDogCount = Instance.Configuration.SaveEyelessDog.Value;
MonsterPlushieLogs.LoggedForestKeeperCount = Instance.Configuration.SaveForestKeeper.Value;
MonsterPlushieLogs.LoggedComedyMaskedCount = Instance.Configuration.SaveComedyMasked.Value;
MonsterPlushieLogs.LoggedTragedyMaskedCount = Instance.Configuration.SaveTragedyMasked.Value;
MonsterPlushieLogs.LoggedHoardingBugCount = Instance.Configuration.SaveHoardingBug.Value;
MonsterPlushieLogs.LoggedScavengerCount = Instance.Configuration.SaveScavenger.Value;
MonsterPlushieLogs.LoggedThumperCount = Instance.Configuration.SaveThumper.Value;
MonsterPlushieLogs.LoggedPlushies = Instance.Configuration.SaveCount.Value;
}
private void TerminalIsAwake(object sender, TerminalEventArgs e)
{
if (!isSet)
{
TerminalApi.AddCommand("PlushLog", info, "ftf1", true);
isSet = true;
}
}
private void OnBeginUsing(object sender, TerminalEventArgs e)
{
RetrievePlushieLogData();
MonsterPlushieLogs.ReloadUpdatedValues();
info.DisplayTextSupplier = () => $"Monster Plushie Log ({MonsterPlushieLogs.LoggedPlushies} / 12):" + "\nTier One Plushies:\n" + ((MonsterPlushieLogs.LoggedScavengerCount > 0) ? (Gradients.GradientColorText("c2660a", "fe8a16", $"Scavenger Plushie x{MonsterPlushieLogs.LoggedScavengerCount}") + " " + MonsterPlushieLogs.LoggedScavengerVString + "\n") : "???\n") + ((MonsterPlushieLogs.LoggedHoardingBugCount > 0) ? (Gradients.GradientColorText("645e56", "ada59a", $"Hoarding Bug Plushie x{MonsterPlushieLogs.LoggedHoardingBugCount}") + " " + MonsterPlushieLogs.LoggedHoardingBugVString + "\n") : "???\n") + "\nTier Two Plushies:\n" + ((MonsterPlushieLogs.LoggedBunkerSpiderCount > 0) ? (Gradients.GradientColorText("af926f", "fed7a8", $"Bunker Spider Plushie x{MonsterPlushieLogs.LoggedBunkerSpiderCount}") + " " + MonsterPlushieLogs.LoggedBunkerSpiderVString + "\n") : "???\n") + ((MonsterPlushieLogs.LoggedComedyMaskedCount > 0) ? (Gradients.GradientColorText("c2660a", "fe8a16", $"Comedy Masked Plushie x{MonsterPlushieLogs.LoggedComedyMaskedCount}") + " " + MonsterPlushieLogs.LoggedComedyMaskedVString + "\n") : "???\n") + ((MonsterPlushieLogs.LoggedTragedyMaskedCount > 0) ? (Gradients.GradientColorText("c2660a", "fe8a16", $"Tragedy Masked Plushie x{MonsterPlushieLogs.LoggedTragedyMaskedCount}") + " " + MonsterPlushieLogs.LoggedTragedyMaskedVString + "\n") : "???\n") + ((MonsterPlushieLogs.LoggedThumperCount > 0) ? (Gradients.GradientColorText("99817b", "d7bcb6", $"Thumper Plushie x{MonsterPlushieLogs.LoggedThumperCount}") + " " + MonsterPlushieLogs.LoggedThumperVString + "\n") : "???\n") + ((MonsterPlushieLogs.LoggedNutcrackerCount > 0) ? (Gradients.GradientColorText("a84839", "fd735e", $"Nutcracker Plushie x{MonsterPlushieLogs.LoggedNutcrackerCount}") + " " + MonsterPlushieLogs.LoggedNutcrackerVString + "\n") : "???\n") + "\nTier Three Plushies:\n" + ((MonsterPlushieLogs.LoggedEyelessDogCount > 0) ? (Gradients.GradientColorText("5c312a", "ae6255", $"Eyeless Dog Plushie x{MonsterPlushieLogs.LoggedEyelessDogCount}") + " " + MonsterPlushieLogs.LoggedEyelessDogVString + "\n") : "???\n") + ((MonsterPlushieLogs.LoggedForestKeeperCount > 0) ? (Gradients.GradientColorText("645e56", "d4b69f", $"Forest Keeper Plushie x{MonsterPlushieLogs.LoggedForestKeeperCount}") + " " + MonsterPlushieLogs.LoggedForestKeeperVString + "\n") : "???\n") + ((MonsterPlushieLogs.LoggedBrackenCount > 0) ? (Gradients.GradientColorText("402728", "9c6466", $"Bracken Plushie x{MonsterPlushieLogs.LoggedBrackenCount}") + " " + MonsterPlushieLogs.LoggedBrackenVString + "\n") : "???\n") + "\nTier Four Plushies:\n" + ((MonsterPlushieLogs.LoggedJesterCount > 0) ? (Gradients.GradientColorText("7a5c7a", "ca9aca", $"Jester Plushie x{MonsterPlushieLogs.LoggedJesterCount}") + " " + MonsterPlushieLogs.LoggedJesterVString + "\n") : "???\n") + ((MonsterPlushieLogs.LoggedCoilheadCount > 0) ? (Gradients.GradientColorText("c9b6a2", "e1ceba", $"Coil-head Plushie x{MonsterPlushieLogs.LoggedCoilheadCount}") + " " + MonsterPlushieLogs.LoggedCoilheadVString + "\n") : "???\n");
}
}
internal class MonsterPlushiesOnlyConfig
{
private readonly ConfigFile _configFile;
public ConfigEntry<int> HoardingBugPlushieMinValue;
public ConfigEntry<int> HoardingBugPlushieMaxValue;
public ConfigEntry<int> HoardingBugPlushieMinApparatusValue;
public ConfigEntry<int> HoardingBugPlushieMaxApparatusValue;
public ConfigEntry<int> BunkerSpiderPlushieMinValue;
public ConfigEntry<int> BunkerSpiderPlushieMaxValue;
public ConfigEntry<int> BunkerSpiderPlushieMinApparatusValue;
public ConfigEntry<int> BunkerSpiderPlushieMaxApparatusValue;
public ConfigEntry<int> BrackenPlushieMinValue;
public ConfigEntry<int> BrackenPlushieMaxValue;
public ConfigEntry<int> BrackenPlushieMinApparatusValue;
public ConfigEntry<int> BrackenPlushieMaxApparatusValue;
public ConfigEntry<int> EyelessDogPlushieMinValue;
public ConfigEntry<int> EyelessDogPlushieMaxValue;
public ConfigEntry<int> EyelessDogPlushieMinApparatusValue;
public ConfigEntry<int> EyelessDogPlushieMaxApparatusValue;
public ConfigEntry<int> ThumperPlushieMinValue;
public ConfigEntry<int> ThumperPlushieMaxValue;
public ConfigEntry<int> ThumperPlushieMinApparatusValue;
public ConfigEntry<int> ThumperPlushieMaxApparatusValue;
public ConfigEntry<int> NutcrackerPlushieMinValue;
public ConfigEntry<int> NutcrackerPlushieMaxValue;
public ConfigEntry<int> NutcrackerPlushieMinApparatusValue;
public ConfigEntry<int> NutcrackerPlushieMaxApparatusValue;
public ConfigEntry<int> ScavengerPlushieMinValue;
public ConfigEntry<int> ScavengerPlushieMaxValue;
public ConfigEntry<int> ScavengerPlushieMinApparatusValue;
public ConfigEntry<int> ScavengerPlushieMaxApparatusValue;
public ConfigEntry<int> ForestKeeperPlushieMinValue;
public ConfigEntry<int> ForestKeeperPlushieMaxValue;
public ConfigEntry<int> ForestKeeperPlushieMinApparatusValue;
public ConfigEntry<int> ForestKeeperPlushieMaxApparatusValue;
public ConfigEntry<int> MaskedPlushiesMinValue;
public ConfigEntry<int> MaskedPlushiesMaxValue;
public ConfigEntry<int> MaskedPlushieMinApparatusValue;
public ConfigEntry<int> MaskedPlushieMaxApparatusValue;
public ConfigEntry<int> ComedyMaskedPlushieChance;
public ConfigEntry<int> ComedyAndTragedyMaskedPlushieChance;
public ConfigEntry<int> CoilheadPlushieMinApparatusValue;
public ConfigEntry<int> CoilheadPlushieMaxApparatusValue;
public ConfigEntry<int> JesterPlushieMinApparatusValue;
public ConfigEntry<int> JesterPlushieMaxApparatusValue;
public ConfigEntry<bool> AnnounceApparatusPull;
public ConfigEntry<bool> ApparatusDropsPlushie;
public ConfigEntry<bool> ApparatusStatic;
public ConfigEntry<bool> ShowMonsterDeath;
public ConfigEntry<bool> AnnounceScan;
public ConfigEntry<bool> DetailedScan;
public ConfigEntry<int> SaveHoardingBug;
public ConfigEntry<int> SaveScavenger;
public ConfigEntry<int> SaveBunkerSpider;
public ConfigEntry<int> SaveComedyMasked;
public ConfigEntry<int> SaveTragedyMasked;
public ConfigEntry<int> SaveThumper;
public ConfigEntry<int> SaveNutcracker;
public ConfigEntry<int> SaveForestKeeper;
public ConfigEntry<int> SaveBracken;
public ConfigEntry<int> SaveEyelessDog;
public ConfigEntry<int> SaveJester;
public ConfigEntry<int> SaveCoilhead;
public ConfigEntry<int> SaveCount;
public MonsterPlushiesOnlyConfig(ConfigFile configFile)
{
_configFile = configFile;
}
public void RegisterOptions()
{
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_006a: Expected O, but got Unknown
//IL_0096: Unknown result type (might be due to invalid IL or missing references)
//IL_00a0: Expected O, but got Unknown
//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
//IL_00d7: Expected O, but got Unknown
//IL_0104: Unknown result type (might be due to invalid IL or missing references)
//IL_010e: Expected O, but got Unknown
//IL_013b: Unknown result type (might be due to invalid IL or missing references)
//IL_0145: Expected O, but got Unknown
//IL_0172: Unknown result type (might be due to invalid IL or missing references)
//IL_017c: Expected O, but got Unknown
//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
//IL_01b3: Expected O, but got Unknown
//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
//IL_01ea: Expected O, but got Unknown
//IL_021a: Unknown result type (might be due to invalid IL or missing references)
//IL_0224: Expected O, but got Unknown
//IL_0251: Unknown result type (might be due to invalid IL or missing references)
//IL_025b: Expected O, but got Unknown
//IL_0288: Unknown result type (might be due to invalid IL or missing references)
//IL_0292: Expected O, but got Unknown
//IL_02bf: Unknown result type (might be due to invalid IL or missing references)
//IL_02c9: Expected O, but got Unknown
//IL_02f9: Unknown result type (might be due to invalid IL or missing references)
//IL_0303: Expected O, but got Unknown
//IL_0330: Unknown result type (might be due to invalid IL or missing references)
//IL_033a: Expected O, but got Unknown
//IL_0367: Unknown result type (might be due to invalid IL or missing references)
//IL_0371: Expected O, but got Unknown
//IL_039b: Unknown result type (might be due to invalid IL or missing references)
//IL_03a5: Expected O, but got Unknown
//IL_03ce: Unknown result type (might be due to invalid IL or missing references)
//IL_03d8: Expected O, but got Unknown
//IL_0405: Unknown result type (might be due to invalid IL or missing references)
//IL_040f: Expected O, but got Unknown
//IL_043f: Unknown result type (might be due to invalid IL or missing references)
//IL_0449: Expected O, but got Unknown
//IL_0476: Unknown result type (might be due to invalid IL or missing references)
//IL_0480: Expected O, but got Unknown
//IL_04ad: Unknown result type (might be due to invalid IL or missing references)
//IL_04b7: Expected O, but got Unknown
//IL_04e4: Unknown result type (might be due to invalid IL or missing references)
//IL_04ee: Expected O, but got Unknown
//IL_051e: Unknown result type (might be due to invalid IL or missing references)
//IL_0528: Expected O, but got Unknown
//IL_0555: Unknown result type (might be due to invalid IL or missing references)
//IL_055f: Expected O, but got Unknown
//IL_058c: Unknown result type (might be due to invalid IL or missing references)
//IL_0596: Expected O, but got Unknown
//IL_05c6: Unknown result type (might be due to invalid IL or missing references)
//IL_05d0: Expected O, but got Unknown
//IL_0600: Unknown result type (might be due to invalid IL or missing references)
//IL_060a: Expected O, but got Unknown
//IL_0637: Unknown result type (might be due to invalid IL or missing references)
//IL_0641: Expected O, but got Unknown
//IL_0671: Unknown result type (might be due to invalid IL or missing references)
//IL_067b: Expected O, but got Unknown
//IL_06ab: Unknown result type (might be due to invalid IL or missing references)
//IL_06b5: Expected O, but got Unknown
//IL_06e5: Unknown result type (might be due to invalid IL or missing references)
//IL_06ef: Expected O, but got Unknown
//IL_071c: Unknown result type (might be due to invalid IL or missing references)
//IL_0726: Expected O, but got Unknown
//IL_0756: Unknown result type (might be due to invalid IL or missing references)
//IL_0760: Expected O, but got Unknown
//IL_0790: Unknown result type (might be due to invalid IL or missing references)
//IL_079a: Expected O, but got Unknown
//IL_07ca: Unknown result type (might be due to invalid IL or missing references)
//IL_07d4: Expected O, but got Unknown
//IL_0801: Unknown result type (might be due to invalid IL or missing references)
//IL_080b: Expected O, but got Unknown
//IL_083b: Unknown result type (might be due to invalid IL or missing references)
//IL_0845: Expected O, but got Unknown
//IL_0871: Unknown result type (might be due to invalid IL or missing references)
//IL_087b: Expected O, but got Unknown
//IL_08ab: Unknown result type (might be due to invalid IL or missing references)
//IL_08b5: Expected O, but got Unknown
//IL_08e1: Unknown result type (might be due to invalid IL or missing references)
//IL_08eb: Expected O, but got Unknown
//IL_091b: Unknown result type (might be due to invalid IL or missing references)
//IL_0925: Expected O, but got Unknown
//IL_094d: Unknown result type (might be due to invalid IL or missing references)
//IL_0957: Expected O, but got Unknown
//IL_097f: Unknown result type (might be due to invalid IL or missing references)
//IL_0989: Expected O, but got Unknown
//IL_09b1: Unknown result type (might be due to invalid IL or missing references)
//IL_09bb: Expected O, but got Unknown
//IL_09e3: Unknown result type (might be due to invalid IL or missing references)
//IL_09ed: Expected O, but got Unknown
//IL_0a15: Unknown result type (might be due to invalid IL or missing references)
//IL_0a1f: Expected O, but got Unknown
//IL_0a47: Unknown result type (might be due to invalid IL or missing references)
//IL_0a51: Expected O, but got Unknown
//IL_0a7d: Unknown result type (might be due to invalid IL or missing references)
//IL_0a87: Expected O, but got Unknown
//IL_0ab3: Unknown result type (might be due to invalid IL or missing references)
//IL_0abd: Expected O, but got Unknown
//IL_0ae9: Unknown result type (might be due to invalid IL or missing references)
//IL_0af3: Expected O, but got Unknown
//IL_0b1f: Unknown result type (might be due to invalid IL or missing references)
//IL_0b29: Expected O, but got Unknown
//IL_0b55: Unknown result type (might be due to invalid IL or missing references)
//IL_0b5f: Expected O, but got Unknown
//IL_0b8b: Unknown result type (might be due to invalid IL or missing references)
//IL_0b95: Expected O, but got Unknown
//IL_0bc1: Unknown result type (might be due to invalid IL or missing references)
//IL_0bcb: Expected O, but got Unknown
//IL_0bf7: Unknown result type (might be due to invalid IL or missing references)
//IL_0c01: Expected O, but got Unknown
//IL_0c2d: Unknown result type (might be due to invalid IL or missing references)
//IL_0c37: Expected O, but got Unknown
//IL_0c63: Unknown result type (might be due to invalid IL or missing references)
//IL_0c6d: Expected O, but got Unknown
//IL_0c99: Unknown result type (might be due to invalid IL or missing references)
//IL_0ca3: Expected O, but got Unknown
//IL_0ccf: Unknown result type (might be due to invalid IL or missing references)
//IL_0cd9: Expected O, but got Unknown
//IL_0d05: Unknown result type (might be due to invalid IL or missing references)
//IL_0d0f: Expected O, but got Unknown
ScavengerPlushieMinValue = _configFile.Bind<int>("Scavenger", "Scavenger Plushie Min Value", 15, new ConfigDescription("The minimum scrap value of Scavenger Plushies obtained via Dead Players.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
ScavengerPlushieMaxValue = _configFile.Bind<int>("Scavenger", "Scavenger Plushie Max Value", 30, new ConfigDescription("The maximum scrap value of Scavenger Plushies obtained via Dead Players.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
ScavengerPlushieMinApparatusValue = _configFile.Bind<int>("Scavenger", "Scavenger Plushie Min Apparatus Value", 7, new ConfigDescription("The Minimum scrap value of the Scavenger Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
ScavengerPlushieMaxApparatusValue = _configFile.Bind<int>("Scavenger", "Scavenger Plushie Max Apparatus Value", 15, new ConfigDescription("The Maximum scrap value of the Scavenger Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
HoardingBugPlushieMinValue = _configFile.Bind<int>("Hoarding Bug", "Hoarding Bug Plushie Min Value", 30, new ConfigDescription("The Minimum scrap value of the Hoarding Bug Plushie when obtained via killing Hoarding Bugs.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
HoardingBugPlushieMaxValue = _configFile.Bind<int>("Hoarding Bug", "Hoarding Bug Plushie Max Value", 60, new ConfigDescription("The Maximum scrap value of the Hoarding Bug Plushie when obtained via killing Hoarding Bugs.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
HoardingBugPlushieMinApparatusValue = _configFile.Bind<int>("Hoarding Bug", "Hoarding Bug Plushie Min Apparatus Value", 15, new ConfigDescription("The Minimum scrap value of the Hoarding Bug Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
HoardingBugPlushieMaxApparatusValue = _configFile.Bind<int>("Hoarding Bug", "Hoarding Bug Plushie Max Apparatus Value", 30, new ConfigDescription("The Maximum scrap value of the Hoarding Bug Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
BunkerSpiderPlushieMinValue = _configFile.Bind<int>("Bunker Spider", "Bunker Spider Plushie Min Value", 100, new ConfigDescription("The minimum scrap value of Bunker Spider Plushies obtained via Bunker Spiders.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
BunkerSpiderPlushieMaxValue = _configFile.Bind<int>("Bunker Spider", "Bunker Spider Plushie Max Value", 145, new ConfigDescription("The maximum scrap value of Bunker Spider Plushies obtained via Bunker Spiders.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
BunkerSpiderPlushieMinApparatusValue = _configFile.Bind<int>("Bunker Spider", "Bunker Spider Plushie Min Apparatus Value", 50, new ConfigDescription("The Minimum scrap value of the Bunker Spider Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
BunkerSpiderPlushieMaxApparatusValue = _configFile.Bind<int>("Bunker Spider", "Bunker Spider Plushie Max Apparatus Value", 72, new ConfigDescription("The Maximum scrap value of the Bunker Spider Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
MaskedPlushiesMinValue = _configFile.Bind<int>("Masked", "Masked Plushies Min Value", 110, new ConfigDescription("The minimum scrap value of Masked Plushies obtained via Masked.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
MaskedPlushiesMaxValue = _configFile.Bind<int>("Masked", "Masked Plushies Max Value", 160, new ConfigDescription("The maximum scrap value of Masked Plushies obtained via Masked.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
MaskedPlushieMinApparatusValue = _configFile.Bind<int>("Masked", "Masked Plushie Min Apparatus Value", 55, new ConfigDescription("The Minimum scrap value of the Masked Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
MaskedPlushieMaxApparatusValue = _configFile.Bind<int>("Masked", "Masked Plushie Max Apparatus Value", 80, new ConfigDescription("The Maximum scrap value of the Masked Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
ComedyMaskedPlushieChance = _configFile.Bind<int>("Masked", "Comedy Masked Plushie Chance", 10, new ConfigDescription("The probability of a Comedy Masked Plushie dropping instead of a Tragedy Masked Plushie.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
ComedyAndTragedyMaskedPlushieChance = _configFile.Bind<int>("Masked", "Comedy & Tragedy Masked Plushie Chance", 2, new ConfigDescription("The probability of both a Comedy Masked and Tragedy Masked Plushie dropping upon killing a Masked", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
ThumperPlushieMinValue = _configFile.Bind<int>("Thumper", "Thumper Plushie Min Value", 120, new ConfigDescription("The minimum scrap value of Thumper Plushies obtained via Thumpers.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
ThumperPlushieMaxValue = _configFile.Bind<int>("Thumper", "Thumper Plushie Max Value", 180, new ConfigDescription("The maximum scrap value of Thumper Plushies obtained via Thumpers.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
ThumperPlushieMinApparatusValue = _configFile.Bind<int>("Thumper", "Thumper Plushie Min Apparatus Value", 60, new ConfigDescription("The Minimum scrap value of the Thumper Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
ThumperPlushieMaxApparatusValue = _configFile.Bind<int>("Thumper", "Thumper Plushie Max Apparatus Value", 90, new ConfigDescription("The Maximum scrap value of the Thumper Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
NutcrackerPlushieMinValue = _configFile.Bind<int>("Nutcracker", "Nutcracker Plushie Min Value", 120, new ConfigDescription("The minimum scrap value of Nutcracker Plushies obtained via Nutcrackers.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
NutcrackerPlushieMaxValue = _configFile.Bind<int>("Nutcracker", "Nutcracker Plushie Max Value", 180, new ConfigDescription("The maximum scrap value of Nutcracker Plushies obtained via Nutcrackers.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
NutcrackerPlushieMinApparatusValue = _configFile.Bind<int>("Nutcracker", "Nutcracker Plushie Min Apparatus Value", 60, new ConfigDescription("The Minimum scrap value of the Nutcracker Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
NutcrackerPlushieMaxApparatusValue = _configFile.Bind<int>("Nutcracker", "Nutcracker Plushie Max Apparatus Value", 90, new ConfigDescription("The Maximum scrap value of the Nutcracker Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
EyelessDogPlushieMinValue = _configFile.Bind<int>("Eyeless Dog", "Eyeless Dog Plushie Min Value", 200, new ConfigDescription("The minimum scrap value of Eyeless Dog Plushies obtained via Eyeless Dogs.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
EyelessDogPlushieMaxValue = _configFile.Bind<int>("Eyeless Dog", "Eyeless Dog Plushie Max Value", 280, new ConfigDescription("The maximum scrap value of Eyeless Dog Plushies obtained via Eyeless Dogs.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
EyelessDogPlushieMinApparatusValue = _configFile.Bind<int>("Eyeless Dog", "Eyeless Dog Plushie Min Apparatus Value", 100, new ConfigDescription("The Minimum scrap value of the Eyeless Dog Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
EyelessDogPlushieMaxApparatusValue = _configFile.Bind<int>("Eyeless Dog", "Eyeless Dog Plushie Max Apparatus Value", 140, new ConfigDescription("The Maximum scrap value of the Eyeless Dog Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
ForestKeeperPlushieMinValue = _configFile.Bind<int>("Forest Keeper", "Forest Keeper Plushie Min Value", 220, new ConfigDescription("The minimum scrap value of Forest Keeper Plushies obtained via Forest Keepers.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
ForestKeeperPlushieMaxValue = _configFile.Bind<int>("Forest Keeper", "Forest Keeper Plushie Max Value", 300, new ConfigDescription("The maximum scrap value of Forest Keeper Plushies obtained via Forest Keepers.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
ForestKeeperPlushieMinApparatusValue = _configFile.Bind<int>("Forest Keeper", "Forest Keeper Plushie Min Apparatus Value", 110, new ConfigDescription("The Minimum scrap value of the Forest Keeper Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
ForestKeeperPlushieMaxApparatusValue = _configFile.Bind<int>("Forest Keeper", "Forest Keeper Plushie Max Apparatus Value", 150, new ConfigDescription("The Maximum scrap value of the Forest Keeper Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
BrackenPlushieMinValue = _configFile.Bind<int>("Bracken", "Bracken Plushie Min Value", 240, new ConfigDescription("The minimum scrap value of Bracken Plushies obtained via Brackens.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
BrackenPlushieMaxValue = _configFile.Bind<int>("Bracken", "Bracken Plushie Max Value", 320, new ConfigDescription("The maximum scrap value of Bracken Plushies obtained via Brackens.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
BrackenPlushieMinApparatusValue = _configFile.Bind<int>("Bracken", "Bracken Plushie Min Apparatus Value", 120, new ConfigDescription("The Minimum scrap value of the Bracken Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
BrackenPlushieMaxApparatusValue = _configFile.Bind<int>("Bracken", "Bracken Plushie Max Apparatus Value", 160, new ConfigDescription("The Maximum scrap value of the Bracken Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
CoilheadPlushieMinApparatusValue = _configFile.Bind<int>("Coil-head", "Coil-head Plushie Min Apparatus Value", 7, new ConfigDescription("The Minimum scrap value of the Coil-head Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
CoilheadPlushieMaxApparatusValue = _configFile.Bind<int>("Coil-head", "Coil-head Plushie Max Apparatus Value", 160, new ConfigDescription("The Maximum scrap value of the Coil-head Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
JesterPlushieMinApparatusValue = _configFile.Bind<int>("Jester", "Jester Plushie Min Apparatus Value", 7, new ConfigDescription("The Minimum scrap value of the Jester Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
JesterPlushieMaxApparatusValue = _configFile.Bind<int>("Jester", "Jester Plushie Max Apparatus Value", 160, new ConfigDescription("The Maximum scrap value of the Jester Plushie when obtained via pulling Apparatus.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 900), Array.Empty<object>()));
ApparatusDropsPlushie = _configFile.Bind<bool>("Apparatus", "Apparatus Drops Monster Plushies", true, new ConfigDescription("The Apparatus drops a random Monster Plushie once pulled.", (AcceptableValueBase)(object)new AcceptableValueRange<bool>(false, true), Array.Empty<object>()));
AnnounceApparatusPull = _configFile.Bind<bool>("Apparatus", "Announce Apparatus Plushie", true, new ConfigDescription("Players are announced which Monster Plushie dropped upon an Apparatus being pulled.", (AcceptableValueBase)(object)new AcceptableValueRange<bool>(false, true), Array.Empty<object>()));
ApparatusStatic = _configFile.Bind<bool>("Apparatus", "Apparatus Static", true, new ConfigDescription("Using the scan command in the terminal has a chance of not working.", (AcceptableValueBase)(object)new AcceptableValueRange<bool>(false, true), Array.Empty<object>()));
ShowMonsterDeath = _configFile.Bind<bool>("Other", "Show Monster Death", true, new ConfigDescription("Players are announced when a monster with a valid plushie dies.", (AcceptableValueBase)(object)new AcceptableValueRange<bool>(false, true), Array.Empty<object>()));
AnnounceScan = _configFile.Bind<bool>("Other", "Announce Scan", false, new ConfigDescription("Players are announced what plushies are available when a player uses the scan Terminal command. 'Enable Better Scan' must be enabled to function.", (AcceptableValueBase)(object)new AcceptableValueRange<bool>(false, true), Array.Empty<object>()));
DetailedScan = _configFile.Bind<bool>("Mods", "Enable Better Scan", true, new ConfigDescription("Using the scan command in the Terminal shows all outside plushies.", (AcceptableValueBase)(object)new AcceptableValueRange<bool>(false, true), Array.Empty<object>()));
SaveHoardingBug = _configFile.Bind<int>("Save Data", "Hoarding Bugs Collected", 0, new ConfigDescription("Value stored for Plush Log command. Changing this value is not recommended.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10000), Array.Empty<object>()));
SaveBracken = _configFile.Bind<int>("Save Data", "Brackens Collected", 0, new ConfigDescription("Value stored for Plush Log command. Changing this value is not recommended.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 1000), Array.Empty<object>()));
SaveBunkerSpider = _configFile.Bind<int>("Save Data", "Bunker Spiders Collected", 0, new ConfigDescription("Value stored for Plush Log command. Changing this value is not recommended.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10000), Array.Empty<object>()));
SaveCoilhead = _configFile.Bind<int>("Save Data", "Coil-heads Collected", 0, new ConfigDescription("Value stored for Plush Log command. Changing this value is not recommended.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10000), Array.Empty<object>()));
SaveComedyMasked = _configFile.Bind<int>("Save Data", "Comedy Masked Collected", 0, new ConfigDescription("Value stored for Plush Log command. Changing this value is not recommended.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10000), Array.Empty<object>()));
SaveEyelessDog = _configFile.Bind<int>("Save Data", "Eyeless Dogs Collected", 0, new ConfigDescription("Value stored for Plush Log command. Changing this value is not recommended.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10000), Array.Empty<object>()));
SaveForestKeeper = _configFile.Bind<int>("Save Data", "Forest Keepers Collected", 0, new ConfigDescription("Value stored for Plush Log command. Changing this value is not recommended.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10000), Array.Empty<object>()));
SaveJester = _configFile.Bind<int>("Save Data", "Jesters Collected", 0, new ConfigDescription("Value stored for Plush Log command. Changing this value is not recommended.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 1000), Array.Empty<object>()));
SaveNutcracker = _configFile.Bind<int>("Save Data", "Nutcrackers Collected", 0, new ConfigDescription("Value stored for Plush Log command. Changing this value is not recommended.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10000), Array.Empty<object>()));
SaveScavenger = _configFile.Bind<int>("Save Data", "Scavengers Collected", 0, new ConfigDescription("Value stored for Plush Log command. Changing this value is not recommended.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10000), Array.Empty<object>()));
SaveThumper = _configFile.Bind<int>("Save Data", "Thumpers Collected", 0, new ConfigDescription("Value stored for Plush Log command. Changing this value is not recommended.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10000), Array.Empty<object>()));
SaveTragedyMasked = _configFile.Bind<int>("Save Data", "Tragedy Masked Collected", 0, new ConfigDescription("Value stored for Plush Log command. Changing this value is not recommended.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10000), Array.Empty<object>()));
SaveCount = _configFile.Bind<int>("Save Data", "Plushies Collected", 0, new ConfigDescription("Value stored for Plush Log command. Changing this value is not recommended.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 10000), Array.Empty<object>()));
}
}
}
namespace MonsterPlushiesOnly.Patches
{
[HarmonyPatch(typeof(LungProp))]
internal static class ApparatusPatch
{
public static bool GrabbedApparatus;
public static bool MoonHasApparatus;
public static Item ApparatusPlushie;
public static Plugin.PlushieKey ApparatusPlushieKey;
public static int ApparatusPlushieValue;
[HarmonyPrefix]
[HarmonyPatch("EquipItem")]
[HarmonyWrapSafe]
internal static void BeginMeltdownSequence(LungProp __instance, ref bool ___isLungDocked)
{
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0087: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
if ((((NetworkBehaviour)__instance).IsHost & ___isLungDocked) && !GrabbedApparatus && Plugin.Instance.Configuration.ApparatusDropsPlushie.Value)
{
MoonHasApparatus = false;
GrabbedApparatus = true;
NotifyAll(ApparatusPlushieKey);
GameObject val = Object.Instantiate<GameObject>(ApparatusPlushie.spawnPrefab, ((Component)__instance).GetComponent<Transform>().position, Quaternion.identity);
GrabbableObject component = val.GetComponent<GrabbableObject>();
component.fallTime = 0f;
((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation);
component.SetScrapValue(ApparatusPlushieValue);
NetworkObject component2 = val.GetComponent<NetworkObject>();
component2.Spawn(false);
Plugin.Instance.listOfNWR.Add(NetworkObjectReference.op_Implicit(component2));
Plugin.Instance.listOfScrapValues.Add(ApparatusPlushieValue);
PatchDrops.syncScrap();
}
}
public static void PredetermineApparatusPlushie()
{
MoonHasApparatus = false;
ApparatusPlushie = null;
GrabbableObject[] array = Object.FindObjectsOfType<GrabbableObject>();
GrabbableObject[] array2 = array;
foreach (GrabbableObject val in array2)
{
if (val.itemProperties.itemName.Contains("Apparatus"))
{
MoonHasApparatus = true;
Plugin.Instance.logger.LogMessage((object)"Found Apparatus!");
}
}
if (MoonHasApparatus)
{
Item val2 = null;
int num = 0;
int num2 = 0;
Plugin.PlushieKey apparatusPlushieKey = Plugin.PlushieKey.NullEnemy;
int num3 = Random.Range(1, 13);
Plugin.Instance.logger.LogInfo((object)("Rolled number " + num3));
switch (num3)
{
case 1:
val2 = BrackenPatch.BrackenPlushie;
num = Plugin.Instance.Configuration.BrackenPlushieMinApparatusValue.Value;
num2 = Plugin.Instance.Configuration.BrackenPlushieMaxApparatusValue.Value;
apparatusPlushieKey = Plugin.PlushieKey.BrackenPlushie;
break;
case 2:
val2 = BunkerSpiderPatch.BunkerSpiderPlushie;
num = Plugin.Instance.Configuration.BunkerSpiderPlushieMinApparatusValue.Value;
num2 = Plugin.Instance.Configuration.BunkerSpiderPlushieMaxApparatusValue.Value;
apparatusPlushieKey = Plugin.PlushieKey.BunkerSpiderPlushie;
break;
case 3:
val2 = CoilheadPatch.CoilheadPlushie;
num = Plugin.Instance.Configuration.CoilheadPlushieMinApparatusValue.Value;
num2 = Plugin.Instance.Configuration.CoilheadPlushieMaxApparatusValue.Value;
apparatusPlushieKey = Plugin.PlushieKey.CoilheadPlushie;
break;
case 4:
val2 = EyelessDogPatch.EyelessDogPlushie;
num = Plugin.Instance.Configuration.EyelessDogPlushieMinApparatusValue.Value;
num2 = Plugin.Instance.Configuration.EyelessDogPlushieMaxApparatusValue.Value;
apparatusPlushieKey = Plugin.PlushieKey.EyelessDogPlushie;
break;
case 5:
val2 = ForestKeeperPatch.ForestKeeperPlushie;
num = Plugin.Instance.Configuration.ForestKeeperPlushieMinApparatusValue.Value;
num2 = Plugin.Instance.Configuration.ForestKeeperPlushieMaxApparatusValue.Value;
apparatusPlushieKey = Plugin.PlushieKey.ForestKeeperPlushie;
break;
case 6:
val2 = HoardingBugPatch.HoardingBugPlushie;
num = Plugin.Instance.Configuration.HoardingBugPlushieMinApparatusValue.Value;
num2 = Plugin.Instance.Configuration.HoardingBugPlushieMaxApparatusValue.Value;
apparatusPlushieKey = Plugin.PlushieKey.HoardingBugPlushie;
break;
case 7:
val2 = JesterPatch.JesterPlushie;
num = Plugin.Instance.Configuration.JesterPlushieMinApparatusValue.Value;
num2 = Plugin.Instance.Configuration.JesterPlushieMaxApparatusValue.Value;
apparatusPlushieKey = Plugin.PlushieKey.JesterPlushie;
break;
case 8:
val2 = MaskedPatch.ComedyMaskedPlushie;
num = Plugin.Instance.Configuration.MaskedPlushieMinApparatusValue.Value;
num2 = Plugin.Instance.Configuration.MaskedPlushieMaxApparatusValue.Value;
apparatusPlushieKey = Plugin.PlushieKey.ComedyMaskedPlushie;
break;
case 9:
val2 = MaskedPatch.TragedyMaskedPlushie;
num = Plugin.Instance.Configuration.MaskedPlushieMinApparatusValue.Value;
num2 = Plugin.Instance.Configuration.MaskedPlushieMaxApparatusValue.Value;
apparatusPlushieKey = Plugin.PlushieKey.TragedyMaskedPlushie;
break;
case 10:
val2 = NutcrackerPatch.NutcrackerPlushie;
num = Plugin.Instance.Configuration.NutcrackerPlushieMinApparatusValue.Value;
num2 = Plugin.Instance.Configuration.NutcrackerPlushieMaxApparatusValue.Value;
apparatusPlushieKey = Plugin.PlushieKey.NutcrackerPlushie;
break;
case 11:
val2 = ScavengerPatch.ScavengerPlushie;
num = Plugin.Instance.Configuration.ScavengerPlushieMinApparatusValue.Value;
num2 = Plugin.Instance.Configuration.ScavengerPlushieMaxApparatusValue.Value;
apparatusPlushieKey = Plugin.PlushieKey.ScavengerPlushie;
break;
case 12:
val2 = ThumperPatch.ThumperPlushie;
num = Plugin.Instance.Configuration.ThumperPlushieMinApparatusValue.Value;
num2 = Plugin.Instance.Configuration.ThumperPlushieMaxApparatusValue.Value;
apparatusPlushieKey = Plugin.PlushieKey.ThumperPlushie;
break;
default:
Plugin.Instance.logger.LogError((object)"Couldn't find a case!");
break;
}
if ((Object)(object)val2 == (Object)null)
{
PredetermineApparatusPlushie();
Plugin.Instance.logger.LogInfo((object)"Spawning plushie is null, rerolling random plushie!");
return;
}
int apparatusPlushieValue = Random.Range(num, num2);
ApparatusPlushie = val2;
ApparatusPlushieValue = apparatusPlushieValue;
ApparatusPlushieKey = apparatusPlushieKey;
Plugin.Instance.logger.LogMessage((object)("Calculating Apparatus: " + ApparatusPlushie.itemName + ", value is approximately " + ApparatusPlushieValue));
}
}
public static void NotifyAll(Plugin.PlushieKey plushieKey)
{
if (Plugin.Instance.Configuration.AnnounceApparatusPull.Value)
{
switch (plushieKey)
{
case Plugin.PlushieKey.HoardingBugPlushie:
Plugin.Instance.logger.LogMessage((object)"Apparatus pulled, spawning Hoarding Bug Plushie!");
HUDManager.Instance.AddTextToChatOnServer("<color=#ffac4c>Apparatus is spawning <color=#645e56>Hoarding Bug Plushie!</color></color>", -1);
break;
case Plugin.PlushieKey.ThumperPlushie:
Plugin.Instance.logger.LogMessage((object)"Apparatus pulled, spawning Thumper Plushie!");
HUDManager.Instance.AddTextToChatOnServer("<color=#ffac4c>Apparatus is spawning <color=#99817b>Thumper Plushie!</color></color>", -1);
break;
case Plugin.PlushieKey.BunkerSpiderPlushie:
Plugin.Instance.logger.LogMessage((object)"Apparatus pulled, spawning Bunker Spider Plushie!");
HUDManager.Instance.AddTextToChatOnServer("<color=#ffac4c>Apparatus is spawning <color=#af926f>Bunker Spider Plushie!</color></color>", -1);
break;
case Plugin.PlushieKey.NutcrackerPlushie:
Plugin.Instance.logger.LogMessage((object)"Apparatus pulled, spawning Nutcracker Plushie!");
HUDManager.Instance.AddTextToChatOnServer("<color=#ffac4c>Apparatus is spawning <color=#a84839>Nutcracker Plushie!</color></color>", -1);
break;
case Plugin.PlushieKey.TragedyMaskedPlushie:
Plugin.Instance.logger.LogMessage((object)"Apparatus pulled, spawning Tragedy Masked Plushie!");
HUDManager.Instance.AddTextToChatOnServer("<color=#ffac4c>Apparatus is spawning <color=#c2660a>Tragedy Masked Plushie!</color></color>", -1);
break;
case Plugin.PlushieKey.ComedyMaskedPlushie:
Plugin.Instance.logger.LogMessage((object)"Apparatus pulled, spawning Comedy Masked Plushie!");
HUDManager.Instance.AddTextToChatOnServer("<color=#ffac4c>Apparatus is spawning <color=#c2660a>Comedy Masked Plushie!</color></color>", -1);
break;
case Plugin.PlushieKey.EyelessDogPlushie:
Plugin.Instance.logger.LogMessage((object)"Apparatus pulled, spawning Eyeless Dog Plushie!");
HUDManager.Instance.AddTextToChatOnServer("<color=#ffac4c>Apparatus is spawning <color=#5c312a>Eyeless Dog Plushie!</color></color>", -1);
break;
case Plugin.PlushieKey.BrackenPlushie:
Plugin.Instance.logger.LogMessage((object)"Apparatus pulled, spawning Bracken Plushie!");
HUDManager.Instance.AddTextToChatOnServer("<color=#ffac4c>Apparatus is spawning <color=#402728>Bracken Plushie!</color></color>", -1);
break;
case Plugin.PlushieKey.ForestKeeperPlushie:
Plugin.Instance.logger.LogMessage((object)"Apparatus pulled, spawning Forest Keeper Plushie!");
HUDManager.Instance.AddTextToChatOnServer("<color=#ffac4c>Apparatus is spawning <color=#645e56>Forest Keeper Plushie!</color></color>", -1);
break;
case Plugin.PlushieKey.CoilheadPlushie:
Plugin.Instance.logger.LogMessage((object)"Apparatus pulled, spawning Coil-head Plushie!");
HUDManager.Instance.AddTextToChatOnServer("<color=#ffac4c>Apparatus is spawning <color=#c9b6a2>Coil-head Plushie!</color></color>", -1);
break;
case Plugin.PlushieKey.JesterPlushie:
Plugin.Instance.logger.LogMessage((object)"Apparatus pulled, spawning Jester Plushie!");
HUDManager.Instance.AddTextToChatOnServer("<color=#ffac4c>Apparatus is spawning <color=#7a5c7a>Jester Plushie!</color></color>", -1);
break;
case Plugin.PlushieKey.ScavengerPlushie:
Plugin.Instance.logger.LogMessage((object)"Apparatus pulled, spawning Scavenger Plushie!");
HUDManager.Instance.AddTextToChatOnServer("<color=#ffac4c>Apparatus is spawning <color=#c2660a>Scavenger Plushie!</color></color>", -1);
break;
default:
Plugin.Instance.logger.LogMessage((object)"Apparatus pulled, spawning Gift Box!");
HUDManager.Instance.AddTextToChatOnServer("<color=#ffac4c>Apparatus is spawning <color=#ffffff>Gift Box!</color></color>", -1);
break;
}
}
}
public static void PatchApparatusOnLanding()
{
GrabbedApparatus = false;
PredetermineApparatusPlushie();
}
}
[HarmonyPatch(typeof(RoundManager))]
public class PatchDrops
{
private static RoundManager RM;
public static void NotifyAll(Plugin.PlushieKey plushieKey)
{
if (Plugin.Instance.Configuration.ShowMonsterDeath.Value)
{
switch (plushieKey)
{
case Plugin.PlushieKey.HoardingBugPlushie:
Plugin.Instance.logger.LogMessage((object)"Hoarding Bug killed, spawning Hoarding Bug Plushie!");
HUDManager.Instance.AddTextToChatOnServer("<color=#645e56>Hoarding Bug Defeated!</color>", -1);
break;
case Plugin.PlushieKey.ThumperPlushie:
Plugin.Instance.logger.LogMessage((object)"Thumper killed, spawning Thumper Plushie!");
HUDManager.Instance.AddTextToChatOnServer("<color=#99817b>Thumper Defeated!</color>", -1);
break;
case Plugin.PlushieKey.BunkerSpiderPlushie:
Plugin.Instance.logger.LogMessage((object)"Bunker Spider killed, spawning Bunker Spider Plushie!");
HUDManager.Instance.AddTextToChatOnServer("<color=#af926f>Bunker Spider Defeated!</color>", -1);
break;
case Plugin.PlushieKey.NutcrackerPlushie:
Plugin.Instance.logger.LogMessage((object)"Nutcracker killed, spawning Nutcracker Plushie!");
HUDManager.Instance.AddTextToChatOnServer("<color=#a84839>Nutcracker Defeated!</color>", -1);
break;
case Plugin.PlushieKey.TragedyMaskedPlushie:
Plugin.Instance.logger.LogMessage((object)"Masked killed, spawning Tragedy Masked Plushie!");
HUDManager.Instance.AddTextToChatOnServer("<color=#c2660a>Masked Defeated!</color>", -1);
break;
case Plugin.PlushieKey.ComedyMaskedPlushie:
Plugin.Instance.logger.LogMessage((object)"Masked killed, spawning Comedy Masked Plushie!");
HUDManager.Instance.AddTextToChatOnServer("<color=#c2660a>Masked Defeated!</color>", -1);
break;
case Plugin.PlushieKey.EyelessDogPlushie:
Plugin.Instance.logger.LogMessage((object)"Eyeless Dog killed, spawning Eyeless Dog Plushie!");
HUDManager.Instance.AddTextToChatOnServer("<color=#5c312a>Eyeless Dog Defeated!</color>", -1);
break;
case Plugin.PlushieKey.BrackenPlushie:
Plugin.Instance.logger.LogMessage((object)"Bracken killed, spawning Bracken Plushie!");
HUDManager.Instance.AddTextToChatOnServer("<color=#402728>Bracken Defeated!</color>", -1);
break;
case Plugin.PlushieKey.ForestKeeperPlushie:
Plugin.Instance.logger.LogMessage((object)"Forest Keeper killed, spawning Forest Keeper Plushie!");
HUDManager.Instance.AddTextToChatOnServer("<color=#645e56>Forest Keeper Defeated!</color>", -1);
break;
case Plugin.PlushieKey.ScavengerPlushie:
break;
}
}
}
[HarmonyPatch("SpawnScrapInLevel")]
[HarmonyPrefix]
private static void getScrap(ref SelectableLevel ___currentLevel, RoundManager __instance)
{
RM = __instance;
foreach (SpawnableItemWithRarity item in ___currentLevel.spawnableScrap)
{
if (item.spawnableItem.itemName.Contains("Bracken Plush"))
{
BrackenPatch.BrackenPlushie = item.spawnableItem;
}
if (item.spawnableItem.itemName.Contains("Bunker Spider Plush"))
{
BunkerSpiderPatch.BunkerSpiderPlushie = item.spawnableItem;
}
if (item.spawnableItem.itemName.Contains("Eyeless Dog Plush"))
{
EyelessDogPatch.EyelessDogPlushie = item.spawnableItem;
}
if (item.spawnableItem.itemName.Contains("Forest Keeper Plush"))
{
ForestKeeperPatch.ForestKeeperPlushie = item.spawnableItem;
}
if (item.spawnableItem.itemName.Contains("Hoarding Bug Plush"))
{
HoardingBugPatch.HoardingBugPlushie = item.spawnableItem;
}
if (item.spawnableItem.itemName.Contains("Comedy mask Plush"))
{
MaskedPatch.ComedyMaskedPlushie = item.spawnableItem;
}
if (item.spawnableItem.itemName.Contains("Tragedy mask Plush"))
{
MaskedPatch.TragedyMaskedPlushie = item.spawnableItem;
}
if (item.spawnableItem.itemName.Contains("Nutcracker Plush"))
{
NutcrackerPatch.NutcrackerPlushie = item.spawnableItem;
}
if (item.spawnableItem.itemName.Contains("Scavenger Plush"))
{
ScavengerPatch.ScavengerPlushie = item.spawnableItem;
}
if (item.spawnableItem.itemName.Contains("Thumper Plush"))
{
ThumperPatch.ThumperPlushie = item.spawnableItem;
}
if (item.spawnableItem.itemName.Contains("Jester Plush"))
{
JesterPatch.JesterPlushie = item.spawnableItem;
}
if (item.spawnableItem.itemName.Contains("Coil head Plush"))
{
CoilheadPatch.CoilheadPlushie = item.spawnableItem;
}
if (item.spawnableItem.itemName.Contains("Gift"))
{
Plugin.GiftBox = item.spawnableItem;
}
if (item.spawnableItem.itemName.Contains("Plush"))
{
Plugin.Instance.logger.LogMessage((object)("Found " + item.spawnableItem.itemName + " in the current moon pool!"));
}
}
ApparatusPatch.PatchApparatusOnLanding();
}
public static void syncScrap()
{
RM.SyncScrapValuesClientRpc(Plugin.Instance.listOfNWR.ToArray(), Plugin.Instance.listOfScrapValues.ToArray());
}
}
internal class ItemCount
{
public int count;
public string itemName;
public int approximateValue;
}
[HarmonyPatch(typeof(Terminal))]
internal class TerminalPatch
{
[HarmonyPatch(typeof(Terminal), "TextPostProcess")]
[HarmonyPostfix]
private static void ScanForItemsPatch(ref string modifiedDisplayText, ref TerminalNode node, Terminal __instance)
{
string displayText = modifiedDisplayText;
if (!node.displayText.ToString().Contains("[scanForItems]") || !Plugin.Instance.Configuration.DetailedScan.Value)
{
return;
}
List<ItemCount> list = new List<ItemCount>();
GrabbableObject[] array = Object.FindObjectsOfType<GrabbableObject>();
Random random = new Random(StartOfRound.Instance.randomMapSeed + 91);
int num = 0;
int num2 = 0;
GrabbableObject[] array2 = Object.FindObjectsOfType<GrabbableObject>();
for (int i = 0; i < array2.Length; i++)
{
GrabbableObject item2 = array2[i];
if (!item2.itemProperties.isScrap || item2.isInShipRoom || item2.isInElevator || !item2.itemProperties.itemName.Contains("Plush"))
{
continue;
}
int num3 = Mathf.Clamp(random.Next(item2.itemProperties.minValue, item2.itemProperties.maxValue), item2.scrapValue - 6 * i, item2.scrapValue + 9 * i);
num2 += num3;
num++;
if (list.Exists((ItemCount listedItem) => listedItem.itemName == item2.itemProperties.itemName))
{
int num4 = list.FindIndex((ItemCount listedItem) => listedItem.itemName == item2.itemProperties.itemName);
if (num4 >= 0)
{
ItemCount itemCount = list[num4];
itemCount.count++;
itemCount.approximateValue += num3;
list[num4] = itemCount;
}
}
else
{
ItemCount item3 = new ItemCount
{
count = 1,
itemName = item2.itemProperties.itemName,
approximateValue = num3
};
list.Add(item3);
}
}
int num5 = 0;
int num6 = 0;
if (ApparatusPatch.MoonHasApparatus)
{
num5++;
num6 += ApparatusPatch.ApparatusPlushieValue;
}
if (list.Count() + num5 > 0)
{
displayText = ((num5 == 0) ? $"\n\n\n\nTotal items found: {num}" : $"\n\n\n\nTotal items found: {num} <color=#ffac4c>+ {num5}</color>");
displayText += ((num6 == 0) ? $"\nTotal approximate value: ${num2}" : $"\nTotal approximate value: ${num2} <color=#ffac4c>+ {num6}</color>");
displayText += "\n\nItems:";
list.ForEach(delegate(ItemCount item)
{
displayText += $"\n {item.itemName} x{item.count} (${item.approximateValue})";
});
if (ApparatusPatch.MoonHasApparatus)
{
displayText += $"<color=#ffac4c>\n {ApparatusPatch.ApparatusPlushie.itemName} x1 (${ApparatusPatch.ApparatusPlushieValue})</color>";
}
if (Plugin.Instance.Configuration.AnnounceScan.Value && Plugin.Instance.Configuration.DetailedScan.Value)
{
HUDManager.Instance.AddTextToChatOnServer($"There are {num} Monster Plushies worth a total of {num2}", -1);
}
}
else
{
displayText = "\n\n\n\n<color=#00ff00>Full Clear!</color>";
}
__instance.screenText.text = displayText;
__instance.currentText = displayText;
}
}
}
namespace MonsterPlushiesOnly.Patches.MonsterPatches
{
public class BrackenPatch : BaseUnityPlugin
{
[HarmonyPatch(typeof(FlowermanAI))]
private class PatchMonsterDrop
{
[HarmonyPatch("KillEnemy")]
[HarmonyPostfix]
private static void InstantiateDrop(FlowermanAI __instance)
{
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
PatchDrops.NotifyAll(Plugin.PlushieKey.BrackenPlushie);
if ((Object)(object)BrackenPlushie == (Object)null)
{
BrackenPlushie = Plugin.GiftBox;
}
GameObject val = Object.Instantiate<GameObject>(BrackenPlushie.spawnPrefab, ((Component)__instance).GetComponent<Transform>().position, Quaternion.identity);
GrabbableObject component = val.GetComponent<GrabbableObject>();
component.fallTime = 0f;
((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation);
int num = Random.Range(Plugin.Instance.Configuration.BrackenPlushieMinValue.Value, Plugin.Instance.Configuration.BrackenPlushieMaxValue.Value);
component.SetScrapValue(num);
NetworkObject component2 = val.GetComponent<NetworkObject>();
component2.Spawn(false);
Plugin.Instance.listOfNWR.Add(NetworkObjectReference.op_Implicit(component2));
Plugin.Instance.listOfScrapValues.Add(num);
PatchDrops.syncScrap();
}
}
public static Item BrackenPlushie;
}
public class BunkerSpiderPatch : BaseUnityPlugin
{
[HarmonyPatch(typeof(SandSpiderAI))]
private class PatchMonsterDrop
{
[HarmonyPatch("KillEnemy")]
[HarmonyPostfix]
private static void InstantiateDrop(SandSpiderAI __instance)
{
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
PatchDrops.NotifyAll(Plugin.PlushieKey.BunkerSpiderPlushie);
if ((Object)(object)BunkerSpiderPlushie == (Object)null)
{
BunkerSpiderPlushie = Plugin.GiftBox;
}
GameObject val = Object.Instantiate<GameObject>(BunkerSpiderPlushie.spawnPrefab, ((Component)__instance).GetComponent<Transform>().position, Quaternion.identity);
GrabbableObject component = val.GetComponent<GrabbableObject>();
component.fallTime = 0f;
((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation);
int num = Random.Range(Plugin.Instance.Configuration.BunkerSpiderPlushieMinValue.Value, Plugin.Instance.Configuration.BunkerSpiderPlushieMaxValue.Value);
component.SetScrapValue(num);
NetworkObject component2 = val.GetComponent<NetworkObject>();
component2.Spawn(false);
Plugin.Instance.listOfNWR.Add(NetworkObjectReference.op_Implicit(component2));
Plugin.Instance.listOfScrapValues.Add(num);
PatchDrops.syncScrap();
}
}
public static Item BunkerSpiderPlushie;
}
public class JesterPatch : BaseUnityPlugin
{
public static Item JesterPlushie;
}
public class ForestKeeperPatch : BaseUnityPlugin
{
[HarmonyPatch(typeof(ForestGiantAI))]
private class PatchMonsterDrop
{
[HarmonyPatch("KillEnemy")]
[HarmonyPostfix]
private static void InstantiateDrop(ForestGiantAI __instance)
{
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
PatchDrops.NotifyAll(Plugin.PlushieKey.ForestKeeperPlushie);
if ((Object)(object)ForestKeeperPlushie == (Object)null)
{
ForestKeeperPlushie = Plugin.GiftBox;
}
GameObject val = Object.Instantiate<GameObject>(ForestKeeperPlushie.spawnPrefab, ((Component)__instance).GetComponent<Transform>().position, Quaternion.identity);
GrabbableObject component = val.GetComponent<GrabbableObject>();
component.fallTime = 0f;
((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation);
int num = Random.Range(Plugin.Instance.Configuration.ForestKeeperPlushieMinValue.Value, Plugin.Instance.Configuration.ForestKeeperPlushieMaxValue.Value);
component.SetScrapValue(num);
NetworkObject component2 = val.GetComponent<NetworkObject>();
component2.Spawn(false);
Plugin.Instance.listOfNWR.Add(NetworkObjectReference.op_Implicit(component2));
Plugin.Instance.listOfScrapValues.Add(num);
PatchDrops.syncScrap();
}
}
public static Item ForestKeeperPlushie;
}
public class HoardingBugPatch : BaseUnityPlugin
{
[HarmonyPatch(typeof(HoarderBugAI))]
private class PatchMonsterDrop
{
[HarmonyPatch("KillEnemy")]
[HarmonyPostfix]
private static void InstantiateDrop(HoarderBugAI __instance)
{
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
PatchDrops.NotifyAll(Plugin.PlushieKey.HoardingBugPlushie);
if ((Object)(object)HoardingBugPlushie == (Object)null)
{
HoardingBugPlushie = Plugin.GiftBox;
}
GameObject val = Object.Instantiate<GameObject>(HoardingBugPlushie.spawnPrefab, ((Component)__instance).GetComponent<Transform>().position, Quaternion.identity);
GrabbableObject component = val.GetComponent<GrabbableObject>();
component.fallTime = 0f;
((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation);
int num = Random.Range(Plugin.Instance.Configuration.HoardingBugPlushieMinValue.Value, Plugin.Instance.Configuration.HoardingBugPlushieMaxValue.Value);
component.SetScrapValue(num);
NetworkObject component2 = val.GetComponent<NetworkObject>();
component2.Spawn(false);
Plugin.Instance.listOfNWR.Add(NetworkObjectReference.op_Implicit(component2));
Plugin.Instance.listOfScrapValues.Add(num);
PatchDrops.syncScrap();
}
}
public static Item HoardingBugPlushie;
}
public class EyelessDogPatch : BaseUnityPlugin
{
[HarmonyPatch(typeof(MouthDogAI))]
private class PatchMonsterDrop
{
[HarmonyPatch("KillEnemy")]
[HarmonyPostfix]
private static void InstantiateDrop(MouthDogAI __instance)
{
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
PatchDrops.NotifyAll(Plugin.PlushieKey.EyelessDogPlushie);
if ((Object)(object)EyelessDogPlushie == (Object)null)
{
EyelessDogPlushie = Plugin.GiftBox;
}
GameObject val = Object.Instantiate<GameObject>(EyelessDogPlushie.spawnPrefab, ((Component)__instance).GetComponent<Transform>().position, Quaternion.identity);
GrabbableObject component = val.GetComponent<GrabbableObject>();
component.fallTime = 0f;
((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation);
int num = Random.Range(Plugin.Instance.Configuration.EyelessDogPlushieMinValue.Value, Plugin.Instance.Configuration.EyelessDogPlushieMaxValue.Value);
component.SetScrapValue(num);
NetworkObject component2 = val.GetComponent<NetworkObject>();
component2.Spawn(false);
Plugin.Instance.listOfNWR.Add(NetworkObjectReference.op_Implicit(component2));
Plugin.Instance.listOfScrapValues.Add(num);
PatchDrops.syncScrap();
}
}
public static Item EyelessDogPlushie;
}
public class MaskedPatch : BaseUnityPlugin
{
[HarmonyPatch(typeof(MaskedPlayerEnemy))]
private class PatchMonsterDrop
{
[HarmonyPatch("KillEnemy")]
[HarmonyPostfix]
private static void InstantiateDrop(MaskedPlayerEnemy __instance)
{
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: Unknown result type (might be due to invalid IL or missing references)
//IL_0089: Unknown result type (might be due to invalid IL or missing references)
//IL_008e: Unknown result type (might be due to invalid IL or missing references)
//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
//IL_013d: Unknown result type (might be due to invalid IL or missing references)
//IL_0142: Unknown result type (might be due to invalid IL or missing references)
//IL_0170: Unknown result type (might be due to invalid IL or missing references)
//IL_0175: 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_0274: Unknown result type (might be due to invalid IL or missing references)
//IL_0279: Unknown result type (might be due to invalid IL or missing references)
//IL_02a8: Unknown result type (might be due to invalid IL or missing references)
//IL_02ad: Unknown result type (might be due to invalid IL or missing references)
//IL_030f: Unknown result type (might be due to invalid IL or missing references)
if (Random.Range(0, 100) <= Plugin.Instance.Configuration.ComedyAndTragedyMaskedPlushieChance.Value)
{
if ((Object)(object)ComedyMaskedPlushie == (Object)null)
{
ComedyMaskedPlushie = Plugin.GiftBox;
}
GameObject val = Object.Instantiate<GameObject>(ComedyMaskedPlushie.spawnPrefab, ((Component)__instance).GetComponent<Transform>().position, Quaternion.identity);
GrabbableObject component = val.GetComponent<GrabbableObject>();
component.fallTime = 0f;
((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation);
int num = Random.Range(Plugin.Instance.Configuration.MaskedPlushiesMinValue.Value, Plugin.Instance.Configuration.MaskedPlushiesMaxValue.Value);
component.SetScrapValue(num);
NetworkObject component2 = val.GetComponent<NetworkObject>();
component2.Spawn(false);
Plugin.Instance.listOfNWR.Add(NetworkObjectReference.op_Implicit(component2));
Plugin.Instance.listOfScrapValues.Add(num);
PatchDrops.syncScrap();
if ((Object)(object)TragedyMaskedPlushie == (Object)null)
{
TragedyMaskedPlushie = Plugin.GiftBox;
}
GameObject val2 = Object.Instantiate<GameObject>(TragedyMaskedPlushie.spawnPrefab, ((Component)__instance).GetComponent<Transform>().position, Quaternion.identity);
GrabbableObject component3 = val.GetComponent<GrabbableObject>();
component3.fallTime = 0f;
((Component)component3).transform.rotation = Quaternion.Euler(component3.itemProperties.restingRotation);
int num2 = Random.Range(Plugin.Instance.Configuration.MaskedPlushiesMinValue.Value, Plugin.Instance.Configuration.MaskedPlushiesMaxValue.Value);
component3.SetScrapValue(num2);
NetworkObject component4 = val.GetComponent<NetworkObject>();
component4.Spawn(false);
Plugin.Instance.listOfNWR.Add(NetworkObjectReference.op_Implicit(component4));
Plugin.Instance.listOfScrapValues.Add(num2);
PatchDrops.syncScrap();
PatchDrops.NotifyAll(Plugin.PlushieKey.ComedyMaskedPlushie);
}
else
{
Item val3;
if (Random.Range(0, 100) <= Plugin.Instance.Configuration.ComedyMaskedPlushieChance.Value)
{
val3 = ComedyMaskedPlushie;
PatchDrops.NotifyAll(Plugin.PlushieKey.ComedyMaskedPlushie);
}
else
{
val3 = TragedyMaskedPlushie;
PatchDrops.NotifyAll(Plugin.PlushieKey.TragedyMaskedPlushie);
}
if ((Object)(object)val3 == (Object)null)
{
val3 = Plugin.GiftBox;
}
GameObject val4 = Object.Instantiate<GameObject>(val3.spawnPrefab, ((Component)__instance).GetComponent<Transform>().position, Quaternion.identity);
GrabbableObject component5 = val4.GetComponent<GrabbableObject>();
component5.fallTime = 0f;
((Component)component5).transform.rotation = Quaternion.Euler(component5.itemProperties.restingRotation);
int num3 = Random.Range(Plugin.Instance.Configuration.MaskedPlushiesMinValue.Value, Plugin.Instance.Configuration.MaskedPlushiesMaxValue.Value);
component5.SetScrapValue(num3);
NetworkObject component6 = val4.GetComponent<NetworkObject>();
component6.Spawn(false);
Plugin.Instance.listOfNWR.Add(NetworkObjectReference.op_Implicit(component6));
Plugin.Instance.listOfScrapValues.Add(num3);
PatchDrops.syncScrap();
}
}
}
public static Item ComedyMaskedPlushie;
public static Item TragedyMaskedPlushie;
}
public class CoilheadPatch : BaseUnityPlugin
{
public static Item CoilheadPlushie;
}
public class NutcrackerPatch : BaseUnityPlugin
{
[HarmonyPatch(typeof(NutcrackerEnemyAI))]
private class PatchMonsterDrop
{
[HarmonyPatch("KillEnemy")]
[HarmonyPostfix]
private static void InstantiateDrop(NutcrackerEnemyAI __instance)
{
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
PatchDrops.NotifyAll(Plugin.PlushieKey.NutcrackerPlushie);
if ((Object)(object)NutcrackerPlushie == (Object)null)
{
NutcrackerPlushie = Plugin.GiftBox;
}
GameObject val = Object.Instantiate<GameObject>(NutcrackerPlushie.spawnPrefab, ((Component)__instance).GetComponent<Transform>().position, Quaternion.identity);
GrabbableObject component = val.GetComponent<GrabbableObject>();
component.fallTime = 0f;
((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation);
int num = Random.Range(Plugin.Instance.Configuration.NutcrackerPlushieMinValue.Value, Plugin.Instance.Configuration.NutcrackerPlushieMaxValue.Value);
component.SetScrapValue(num);
NetworkObject component2 = val.GetComponent<NetworkObject>();
component2.Spawn(false);
Plugin.Instance.listOfNWR.Add(NetworkObjectReference.op_Implicit(component2));
Plugin.Instance.listOfScrapValues.Add(num);
PatchDrops.syncScrap();
}
}
public static Item NutcrackerPlushie;
}
public class ScavengerPatch : BaseUnityPlugin
{
public static Item ScavengerPlushie;
}
public class ThumperPatch : BaseUnityPlugin
{
[HarmonyPatch(typeof(CrawlerAI))]
private class PatchMonsterDrop
{
[HarmonyPatch("KillEnemy")]
[HarmonyPostfix]
private static void InstantiateDrop(CrawlerAI __instance)
{
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
PatchDrops.NotifyAll(Plugin.PlushieKey.ThumperPlushie);
if ((Object)(object)ThumperPlushie == (Object)null)
{
ThumperPlushie = Plugin.GiftBox;
}
GameObject val = Object.Instantiate<GameObject>(ThumperPlushie.spawnPrefab, ((Component)__instance).GetComponent<Transform>().position, Quaternion.identity);
GrabbableObject component = val.GetComponent<GrabbableObject>();
component.fallTime = 0f;
((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation);
int num = Random.Range(Plugin.Instance.Configuration.ThumperPlushieMinValue.Value, Plugin.Instance.Configuration.ThumperPlushieMaxValue.Value);
component.SetScrapValue(num);
NetworkObject component2 = val.GetComponent<NetworkObject>();
component2.Spawn(false);
Plugin.Instance.listOfNWR.Add(NetworkObjectReference.op_Implicit(component2));
Plugin.Instance.listOfScrapValues.Add(num);
PatchDrops.syncScrap();
}
}
public static Item ThumperPlushie;
}
}