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 LethalLib.Modules;
using Microsoft.CodeAnalysis;
using Noodles.NetcodePatcher;
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("Noodles")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("0.0.0.0")]
[assembly: AssemblyInformationalVersion("0.0.0-alpha.0.1")]
[assembly: AssemblyProduct("Noodles")]
[assembly: AssemblyTitle("Noodles")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
[module: NetcodePatchedAssembly]
internal class <Module>
{
static <Module>()
{
}
}
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 flib
{
[BepInPlugin("flib-Noodles", "Noodles", "0.1.5")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : BaseUnityPlugin
{
public const string PLUGIN_GUID = "flib-Noodles";
public const string PLUGIN_NAME = "Noodles";
public const string PLUGIN_VERSION = "0.1.5";
public static AssetBundle Assets;
private void Awake()
{
((BaseUnityPlugin)this).Logger.LogInfo((object)"flib.Noodles started.");
string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
Assets = AssetBundle.LoadFromFile(Path.Combine(directoryName, "noodles"));
if ((Object)(object)Assets == (Object)null)
{
((BaseUnityPlugin)this).Logger.LogError((object)"Failed to load custom assets.");
return;
}
LoadAsset("Assets/Items/item_kenny.asset", 10);
LoadAsset("Assets/Items/item_ollie.asset", 9);
LoadAsset("Assets/Items/item_mabel.asset", 9);
LoadAsset("Assets/Items/item_pasta.asset", 8);
LoadAsset("Assets/Items/item_emerome.asset", 8);
((BaseUnityPlugin)this).Logger.LogInfo((object)"flib.Noodles loaded.");
}
private void LoadAsset(string assetName, int spawnRate)
{
Item val = Assets.LoadAsset<Item>(assetName);
if ((Object)(object)val == (Object)null)
{
((BaseUnityPlugin)this).Logger.LogError((object)("Failed to load item '" + assetName + "'"));
return;
}
Utilities.FixMixerGroups(val.spawnPrefab);
NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab);
Items.RegisterScrap(val, spawnRate, (LevelTypes)(-1));
((BaseUnityPlugin)this).Logger.LogInfo((object)$"Loaded item '{assetName}' ({val.itemName}) @ spawnrate {spawnRate}%");
}
}
public static class PluginInfo
{
public const string PLUGIN_GUID = "Noodles";
public const string PLUGIN_NAME = "Noodles";
public const string PLUGIN_VERSION = "1.0.0";
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
public IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}
namespace Noodles.NetcodePatcher
{
[AttributeUsage(AttributeTargets.Module)]
internal class NetcodePatchedAssemblyAttribute : Attribute
{
}
}