Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of LethalSnooteam v1.5.0
LethalSnooteam.dll
Decompiled 2 weeks agousing 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.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 = ".NET Standard 2.1")] [assembly: AssemblyCompany("LethalSnooteam")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("0.1.0.0")] [assembly: AssemblyInformationalVersion("0.1")] [assembly: AssemblyProduct("LethalSnooteam")] [assembly: AssemblyTitle("LethalSnooteam")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.1.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.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; } } [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 LethalSnooteam { [BepInPlugin("LethalSnooteam", "LethalSnooteam", "0.1")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class LethalSnooteam : BaseUnityPlugin { public static AssetBundle LethalSnooteamCustomAssets; public static AssetBundle LethalSnooteamBigMommyAssets; public static AssetBundle LethalSnooteamEggBoxAssets; public static AssetBundle LethalSnooteamSacabambaspisAssets; public static AssetBundle LethalSnooteamBardellaAssets; public static AssetBundle LethalSnooteamCiottiAssets; public static AssetBundle LethalSnooteammSaleAssets; public static AssetBundle LethalSnooteamSarkoAssets; public static AssetBundle LethalSnooteamFargothAssets; public static LethalSnooteam Instance { get; private set; } internal static ManualLogSource Logger { get; private set; } internal static Harmony? Harmony { get; set; } private void Awake() { string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); LethalSnooteamCustomAssets = AssetBundle.LoadFromFile(Path.Combine(directoryName, "dagothurpillowscrap")); if ((Object)(object)LethalSnooteamCustomAssets == (Object)null) { Logger.LogError((object)"Assets (dagoth ur) pas chargé"); return; } LethalSnooteamBigMommyAssets = AssetBundle.LoadFromFile(Path.Combine(directoryName, "bigmommyscrap")); if ((Object)(object)LethalSnooteamBigMommyAssets == (Object)null) { Logger.LogError((object)"Assets (big mommy) pas chargé"); return; } LethalSnooteamEggBoxAssets = AssetBundle.LoadFromFile(Path.Combine(directoryName, "eggboxscrap")); if ((Object)(object)LethalSnooteamEggBoxAssets == (Object)null) { Logger.LogError((object)"Assets (egg box casino label rouge) pas chargé"); return; } LethalSnooteamSacabambaspisAssets = AssetBundle.LoadFromFile(Path.Combine(directoryName, "sacabambaspisscrap")); if ((Object)(object)LethalSnooteamSacabambaspisAssets == (Object)null) { Logger.LogError((object)"Assets (sacabambaspis) pas chargé"); return; } LethalSnooteamBardellaAssets = AssetBundle.LoadFromFile(Path.Combine(directoryName, "bardellascrap")); if ((Object)(object)LethalSnooteamBardellaAssets == (Object)null) { Logger.LogError((object)"Assets (le livre de bardella) pas chargé"); return; } LethalSnooteamCiottiAssets = AssetBundle.LoadFromFile(Path.Combine(directoryName, "ciottiscrap")); if ((Object)(object)LethalSnooteamCiottiAssets == (Object)null) { Logger.LogError((object)"Assets (le livre de ciotti) pas chargé"); return; } LethalSnooteammSaleAssets = AssetBundle.LoadFromFile(Path.Combine(directoryName, "msalescrap")); if ((Object)(object)LethalSnooteammSaleAssets == (Object)null) { Logger.LogError((object)"Assets (M. Sale) pas chargé"); return; } LethalSnooteamSarkoAssets = AssetBundle.LoadFromFile(Path.Combine(directoryName, "sarkoscrap")); if ((Object)(object)LethalSnooteamSarkoAssets == (Object)null) { Logger.LogError((object)"Assets (le livre de sarko) pas chargé"); return; } LethalSnooteamFargothAssets = AssetBundle.LoadFromFile(Path.Combine(directoryName, "fargothscrap")); if ((Object)(object)LethalSnooteamFargothAssets == (Object)null) { Logger.LogError((object)"Assets (Fargoth) pas chargé"); return; } Logger = ((BaseUnityPlugin)this).Logger; Instance = this; int num = 8; Item val = LethalSnooteamCustomAssets.LoadAsset<Item>("Assets/DagothUrPillow.asset"); if ((Object)(object)val == (Object)null) { Logger.LogError((object)"DagothUrBodyPillow pas chargé, what a fool you are!"); return; } Logger.LogInfo((object)"DagothUrBodyPillow chargé, I have prepared a place for you my sweet Nerevar..."); NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab); Items.RegisterScrap(val, num, (LevelTypes)(-1)); int num2 = 10; Item val2 = LethalSnooteamBigMommyAssets.LoadAsset<Item>("Assets/BigMommy.asset"); if ((Object)(object)val2 == (Object)null) { Logger.LogError((object)"Big Mommy Nuke pas chargée..."); return; } Logger.LogInfo((object)"Big Mommy chargée."); NetworkPrefabs.RegisterNetworkPrefab(val2.spawnPrefab); Items.RegisterScrap(val2, num2, (LevelTypes)(-1)); int num3 = 25; Item val3 = LethalSnooteamEggBoxAssets.LoadAsset<Item>("Assets/EggBox.asset"); if ((Object)(object)val3 == (Object)null) { Logger.LogError((object)"Egg box casino label rouge pas chargée..."); return; } Logger.LogInfo((object)"Egg box casino label rouge chargée."); NetworkPrefabs.RegisterNetworkPrefab(val3.spawnPrefab); Items.RegisterScrap(val3, num3, (LevelTypes)(-1)); int num4 = 22; Item val4 = LethalSnooteamSacabambaspisAssets.LoadAsset<Item>("Assets/Sacabambaspis.asset"); if ((Object)(object)val4 == (Object)null) { Logger.LogError((object)"Sacabambaspis pas chargé..."); return; } Logger.LogInfo((object)"Sacabambaspis chargé."); NetworkPrefabs.RegisterNetworkPrefab(val4.spawnPrefab); Items.RegisterScrap(val4, num4, (LevelTypes)(-1)); int num5 = 24; Item val5 = LethalSnooteamBardellaAssets.LoadAsset<Item>("Assets/bardella.asset"); if ((Object)(object)val5 == (Object)null) { Logger.LogError((object)"le livre de bardella pas chargé... l'état de droit n'est plus........"); return; } Logger.LogInfo((object)"livre de bardella chargé, on a sauvé l'état de droit!"); NetworkPrefabs.RegisterNetworkPrefab(val5.spawnPrefab); Items.RegisterScrap(val5, num5, (LevelTypes)(-1)); int num6 = 24; Item val6 = LethalSnooteamCiottiAssets.LoadAsset<Item>("Assets/ciotti.asset"); if ((Object)(object)val6 == (Object)null) { Logger.LogError((object)"le livre de ciotti pas chargé... il va pas rendre la clé de son bureau"); return; } Logger.LogInfo((object)"livre de ciotti chargé, il a rendu la clé de son bureau!"); NetworkPrefabs.RegisterNetworkPrefab(val6.spawnPrefab); Items.RegisterScrap(val6, num6, (LevelTypes)(-1)); int num7 = 24; Item val7 = LethalSnooteammSaleAssets.LoadAsset<Item>("Assets/mSale.asset"); if ((Object)(object)val7 == (Object)null) { Logger.LogError((object)"M. Sale pas chargé... :("); return; } Logger.LogInfo((object)"M. Sale chargé, time to get dirty"); NetworkPrefabs.RegisterNetworkPrefab(val7.spawnPrefab); Items.RegisterScrap(val7, num7, (LevelTypes)(-1)); int num8 = 24; Item val8 = LethalSnooteamSarkoAssets.LoadAsset<Item>("Assets/sarko.asset"); if ((Object)(object)val8 == (Object)null) { Logger.LogError((object)"le livre de sarko pas chargé... il reste en prison"); return; } Logger.LogInfo((object)"livre de sarko chargé, il est plus en prison"); NetworkPrefabs.RegisterNetworkPrefab(val8.spawnPrefab); Items.RegisterScrap(val8, num8, (LevelTypes)(-1)); int num9 = 24; Item val9 = LethalSnooteamFargothAssets.LoadAsset<Item>("Assets/fargoth.asset"); if ((Object)(object)val9 == (Object)null) { Logger.LogError((object)"Fargoth pas chargé... :("); return; } Logger.LogInfo((object)"Fargoth chargé, he loves you"); NetworkPrefabs.RegisterNetworkPrefab(val9.spawnPrefab); Items.RegisterScrap(val9, num9, (LevelTypes)(-1)); Patch(); Logger.LogInfo((object)"LethalSnooteam v0.1 (that's the wrong version number but whatever...) has FINALLY loaded! jpp"); } internal static void Patch() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown if (Harmony == null) { Harmony = new Harmony("LethalSnooteam"); } Logger.LogDebug((object)"Patching..."); Harmony.PatchAll(); Logger.LogDebug((object)"Finished patching! (It's a lie we don't patch anything but I'm too scared for taking out this line of code."); } internal static void Unpatch() { Logger.LogDebug((object)"Unpatching..."); Harmony? harmony = Harmony; if (harmony != null) { harmony.UnpatchSelf(); } Logger.LogDebug((object)"Finished unpatching! Same here."); } } public static class MyPluginInfo { public const string PLUGIN_GUID = "LethalSnooteam"; public const string PLUGIN_NAME = "LethalSnooteam"; public const string PLUGIN_VERSION = "0.1"; } } namespace LethalSnooteam.Patches { [HarmonyPatch(typeof(TVScript))] public class ExampleTVPatch { [HarmonyPatch("SwitchTVLocalClient")] [HarmonyPrefix] private static void SwitchTVPrefix(TVScript __instance) { StartOfRound.Instance.shipRoomLights.SetShipLightsBoolean(__instance.tvOn); } } }