using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using HarmonyLib;
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(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: AssemblyCompany("Goodness1")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Goodness1")]
[assembly: AssemblyTitle("Goodness1")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
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;
}
}
}
namespace ModelReplacement
{
public class MRGRUNT : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Grunt";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRHALO : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Halo";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRB2 : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "B2";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRSTEWIE : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Stewie";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRBOWSETTE : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "bowsette";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRBOWSETTE1 : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "bowsette1";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRAMERICA : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "america";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRNEJIRE : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "nejire";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRGODZILLA : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "godzilla";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRHUBERT : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "hubert";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRANYCONVCOM__DIAMANTTPOSE : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "AnyConv.com__Diamant - T pose";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRDIMITRI : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Dimitri";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRANYCONVCOM__SEBASTIANMICHAELISV4 : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "AnyConv.com__sebastian michaelisV4";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRRHEA : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Rhea";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRJOKER : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Joker";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRANNETTE_MESH : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Annette_mesh";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRASTOLFO : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Astolfo";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRDEADPOOL1 : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Deadpool (1)";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRENGLAND : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "England";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRGODZILLA2014 : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "godzilla 2014";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRALASTOR : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Alastor";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRKONG : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Kong";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRSATURN : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "saturn";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRNEPTUNE : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Neptune";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRJERALT : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Jeralt";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRQUEENMUTO : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Queen-Muto";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRREI : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Rei";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRSTOLAS : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Stolas";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRKNUCKLES : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Knuckles";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRSAILORMOON : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Sailormoon";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRANYCONVCOM__DIAMANTTPOSE_ : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "AnyConv.com__Diamant - T pose";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRANYCONVCOM__SEBASTIANMICHAELISV4_ : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "AnyConv.com__sebastian michaelisV4";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
[BepInPlugin("Lezbachunks", "Lezbachunks", "0.1.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : BaseUnityPlugin
{
public static ConfigFile config;
public static ConfigEntry<bool> enableModelForAllSuits { get; private set; }
public static ConfigEntry<bool> enableModelAsDefault { get; private set; }
public static ConfigEntry<string> suitNamesToEnableModel { get; private set; }
private static void InitConfig()
{
enableModelForAllSuits = config.Bind<bool>("Suits to Replace Settings", "Enable Model for all Suits", false, "Enable to model replace every suit. Set to false to specify suits");
enableModelAsDefault = config.Bind<bool>("Suits to Replace Settings", "Enable Model as default", false, "Enable to model replace every suit that hasn't been otherwise registered.");
suitNamesToEnableModel = config.Bind<string>("Suits to Replace Settings", "Suits to enable Model for", "Default,Orange suit", "Enter a comma separated list of suit names.(Additionally, [Green suit,Pajama suit,Hazard suit])");
}
private void Awake()
{
//IL_030c: Unknown result type (might be due to invalid IL or missing references)
//IL_0312: Expected O, but got Unknown
config = ((BaseUnityPlugin)this).Config;
InitConfig();
Assets.PopulateAssets();
if (enableModelForAllSuits.Value)
{
ModelReplacementAPI.RegisterModelReplacementOverride(typeof(MRGRUNT));
}
if (enableModelAsDefault.Value)
{
ModelReplacementAPI.RegisterModelReplacementDefault(typeof(MRGRUNT));
}
string[] array = suitNamesToEnableModel.Value.Split(',');
string[] array2 = array;
foreach (string text in array2)
{
ModelReplacementAPI.RegisterSuitModelReplacement("America", typeof(MRAMERICA));
ModelReplacementAPI.RegisterSuitModelReplacement("Hubert", typeof(MRHUBERT));
ModelReplacementAPI.RegisterSuitModelReplacement("B2", typeof(MRB2));
ModelReplacementAPI.RegisterSuitModelReplacement("Bowsette", typeof(MRBOWSETTE));
ModelReplacementAPI.RegisterSuitModelReplacement("Bowsette1", typeof(MRBOWSETTE1));
ModelReplacementAPI.RegisterSuitModelReplacement("Godzilla", typeof(MRGODZILLA));
ModelReplacementAPI.RegisterSuitModelReplacement("Grunt", typeof(MRGRUNT));
ModelReplacementAPI.RegisterSuitModelReplacement("Halo", typeof(MRHALO));
ModelReplacementAPI.RegisterSuitModelReplacement("Nejire", typeof(MRNEJIRE));
ModelReplacementAPI.RegisterSuitModelReplacement("Stewie", typeof(MRSTEWIE));
ModelReplacementAPI.RegisterSuitModelReplacement("Knuckles", typeof(MRKNUCKLES));
ModelReplacementAPI.RegisterSuitModelReplacement("Saturn", typeof(MRSATURN));
ModelReplacementAPI.RegisterSuitModelReplacement("Stolas", typeof(MRSTOLAS));
ModelReplacementAPI.RegisterSuitModelReplacement("Jeralt", typeof(MRJERALT));
ModelReplacementAPI.RegisterSuitModelReplacement("Astolfo", typeof(MRASTOLFO));
ModelReplacementAPI.RegisterSuitModelReplacement("Queen-Muto", typeof(MRQUEENMUTO));
ModelReplacementAPI.RegisterSuitModelReplacement("Rei", typeof(MRREI));
ModelReplacementAPI.RegisterSuitModelReplacement("Alastor", typeof(MRALASTOR));
ModelReplacementAPI.RegisterSuitModelReplacement("Deadpool", typeof(MRDEADPOOL1));
ModelReplacementAPI.RegisterSuitModelReplacement("Dimitri", typeof(MRDIMITRI));
ModelReplacementAPI.RegisterSuitModelReplacement("Kong", typeof(MRKONG));
ModelReplacementAPI.RegisterSuitModelReplacement("Diamant", typeof(MRANYCONVCOM__DIAMANTTPOSE));
ModelReplacementAPI.RegisterSuitModelReplacement("Sebastian", typeof(MRANYCONVCOM__SEBASTIANMICHAELISV4));
ModelReplacementAPI.RegisterSuitModelReplacement("Sailormoon", typeof(MRSAILORMOON));
ModelReplacementAPI.RegisterSuitModelReplacement("Godzilla2014", typeof(MRGODZILLA2014));
ModelReplacementAPI.RegisterSuitModelReplacement("Neptune", typeof(MRNEPTUNE));
ModelReplacementAPI.RegisterSuitModelReplacement("England", typeof(MRENGLAND));
ModelReplacementAPI.RegisterSuitModelReplacement("Rhea", typeof(MRRHEA));
ModelReplacementAPI.RegisterSuitModelReplacement("Joker", typeof(MRJOKER));
ModelReplacementAPI.RegisterSuitModelReplacement("Annette", typeof(MRANNETTE_MESH));
}
Harmony val = new Harmony("Lezbachunks");
val.PatchAll();
((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin Lezbachunks is loaded!");
}
}
public static class Assets
{
public static string mainAssetBundleName = "assetbundle";
public static AssetBundle MainAssetBundle = null;
private static string GetAssemblyName()
{
return Assembly.GetExecutingAssembly().GetName().Name.Replace(" ", "_");
}
public static void PopulateAssets()
{
if ((Object)(object)MainAssetBundle == (Object)null)
{
Console.WriteLine(GetAssemblyName() + "." + mainAssetBundleName);
using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(GetAssemblyName() + "." + mainAssetBundleName);
MainAssetBundle = AssetBundle.LoadFromStream(stream);
}
}
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
public IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}