using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using LethalLib.Modules;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("ScarletItem")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ScarletItem")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("3d1bf633-2dd5-4d51-a726-ced07245478c")]
[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 scrap64;
[BepInPlugin("item", "Scrap64", "0.0.1")]
public class plugin : BaseUnityPlugin
{
private const string GUID = "item";
private const string NAME = "Scrap64";
private const string VERSION = "0.0.1";
private const bool isDebug = false;
public static plugin instance;
private void setBasicItem(string itemName, int rarity, AssetBundle bundle)
{
Item val = bundle.LoadAsset<Item>("Assets/Items/" + itemName + "Item.asset");
NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab);
Utilities.FixMixerGroups(val.spawnPrefab);
Items.RegisterScrap(val, rarity, (LevelTypes)(-1));
((BaseUnityPlugin)this).Logger.LogInfo((object)("Loaded item " + itemName));
}
private void Awake()
{
instance = this;
string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "items");
AssetBundle bundle = AssetBundle.LoadFromFile(text);
TerminalNode val = ScriptableObject.CreateInstance<TerminalNode>();
val.clearPreviousText = true;
setBasicItem("Yoshi", 30, bundle);
setBasicItem("Dorrie", 15, bundle);
setBasicItem("GoldenDorrie", 5, bundle);
setBasicItem("Shell", 40, bundle);
setBasicItem("RedShell", 20, bundle);
setBasicItem("Gold Shell", 7, bundle);
setBasicItem("Penguin", 40, bundle);
setBasicItem("Koopa", 30, bundle);
((BaseUnityPlugin)this).Logger.LogInfo((object)"Your shit is patched");
}
}