using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
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 = "")]
[assembly: AssemblyCompany("schoolmoon")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("schoolmoon")]
[assembly: AssemblyTitle("schoolmoon")]
[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 schoolmoon
{
[BepInPlugin("MrUnrealTeam.SchoolMoon", "School Moon", "1.1.4")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : BaseUnityPlugin
{
private const string modGUID = "MrUnrealTeam.SchoolMoon";
private const string modName = "School Moon";
private const string modVersion = "1.1.4";
private readonly Harmony harmony = new Harmony("MrUnrealTeam.SchoolMoon");
public static Plugin Instance;
public ManualLogSource mls;
private void Awake()
{
if ((Object)(object)Instance == (Object)null)
{
Instance = this;
}
mls = Logger.CreateLogSource("School Moon");
Type[] types = Assembly.GetExecutingAssembly().GetTypes();
Type[] array = types;
foreach (Type type in array)
{
MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
MethodInfo[] array2 = methods;
foreach (MethodInfo methodInfo in array2)
{
object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false);
if (customAttributes.Length != 0)
{
methodInfo.Invoke(null, null);
}
}
}
string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "schoolextra");
AssetBundle val = AssetBundle.LoadFromFile(text);
List<Item> list = new List<Item>
{
val.LoadAsset<Item>("Assets/LethalCompany/Mods/SchoolMoon/Scrap/armor/armor.asset"),
val.LoadAsset<Item>("Assets/LethalCompany/Mods/SchoolMoon/Scrap/axe/axe.asset"),
val.LoadAsset<Item>("Assets/LethalCompany/Mods/SchoolMoon/Scrap/book/book.asset"),
val.LoadAsset<Item>("Assets/LethalCompany/Mods/SchoolMoon/Scrap/carkey/carkey.asset"),
val.LoadAsset<Item>("Assets/LethalCompany/Mods/SchoolMoon/Scrap/cone/cone.asset"),
val.LoadAsset<Item>("Assets/LethalCompany/Mods/SchoolMoon/Scrap/magnet/magnet.asset"),
val.LoadAsset<Item>("Assets/LethalCompany/Mods/SchoolMoon/Scrap/woodencrate/crate.asset"),
val.LoadAsset<Item>("Assets/LethalCompany/Mods/SchoolMoon/Scrap/xiaomi/xiaomi.asset")
};
foreach (Item item in list)
{
NetworkPrefabs.RegisterNetworkPrefab(item.spawnPrefab);
Utilities.FixMixerGroups(item.spawnPrefab);
Items.RegisterScrap(item, 0, (LevelTypes)1);
}
mls.LogInfo((object)"------- SchoolMoon plugin loaded -------");
}
}
}