using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Unity.IL2CPP;
using GameData;
using HarmonyLib;
using Il2CppSystem;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("Fumo")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Fumo")]
[assembly: AssemblyTitle("Fumo")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
}
[BepInPlugin("HatsuneFucker.FumoPacks.Funky", "FumoPacks", "1.1.0")]
internal class Loader : BasePlugin
{
private static Harmony? _harmony_fumo;
public static ConfigEntry<string> ConfigAmmo;
public static ConfigEntry<string> ConfigMed;
public static ConfigEntry<string> ConfigTool;
public static ConfigEntry<string> ConfigDis;
public static ConfigEntry<bool> Config3D;
public static ConfigEntry<bool> ConfigExtra;
public override void Load()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Expected O, but got Unknown
_harmony_fumo = new Harmony("Fumo");
_harmony_fumo.PatchAll();
ConfigAmmo = ((BasePlugin)this).Config.Bind<string>("General", "Ammo", "Youmu", "Chooses which fumo is used for ammo (refer to the wiki page for the list)");
ConfigMed = ((BasePlugin)this).Config.Bind<string>("General", "Medipack", "Eirin", "Chooses which fumo is used for meds (refer to the wiki page for the list)");
ConfigTool = ((BasePlugin)this).Config.Bind<string>("General", "Tool Refill", "Nitori", "Chooses which fumo is used for tool (refer to the wiki page for the list)");
ConfigDis = ((BasePlugin)this).Config.Bind<string>("General", "Disinfection", "Cirno", "Chooses which fumo is used for disinfect (refer to the wiki page for the list)");
ConfigExtra = ((BasePlugin)this).Config.Bind<bool>("General", "Funky", false, "Enables extra funky settings");
}
}
[HarmonyPatch]
internal static class FumoPacks
{
[HarmonyPatch(typeof(GameDataInit), "Initialize")]
[HarmonyPostfix]
internal static void Funky()
{
Dictionary<string, string> dictionary = new Dictionary<string, string>
{
{ "Young Reimu", "LLS" },
{ "Yuuka", "LLS" },
{ "Rumia", "EoSD" },
{ "Cirno", "EoSD" },
{ "Meiling", "EoSD" },
{ "Patchouli", "EoSD" },
{ "Sakuya", "EoSD" },
{ "Remilia", "EoSD" },
{ "Flandre", "EoSD" },
{ "Chen", "PCB" },
{ "Alice", "PCB" },
{ "Shanghai", "PCB" },
{ "Youmu", "PCB" },
{ "Yuyuko", "PCB" },
{ "Ran", "PCB" },
{ "Yukari", "PCB" },
{ "Reimu", "IN" },
{ "Marisa", "IN" },
{ "Tewi", "IN" },
{ "Reisen", "IN" },
{ "Eirin", "IN" },
{ "Mokou", "IN" },
{ "Nitori", "MoF" },
{ "Momiji", "MoF" },
{ "Aya", "MoF" },
{ "Green Reimu", "MoF" },
{ "Suwako", "MoF" },
{ "Satori", "SA" },
{ "Utsuho", "SA" },
{ "Koishi", "SA" },
{ "Mononobe no Futo", "10D" },
{ "Toyosatomimi no Miko", "10D" },
{ "Junko", "LoLK" },
{ "Keiki", "WBaWC" },
{ "Michael Afton", "UM" },
{ "Tsukasa", "UM" },
{ "Suika", "Side Games" },
{ "Tenshi", "Side Games" },
{ "Hata no Kokoro", "Side Games" },
{ "Shion", "Side Games" },
{ "Kourindou Reimu", "Kourindou" },
{ "Kourindou Sakuya", "Kourindou" },
{ "Kourindou Remilia", "Kourindou" },
{ "Kourindou Yukari", "Kourindou" },
{ "Blue Reimu", "Reskins" },
{ "Bee Marisa", "Reskins" },
{ "Dog Sakuya", "Reskins" },
{ "Yuuma Custom", "Reskins" },
{ "Remilia Tiny Devil Mistress", "Reskins" },
{ "Flandre Vampire Pursuing the Hunter", "Reskins" },
{ "Morshu", "Manga" }
};
string value = Loader.ConfigAmmo.Value;
string value2 = Loader.ConfigMed.Value;
string value3 = Loader.ConfigTool.Value;
string value4 = Loader.ConfigDis.Value;
string[] array = new string[4] { value, value2, value3, value4 };
for (int i = 0; i < array.Length; i++)
{
if (array[i] == "Sanae")
{
array[i] = "Green Reimu";
}
}
string obj = array[0];
string obj2 = array[1];
string obj3 = array[2];
value4 = array[3];
value3 = obj3;
value2 = obj2;
value = obj;
string[] array2 = new string[4] { value, value2, value3, value4 };
for (int j = 0; j < array2.Length; j++)
{
if (array2[j] == "Mike")
{
array2[j] = "Michael Afton";
}
}
string obj4 = array2[0];
string obj5 = array2[1];
string obj6 = array2[2];
value4 = array2[3];
value3 = obj6;
value2 = obj5;
value = obj4;
string[] array3 = new string[4] { value, value2, value3, value4 };
for (int k = 0; k < array3.Length; k++)
{
if (array3[k] == "Rinnosuke")
{
array3[k] = "Morshu";
}
}
string obj7 = array3[0];
string obj8 = array3[1];
string obj9 = array3[2];
value4 = array3[3];
value3 = obj9;
value2 = obj8;
value = obj7;
string text = "";
if (dictionary.ContainsKey(value))
{
text = dictionary[value] + "/" + value;
}
else
{
text = "PCB/Youmu";
value = "Youmu";
Debug.Log(Object.op_Implicit(value + " was not found! Defaulting to Youmu..."));
}
string text2 = "";
if (dictionary.ContainsKey(value2))
{
text2 = dictionary[value2] + "/" + value2;
}
else
{
text2 = "IN/Eirin";
value2 = "Eirin";
Debug.Log(Object.op_Implicit(value2 + " was not found! Defaulting to Eirin..."));
}
string text3 = "";
if (dictionary.ContainsKey(value3))
{
text3 = dictionary[value3] + "/" + value3;
}
else
{
text3 = "MoF/Nitori";
value3 = "Nitori";
Debug.Log(Object.op_Implicit(value3 + " was not found! Defaulting to Nitori..."));
}
string text4 = "";
if (dictionary.ContainsKey(value4))
{
text4 = dictionary[value4] + "/" + value4;
}
else
{
text = "EoSD/Cirno";
value4 = "Cirno";
Debug.Log(Object.op_Implicit(value4 + " was not found! Defaulting to Cirno..."));
}
GameDataBlockBase<ItemDataBlock>.GetBlock(101u).FirstPersonPrefabs[1] = $"Assets/FumoPacks/{text}/{value}.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(101u).ThirdPersonPrefabs[1] = $"Assets/FumoPacks/{text}/{value}_thirdperson.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(101u).PickupPrefabs[0] = "Assets/FumoPacks/" + text + "/Ammopack/FumoPackWeaponPickup.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(101u).LeftHandGripAnim = "DisinfectionPack_idle";
GameDataBlockBase<ItemDataBlock>.GetBlock(101u).RightHandGripAnim = "DisinfectionPack_idle";
GameDataBlockBase<ItemDataBlock>.GetBlock(102u).FirstPersonPrefabs[1] = $"Assets/FumoPacks/{text2}/{value2}.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(102u).ThirdPersonPrefabs[1] = $"Assets/FumoPacks/{text2}/{value2}_thirdperson.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(102u).PickupPrefabs[0] = "Assets/FumoPacks/" + text2 + "/Medipack/FumoMediPackPickup.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(102u).LeftHandGripAnim = "DisinfectionPack_idle";
GameDataBlockBase<ItemDataBlock>.GetBlock(102u).RightHandGripAnim = "DisinfectionPack_idle";
GameDataBlockBase<ItemDataBlock>.GetBlock(127u).FirstPersonPrefabs[1] = $"Assets/FumoPacks/{text3}/{value3}.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(127u).ThirdPersonPrefabs[1] = $"Assets/FumoPacks/{text3}/{value3}_thirdperson.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(127u).PickupPrefabs[0] = "Assets/FumoPacks/" + text3 + "/Tool Refill/FumoPackToolPickup.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(127u).LeftHandGripAnim = "DisinfectionPack_idle";
GameDataBlockBase<ItemDataBlock>.GetBlock(127u).RightHandGripAnim = "DisinfectionPack_idle";
GameDataBlockBase<ItemDataBlock>.GetBlock(132u).FirstPersonPrefabs[1] = $"Assets/FumoPacks/{text4}/{value4}.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(132u).ThirdPersonPrefabs[1] = $"Assets/FumoPacks/{text4}/{value4}_thirdperson.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(132u).PickupPrefabs[0] = "Assets/FumoPacks/" + text4 + "/Disinfection/FumoPackFunkyPickup.prefab";
if (Loader.ConfigExtra.Value)
{
GameDataBlockBase<ItemDataBlock>.GetBlock(114u).FirstPersonPrefabs[1] = "Assets/FumoPacks/Extra Funky/Cirnoprism/Consumable_GlowStick.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(114u).ThirdPersonPrefabs[0] = "Assets/FumoPacks/Extra Funky/Cirnoprism/Consumable_GlowStick_third.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(114u).PickupPrefabs[0] = "Assets/FumoPacks/Extra Funky/Cirnoprism/Consumable_GlowStick_Pickup.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(114u).InstancePrefabs[0] = "Assets/FumoPacks/Extra Funky/Cirnoprism/Consumable_GlowStick_Instance.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(114u).InstancePrefabs[1] = "Assets/FumoPacks/Extra Funky/Cirnoprism/Consumable_GlowStick.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(115u).FirstPersonPrefabs[1] = "Assets/FumoPacks/Extra Funky/JAR/cumjar.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(115u).ThirdPersonPrefabs[0] = "Assets/FumoPacks/Extra Funky/JAR/cumjar_third.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(115u).PickupPrefabs[0] = "Assets/FumoPacks/Extra Funky/JAR/cumjarPickup.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(115u).InstancePrefabs[1] = "Assets/FumoPacks/Extra Funky/JAR/cumjar.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(174u).FirstPersonPrefabs[1] = "Assets/FumoPacks/Extra Funky/Cirnoprism/Consumable_GlowStick.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(174u).ThirdPersonPrefabs[0] = "Assets/FumoPacks/Extra Funky/Cirnoprism/Consumable_GlowStick_third.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(174u).PickupPrefabs[0] = "Assets/FumoPacks/Extra Funky/Cirnoprism/Consumable_GlowStick_Pickup.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(174u).InstancePrefabs[0] = "Assets/FumoPacks/Extra Funky/Cirnoprism/Consumable_GlowStick_Instance.prefab";
GameDataBlockBase<ItemDataBlock>.GetBlock(174u).InstancePrefabs[1] = "Assets/FumoPacks/Extra Funky/Cirnoprism/Consumable_GlowStick.prefab";
}
}
}