using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using LethalLib.Modules;
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: AssemblyCompany("TonyPizzaScrapV73-2")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("TonyPizzaScrapV73-2")]
[assembly: AssemblyTitle("TonyPizzaScrapV73-2")]
[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;
}
}
}
namespace TonyPizzaScrap
{
[BepInPlugin("TonyPizza.TonyPizzaScrap", "TonyPizzaScrap", "0.0.2")]
public class Plugin : BaseUnityPlugin
{
private const string GUID = "TonyPizza.TonyPizzaScrap";
private const string NAME = "TonyPizzaScrap";
private const string VERSION = "0.0.2";
public static Plugin instance;
private void Awake()
{
instance = this;
string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "tonypizzascrap2");
AssetBundle val = AssetBundle.LoadFromFile(text);
if ((Object)(object)val == (Object)null)
{
((BaseUnityPlugin)this).Logger.LogError((object)("Failed to load asset bundle at " + text));
return;
}
string[] array = new string[55]
{
"Assets/CustomScrap/Lays Stax/LaysStaxItem.asset", "Assets/CustomScrap/AsukaPlush/AsukaPlushie.asset", "Assets/CustomScrap/AigisToaster/AigisToasterExport.asset", "Assets/CustomScrap/LegoVaderPen/DarthvaderPen/VaderPen.asset", "Assets/CustomScrap/DarkstalkersSegaSaturn/DarkstalkersSegaSatun.asset", "Assets/CustomScrap/XenosagaFreaks/XenosagaFreaksExport.asset", "Assets/CustomScrap/MvC2 Dreamcast/MvC2DCExport.asset", "Assets/CustomScrap/Click/ClickScrap.asset", "Assets/CustomScrap/Infinity Eggs/Infinity Eggs/InfinityEggScript.asset", "Assets/CustomScrap/PizzaBox/PizzaBoxItem.asset",
"Assets/CustomScrap/Bingus/bingusscrap.asset", "Assets/CustomScrap/MvC2 Arcade/MvC2Arcade.asset", "Assets/CustomScrap/Teddie Scrap/Bear Suit/TeddieScrapExport.asset", "Assets/CustomScrap/Pac-Man/PacManItem.asset", "Assets/CustomScrap/BaconEggCheese/BaconEggCheeseExport.asset", "Assets/CustomScrap/WaddleDee/WaddleDeeExport.asset", "Assets/CustomScrap/Pizza Slice/Pizza Slice/PizzaSliceExport.asset", "Assets/CustomScrap/MouseTrap/MouseTrapExport.asset", "Assets/CustomScrap/Pringles/PringlesItem.asset", "Assets/CustomScrap/XC2 Game/XC2Export.asset",
"Assets/CustomScrap/SF6/SF6.asset", "Assets/CustomScrap/Jeep 1/JeepScrap.asset", "Assets/CustomScrap/Metal Bingus/MetalBingus.asset", "Assets/CustomScrap/PomPon/PomPonScrap.asset", "Assets/CustomScrap/CookieCutter/CookieCutter.asset", "Assets/CustomScrap/PaperBag/PaperBag.asset", "Assets/CustomScrap/FrootLoops/FrootLoopsBars.asset", "Assets/CustomScrap/CookieCutter/MagicCookieCutter.asset", "Assets/CustomScrap/CookieCutter/FatefulCookieCutter.asset", "Assets/CustomScrap/0-KirbyAirRide/Bulk Star/BulkStar.asset",
"Assets/CustomScrap/0-KirbyAirRide/Compact Star/CompactStar.asset", "Assets/CustomScrap/0-KirbyAirRide/Dragoon/Dragoon.asset", "Assets/CustomScrap/0-KirbyAirRide/Flight Warp Star/FlightWarpstar.asset", "Assets/CustomScrap/0-KirbyAirRide/Warp Star/WarpStar.asset", "Assets/CustomScrap/0-KirbyAirRide/Rex Wheelie/RexWheelie.asset", "Assets/CustomScrap/0-KirbyAirRide/Shadow Star/ShadowStar.asset", "Assets/CustomScrap/0-KirbyAirRide/Turbo Star/TurboStar.asset", "Assets/CustomScrap/0-KirbyAirRide/Jet Star/JetStar.asset", "Assets/CustomScrap/0-KirbyAirRide/Winged Star/WingedStar.asset", "Assets/CustomScrap/0-KirbyAirRide/Formula Star/FormulaStar.asset",
"Assets/CustomScrap/0-KirbyAirRide/Wagon Star/WagonStar.asset", "Assets/CustomScrap/0-KirbyAirRide/Hydra/Hydra.asset", "Assets/CustomScrap/0-KirbyAirRide/Slick Star/SlickStar.asset", "Assets/CustomScrap/0-KirbyAirRide/Swerve Star/SwerveStar.asset", "Assets/CustomScrap/0-KirbyAirRide/Wheelie Bike/WheelieBike.asset", "Assets/CustomScrap/0-KirbyAirRide/Wheelie Scooter/WheelieScooter.asset", "Assets/CustomScrap/0-KirbyAirRide/Rocket Star/RocketStar.asset", "Assets/CustomScrap/0-MisfitToys/Toy Soldier/TinSoldier.asset", "Assets/CustomScrap/0-MisfitToys/Scooter/ScooterForJimmy.asset", "Assets/CustomScrap/0-MisfitToys/Elephant/SpottedElephant.asset",
"Assets/CustomScrap/0-MisfitToys/Dolly/DollyForSue.asset", "Assets/CustomScrap/0-MisfitToys/Charlie/Charlie.asset", "Assets/CustomScrap/0-MisfitToys/Airplane/Airplane.asset", "Assets/CustomScrap/0-MisfitToys/Boat/Boat.asset", "Assets/CustomScrap/0-MisfitToys/Cowboy/Cowboy.asset"
};
string[] array2 = array;
foreach (string text2 in array2)
{
Item val2 = val.LoadAsset<Item>(text2);
if ((Object)(object)val2 == (Object)null)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)("Failed to load Item at " + text2));
continue;
}
string text3 = val2.itemName.Replace(" ", "_");
int value = ((BaseUnityPlugin)this).Config.Bind<int>(text3, "Rarity", 35, "Rarity of " + val2.itemName + " (higher = spawns more often)").Value;
int num = ((BaseUnityPlugin)this).Config.Bind<int>(text3, "MinValue", val2.minValue, "Minimum scrap value of " + val2.itemName).Value;
int value2 = ((BaseUnityPlugin)this).Config.Bind<int>(text3, "MaxValue", val2.maxValue, "Maximum scrap value of " + val2.itemName).Value;
if (num > value2)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)$"{val2.itemName}: MinValue {num} > MaxValue {value2}, adjusting.");
num = value2;
}
val2.minValue = num;
val2.maxValue = value2;
NetworkPrefabs.RegisterNetworkPrefab(val2.spawnPrefab);
Utilities.FixMixerGroups(val2.spawnPrefab);
Items.RegisterScrap(val2, value, (LevelTypes)(-1));
((BaseUnityPlugin)this).Logger.LogInfo((object)$"Registered scrap: {val2.itemName} (rarity {value}, value {num}-{value2})");
}
}
}
}