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 Microsoft.CodeAnalysis;
using ModelReplacement;
using UlalaModelReplacement.Properties;
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: AssemblyCompany("UlalaModelReplacement")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Ulala model replacement for Lethal Company")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("UlalaModelReplacement")]
[assembly: AssemblyTitle("UlalaModelReplacement")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace UlalaModelReplacement
{
public class Class1
{
}
[BepInPlugin("com.valeria.ulalamodelreplacement", "Ulala Model Replacement", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : BaseUnityPlugin
{
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 void Awake()
{
enableModelForAllSuits = ((BaseUnityPlugin)this).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 = ((BaseUnityPlugin)this).Config.Bind<bool>("Suits to Replace Settings", "Enable Model as default", false, "Enable to model replace default suit");
suitNamesToEnableModel = ((BaseUnityPlugin)this).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])");
Assets.PopulateAssets();
ModelReplacementAPI.RegisterSuitModelReplacement("Ulala", typeof(BodyReplacementUlala));
((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin Ulala Model Replacement is loaded!");
}
}
public class BodyReplacementUlala : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "ulala_model.fbx";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class Assets
{
public static AssetBundle MainAssetBundle;
public static void PopulateAssets()
{
MainAssetBundle = AssetBundle.LoadFromMemory(Resources.ulala_model);
}
}
}
namespace UlalaModelReplacement.Properties
{
internal class Resources
{
internal static byte[] ulala_model
{
get
{
Assembly executingAssembly = Assembly.GetExecutingAssembly();
string name = "UlalaModelReplacement.ulala_model.fbx";
using Stream stream = executingAssembly.GetManifestResourceStream(name);
if (stream == null)
{
return null;
}
byte[] array = new byte[stream.Length];
stream.Read(array, 0, array.Length);
return array;
}
}
}
}