Decompiled source of p diddy pack part 1 v1.0.2
NeutronStarSample.dll
Decompiled 5 months agousing System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using HarmonyLib; 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("NeutronStarSample")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("NeutronStarSample")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("f60b80b1-a5ce-484d-9415-11dd066f8999")] [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 NeutronStarSample; [BepInPlugin("nihl.NeutronStarSample", "NeutronStarSample", "1.0.0.0")] public class NeutronStarSampleBase : BaseUnityPlugin { private const string modGUID = "nihl.NeutronStarSample"; private const string modName = "NeutronStarSample"; private const string modVersion = "1.0.0.0"; private readonly Harmony harmony = new Harmony("nihl.NeutronStarSample"); private static NeutronStarSampleBase instance; internal ManualLogSource MLS; private void Awake() { if ((Object)(object)instance == (Object)null) { instance = this; } MLS = Logger.CreateLogSource("nihl.NeutronStarSample"); AssetBundle val = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "NeutronStarSample")); Item val2 = val.LoadAsset<Item>("Assets/NeutronStarSample.asset"); if ((Object)(object)val2 == (Object)null) { MLS.LogInfo((object)"Failed to load Star prefab,"); } else { NetworkPrefabs.RegisterNetworkPrefab(val2.spawnPrefab); Items.RegisterScrap(val2, 3, (LevelTypes)510); } MLS.LogInfo((object)"NeutronStarSample Loaded!"); } }
Scrapmire.dll
Decompiled 5 months agousing System; using System.Collections.Generic; 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.Configuration; 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("Scrapmire")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("A mod that adds Quagmire's... whatever the hell that is? as scrap")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("Scrapmire")] [assembly: AssemblyTitle("Scrapmire")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.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.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace Scrapmire { [BepInPlugin("Scrapmire", "Scrapmire", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { [HarmonyPatch(typeof(GrabbableObject))] private class GrabbableObject_PlayDropSFX_Patch { [HarmonyPatch("Start")] [HarmonyPrefix] private static void Start(GrabbableObject __instance) { if (__instance.itemProperties.itemName.Equals("Scrapmire") && audioClips != null && audioClips.Item1.Count > 0) { AudioClip grabSFX = audioClips.Item1[Random.Range(0, audioClips.Item1.Count)]; __instance.itemProperties.grabSFX = grabSFX; } } [HarmonyPatch("PlayDropSFX")] [HarmonyPrefix] private static void Prefix(GrabbableObject __instance) { if (__instance.itemProperties.itemName.Equals("Scrapmire") && audioClips != null && audioClips.Item1.Count > 0 && audioClips.Item2.Count > 0) { AudioClip dropSFX = audioClips.Item2[Random.Range(0, audioClips.Item2.Count)]; __instance.itemProperties.dropSFX = dropSFX; dropSFX = audioClips.Item1[Random.Range(0, audioClips.Item1.Count)]; __instance.itemProperties.grabSFX = dropSFX; } } } public static AssetBundle Assets; public static ConfigFile config; internal ManualLogSource mls; private static Tuple<List<AudioClip>, List<AudioClip>> audioClips; private Harmony harmony = new Harmony("Scrapmire"); private void Awake() { string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); Assets = AssetBundle.LoadFromFile(Path.Combine(directoryName, "QuagmireModAssets")); if ((Object)(object)Assets == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Failed to load custom assets."); return; } mls = Logger.CreateLogSource("Scrapmire"); audioClips = Tuple.Create(new List<AudioClip>(), new List<AudioClip>()); loadSounds(); int num = 35; Item val = Assets.LoadAsset<Item>("Assets/QuagmireFaceAssets/QuagmireFaceItem.asset"); Utilities.FixMixerGroups(val.spawnPrefab); NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab); Items.RegisterScrap(val, num, (LevelTypes)(-1)); GrabbableObject val2 = Object.FindObjectOfType<GrabbableObject>(); mls.LogMessage((object)"Scrapmire mod loaded!"); harmony.PatchAll(); } private void loadSounds() { string value = "assets/quagmirefaceassets/sounds/grabsfx"; string value2 = "assets/quagmirefaceassets/sounds/dropsfx"; string[] allAssetNames = Assets.GetAllAssetNames(); string[] array = allAssetNames; foreach (string text in array) { if (text.StartsWith(value)) { audioClips.Item1.Add(Assets.LoadAsset<AudioClip>(text)); } else if (text.StartsWith(value2)) { audioClips.Item2.Add(Assets.LoadAsset<AudioClip>(text)); } } } } public static class PluginInfo { public const string PLUGIN_GUID = "Scrapmire"; public const string PLUGIN_NAME = "Scrapmire"; public const string PLUGIN_VERSION = "1.0.0"; } }
Skibidi.AI.dll
Decompiled 5 months agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using Microsoft.CodeAnalysis; using UnityEngine; using UnityEngine.Animations.Rigging; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("Skibidi.AI")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Skibidi.AI")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("597be394-0d5f-4dbb-ad1d-4d432b1b4802")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.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.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace Skibidi.AI { public class SkibidiAI : JesterAI { private int prevState = 0; public TwoBoneIKConstraint headIK; public AudioClip tauntClip; private float flushTime; public override void Start() { ((JesterAI)this).Start(); Debug.Log((object)"Spawning le skibidi. beware."); } public virtual void EvtFlush() { Debug.Log((object)"Flushing!"); ((EnemyAI)this).SwitchToBehaviourState(0); } public override void Update() { if (((EnemyAI)this).isEnemyDead) { return; } switch (((EnemyAI)this).currentBehaviourStateIndex) { case 0: if (prevState != 0) { ((EnemyAI)this).creatureAnimator.SetBool("flushed", true); ((EnemyAI)this).creatureVoice.Stop(true); ((EnemyAI)this).creatureVoice.PlayOneShot(((EnemyAI)this).enemyType.stunSFX); flushTime = Time.time; } ((RigConstraint<TwoBoneIKConstraintJob, TwoBoneIKConstraintData, TwoBoneIKConstraintJobBinder<TwoBoneIKConstraintData>>)(object)headIK).weight = Mathf.Lerp(((RigConstraint<TwoBoneIKConstraintJob, TwoBoneIKConstraintData, TwoBoneIKConstraintJobBinder<TwoBoneIKConstraintData>>)(object)headIK).weight, 0f, Time.deltaTime * 5f); break; case 1: if (prevState != 1) { ((EnemyAI)this).creatureAnimator.SetBool("flushed", false); base.farAudio.PlayOneShot(tauntClip); } ((RigConstraint<TwoBoneIKConstraintJob, TwoBoneIKConstraintData, TwoBoneIKConstraintJobBinder<TwoBoneIKConstraintData>>)(object)headIK).weight = Mathf.Lerp(((RigConstraint<TwoBoneIKConstraintJob, TwoBoneIKConstraintData, TwoBoneIKConstraintJobBinder<TwoBoneIKConstraintData>>)(object)headIK).weight, 1f, Time.deltaTime * 5f); break; case 2: if (prevState != 2) { ((EnemyAI)this).creatureAnimator.SetBool("flushed", false); } ((RigConstraint<TwoBoneIKConstraintJob, TwoBoneIKConstraintData, TwoBoneIKConstraintJobBinder<TwoBoneIKConstraintData>>)(object)headIK).weight = Mathf.Lerp(((RigConstraint<TwoBoneIKConstraintJob, TwoBoneIKConstraintData, TwoBoneIKConstraintJobBinder<TwoBoneIKConstraintData>>)(object)headIK).weight, 1f, Time.deltaTime * 5f); break; } prevState = ((EnemyAI)this).currentBehaviourStateIndex; if (((EnemyAI)this).currentBehaviourStateIndex != 0 || !(Time.time - flushTime < 15f)) { ((JesterAI)this).Update(); ((EnemyAI)this).agent.speed = Mathf.Clamp(((EnemyAI)this).agent.speed, 0f, 7.5f); if (base.popUpTimer > 10f) { base.popUpTimer = 10f; } } } } public class SkibidiSFX : MonoBehaviour { public SkibidiAI enemy; public AudioClip brrClip; public AudioClip skibidiClip; public float skibidiRamp = 0f; public virtual void PlayBrrSFX() { if (skibidiRamp > 1f) { skibidiRamp = 1f; } ((JesterAI)enemy).farAudio.pitch = 1f + skibidiRamp; ((JesterAI)enemy).farAudio.PlayOneShot(brrClip); skibidiRamp += 0.02f; } public virtual void PlaySkibidiSFX() { ((JesterAI)enemy).farAudio.pitch = 1f; skibidiRamp = 0f; ((EnemyAI)enemy).creatureVoice.PlayOneShot(skibidiClip); } } }
Skibidi.dll
Decompiled 5 months 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 LethalLib.Modules; using Microsoft.CodeAnalysis; using Skibidi.AI; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyCompany("Skibidi")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Skibidi Toilet core")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("Skibidi")] [assembly: AssemblyTitle("Skibidi")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.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.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace Skibidi { public static class Assets { public static string mainAssetBundleName = "skibidibundle"; public static AssetBundle MainAssetBundle = null; private static string GetAssemblyName() { return Assembly.GetExecutingAssembly().FullName.Split(',')[0]; } public static void PopulateAssets() { if ((Object)(object)MainAssetBundle == (Object)null) { using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(GetAssemblyName() + "." + mainAssetBundleName)) { MainAssetBundle = AssetBundle.LoadFromStream(stream); } } } } [BepInPlugin("rileyzzz.Skibidi", "Skibidi Toilet", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { private void Awake() { Assets.PopulateAssets(); EnemyType val = Assets.MainAssetBundle.LoadAsset<EnemyType>("SkibidiDef"); TerminalNode val2 = Assets.MainAssetBundle.LoadAsset<TerminalNode>("SkibidiFile"); TerminalKeyword val3 = Assets.MainAssetBundle.LoadAsset<TerminalKeyword>("Skibidi"); NetworkPrefabs.RegisterNetworkPrefab(val.enemyPrefab); Type typeFromHandle = typeof(SkibidiAI); ((BaseUnityPlugin)this).Logger.LogInfo((object)$"Skibidi AI {typeFromHandle}"); Enemies.RegisterEnemy(val, 22, (LevelTypes)(-1), (SpawnType)0, val2, val3); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin Skibidi is loaded!"); } } public static class PluginInfo { public const string PLUGIN_GUID = "Skibidi"; public const string PLUGIN_NAME = "Skibidi"; public const string PLUGIN_VERSION = "1.0.0"; } }
SneakoChair.dll
Decompiled 5 months agousing 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("LethalTess")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("LethalTess")] [assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("efb97642-4114-4967-9687-366d461fe680")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace SneakoChair; [BepInPlugin("DesperateDinosaur.SneakoChair", "SneakoChair", "1.0.0")] public class Plugin : BaseUnityPlugin { private const string GUID = "DesperateDinosaur.SneakoChair"; private const string NAME = "SneakoChair"; private const string VERSION = "1.0.0"; public static Plugin instance; private void Awake() { instance = this; string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "sneakochairmod"); AssetBundle val = AssetBundle.LoadFromFile(text); UnlockablesList val2 = val.LoadAsset<UnlockablesList>("Assets/Custom Objects/sneako_chair/sneako_chair_unlockables.asset"); UnlockableItem val3 = val2.unlockables[0]; TerminalNodesList val4 = val.LoadAsset<TerminalNodesList>("Assets/Custom Objects/sneako_chair/SneakoNodes.asset"); int num = 75; NetworkPrefabs.RegisterNetworkPrefab(val3.prefabObject); Utilities.FixMixerGroups(val3.prefabObject); Unlockables.RegisterUnlockable(val3, (StoreType)2, val4.terminalNodes[0], val4.terminalNodes[1], val4.terminalNodes[2], num); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded Item sneakoChair"); } }
plugins/WeatherMultipliers.dll
Decompiled 5 months agousing System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Serialization.Formatters.Binary; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using Microsoft.CodeAnalysis; using Unity.Collections; using Unity.Netcode; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyCompany("WeatherMultipliers")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyDescription("Lethal Company mod adding scrap multipliers to moon weather")] [assembly: AssemblyFileVersion("1.1.0.0")] [assembly: AssemblyInformationalVersion("1.1.0")] [assembly: AssemblyProduct("WeatherMultipliers")] [assembly: AssemblyTitle("WeatherMultipliers")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.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.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace WeatherMultipliers { [Serializable] public class Config : SyncedInstance<Config> { [CompilerGenerated] private static class <>O { public static HandleNamedMessageDelegate <0>__OnRequestSync; public static HandleNamedMessageDelegate <1>__OnReceiveSync; } public Dictionary<LevelWeatherType, float> ValueMultipliers = new Dictionary<LevelWeatherType, float>(); private static readonly Dictionary<LevelWeatherType, float> defaultValueMultipliers = new Dictionary<LevelWeatherType, float> { { (LevelWeatherType)1, 1.05f }, { (LevelWeatherType)2, 1.2f }, { (LevelWeatherType)3, 1.15f }, { (LevelWeatherType)4, 1.25f }, { (LevelWeatherType)5, 1.5f } }; public Config(ConfigFile cfg) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) InitInstance(this); foreach (KeyValuePair<LevelWeatherType, float> defaultValueMultiplier in defaultValueMultipliers) { Dictionary<LevelWeatherType, float> valueMultipliers = ValueMultipliers; LevelWeatherType key = defaultValueMultiplier.Key; LevelWeatherType key2 = defaultValueMultiplier.Key; valueMultipliers[key] = cfg.Bind<float>("Multipliers", ((object)(LevelWeatherType)(ref key2)).ToString(), Mathf.Clamp(defaultValueMultiplier.Value, 1f, 1000f), $"Scrap value multiplier for {defaultValueMultiplier.Key} weather").Value; } } public static void RequestSync() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) if (!SyncedInstance<Config>.IsClient) { return; } Plugin.Logger.LogInfo((object)"Attempting to sync config with host"); FastBufferWriter val = default(FastBufferWriter); ((FastBufferWriter)(ref val))..ctor(SyncedInstance<Config>.IntSize, (Allocator)2, -1); try { SyncedInstance<Config>.MessageManager.SendNamedMessage("WeatherMultipliers_OnRequestConfigSync", 0uL, val, (NetworkDelivery)3); } finally { ((IDisposable)(FastBufferWriter)(ref val)).Dispose(); } } public static void OnRequestSync(ulong clientId, FastBufferReader _) { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) if (!SyncedInstance<Config>.IsHost) { return; } Plugin.Logger.LogInfo((object)$"Config sync request received from client: {clientId}"); byte[] array = SyncedInstance<Config>.SerializeToBytes(SyncedInstance<Config>.Instance); int num = array.Length; FastBufferWriter val = default(FastBufferWriter); ((FastBufferWriter)(ref val))..ctor(num + SyncedInstance<Config>.IntSize, (Allocator)2, -1); try { ((FastBufferWriter)(ref val)).WriteValueSafe<int>(ref num, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteBytesSafe(array, -1, 0); SyncedInstance<Config>.MessageManager.SendNamedMessage("WeatherMultipliers_OnReceiveConfigSync", clientId, val, (NetworkDelivery)4); } catch (Exception arg) { Plugin.Logger.LogError((object)$"Error occurred syncing config with client: {clientId}\n{arg}"); } finally { ((IDisposable)(FastBufferWriter)(ref val)).Dispose(); } } public static void OnReceiveSync(ulong _, FastBufferReader reader) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) if (!((FastBufferReader)(ref reader)).TryBeginRead(SyncedInstance<Config>.IntSize)) { Plugin.Logger.LogError((object)"Config sync error: Could not begin reading buffer."); return; } int num = default(int); ((FastBufferReader)(ref reader)).ReadValueSafe<int>(ref num, default(ForPrimitives)); if (!((FastBufferReader)(ref reader)).TryBeginRead(num)) { Plugin.Logger.LogError((object)"Config sync error: Host could not sync."); return; } byte[] data = new byte[num]; ((FastBufferReader)(ref reader)).ReadBytesSafe(ref data, num, 0); SyncedInstance<Config>.SyncInstance(data); Plugin.Logger.LogInfo((object)"Successfully synced config with host."); } [HarmonyPostfix] [HarmonyPatch(typeof(PlayerControllerB), "ConnectClientToPlayerObject")] public static void InitializeLocalPlayer() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown if (SyncedInstance<Config>.IsHost) { CustomMessagingManager messageManager = SyncedInstance<Config>.MessageManager; object obj = <>O.<0>__OnRequestSync; if (obj == null) { HandleNamedMessageDelegate val = OnRequestSync; <>O.<0>__OnRequestSync = val; obj = (object)val; } messageManager.RegisterNamedMessageHandler("WeatherMultipliers_OnRequestConfigSync", (HandleNamedMessageDelegate)obj); SyncedInstance<Config>.Synced = true; return; } SyncedInstance<Config>.Synced = false; CustomMessagingManager messageManager2 = SyncedInstance<Config>.MessageManager; object obj2 = <>O.<1>__OnReceiveSync; if (obj2 == null) { HandleNamedMessageDelegate val2 = OnReceiveSync; <>O.<1>__OnReceiveSync = val2; obj2 = (object)val2; } messageManager2.RegisterNamedMessageHandler("WeatherMultipliers_OnReceiveConfigSync", (HandleNamedMessageDelegate)obj2); RequestSync(); } [HarmonyPostfix] [HarmonyPatch(typeof(GameNetworkManager), "StartDisconnect")] public static void PlayerLeave() { SyncedInstance<Config>.RevertSync(); } } [Serializable] public class SyncedInstance<T> { [NonSerialized] protected static int IntSize = 4; internal static CustomMessagingManager MessageManager => NetworkManager.Singleton.CustomMessagingManager; internal static bool IsClient => NetworkManager.Singleton.IsClient; internal static bool IsHost => NetworkManager.Singleton.IsHost; public static T Default { get; private set; } public static T Instance { get; private set; } public static bool Synced { get; internal set; } protected void InitInstance(T instance) { Default = instance; Instance = instance; IntSize = 4; } internal static void SyncInstance(byte[] data) { Instance = DeserializeFromBytes(data); Synced = true; } internal static void RevertSync() { Instance = Default; Synced = false; } public static byte[] SerializeToBytes(T val) { BinaryFormatter binaryFormatter = new BinaryFormatter(); using MemoryStream memoryStream = new MemoryStream(); try { binaryFormatter.Serialize(memoryStream, val); return memoryStream.ToArray(); } catch (Exception arg) { Plugin.Logger.LogError((object)$"Error serializing instance: {arg}"); return null; } } public static T DeserializeFromBytes(byte[] data) { BinaryFormatter binaryFormatter = new BinaryFormatter(); using MemoryStream serializationStream = new MemoryStream(data); try { return (T)binaryFormatter.Deserialize(serializationStream); } catch (Exception arg) { Plugin.Logger.LogError((object)$"Error deserializing instance: {arg}"); return default(T); } } } [BepInPlugin("WeatherMultipliers", "WeatherMultipliers", "1.1.0")] public class Plugin : BaseUnityPlugin { private readonly Harmony harmony = new Harmony("WeatherMultipliers"); public static Config Config { get; internal set; } internal static ManualLogSource Logger { get; private set; } private void Awake() { Config = new Config(((BaseUnityPlugin)this).Config); Logger = ((BaseUnityPlugin)this).Logger; harmony.PatchAll(); harmony.PatchAll(typeof(Config)); Logger.LogInfo((object)"Plugin WeatherMultipliers is loaded!"); } } public static class PluginInfo { public const string PLUGIN_GUID = "WeatherMultipliers"; public const string PLUGIN_NAME = "WeatherMultipliers"; public const string PLUGIN_VERSION = "1.1.0"; } } namespace WeatherMultipliers.patches { [HarmonyPatch(typeof(LungProp), "DisconnectFromMachinery")] public class ApparatusPatch { private static readonly ManualLogSource logger = Logger.CreateLogSource("WeatherMultipliers.ApparatusPatch"); private static void Prefix(LungProp __instance) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) LevelWeatherType currentWeather = __instance.roundManager.currentLevel.currentWeather; if (SyncedInstance<Config>.Instance.ValueMultipliers.ContainsKey(currentWeather)) { float num = SyncedInstance<Config>.Instance.ValueMultipliers[currentWeather]; ((GrabbableObject)__instance).scrapValue = (int)(num * (float)((GrabbableObject)__instance).scrapValue); logger.LogInfo((object)$"Adjusting LungProp (Apparatus) value for weather {currentWeather}: {((GrabbableObject)__instance).scrapValue}"); } } } [HarmonyPatch(typeof(RoundManager), "SpawnScrapInLevel")] public class ScrapGeneration { private static readonly ManualLogSource logger = Logger.CreateLogSource("WeatherMultipliers.ScrapGeneration"); private static void Prefix(RoundManager __instance) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) LevelWeatherType currentWeather = __instance.currentLevel.currentWeather; if (SyncedInstance<Config>.Instance.ValueMultipliers.ContainsKey(currentWeather)) { float num = SyncedInstance<Config>.Instance.ValueMultipliers[__instance.currentLevel.currentWeather]; __instance.scrapValueMultiplier *= num; logger.LogInfo((object)$"Set scrap value multiplier ({num}) for current weather \"{currentWeather}\""); } else { logger.LogInfo((object)$"No weather multiplier found for \"{currentWeather}\""); } } private static void Postfix(RoundManager __instance) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) LevelWeatherType currentWeather = __instance.currentLevel.currentWeather; if (SyncedInstance<Config>.Instance.ValueMultipliers.ContainsKey(currentWeather)) { float num = SyncedInstance<Config>.Instance.ValueMultipliers[__instance.currentLevel.currentWeather]; __instance.scrapValueMultiplier /= num; logger.LogInfo((object)$"Scrap generated, resetting scrap value multiplier to its original value of {__instance.scrapValueMultiplier}"); } } } }
DeezNuts.dll
Decompiled 5 months 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 DeezNuts.Patch; using HarmonyLib; using Microsoft.CodeAnalysis; using Unity.Netcode; 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("DeezNuts")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("My first plugin")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("DeezNuts")] [assembly: AssemblyTitle("DeezNuts")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.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.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace DeezNuts { [BepInPlugin("com.fakemarsh.DeezNuts", "DeezNuts", "0.1.0")] [BepInProcess("Lethal Company.exe")] public class Plugin : BaseUnityPlugin { private Harmony harmony = new Harmony("DeezNuts"); public static ManualLogSource logger; public static GameObject deez_nuts_button; public static Item deez_nuts_item; private void Awake() { logger = ((BaseUnityPlugin)this).Logger; logger.LogInfo((object)"Plugin DeezNuts is loaded!"); LoadButton(); harmony.PatchAll(typeof(DeezPatches)); harmony.PatchAll(typeof(NetworkPatches)); } private void LoadButton() { string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "deeznuts"); AssetBundle val = AssetBundle.LoadFromFile(text); GameObject val2 = val.LoadAsset<GameObject>("Assets/DeezNuts/DeezNuts.prefab"); deez_nuts_button = val2; deez_nuts_item = val.LoadAsset<Item>("Assets/DeezNuts/DeezNuts.asset"); logger.LogInfo((object)("custom scrap item loaded into network: " + deez_nuts_item.itemName)); } } public static class PluginInfo { public const string PLUGIN_GUID = "DeezNuts"; public const string PLUGIN_NAME = "DeezNuts"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace DeezNuts.Patch { [HarmonyPatch(typeof(StartOfRound))] internal class DeezPatches { [HarmonyPrefix] [HarmonyPatch("Awake")] public static void DeezNutsButtonPatch(StartOfRound __instance) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown Plugin.logger.LogInfo((object)"inside button patch"); SelectableLevel[] levels = __instance.levels; SelectableLevel[] array = levels; foreach (SelectableLevel val in array) { SpawnableItemWithRarity val2 = new SpawnableItemWithRarity(); val2.spawnableItem = Plugin.deez_nuts_item; val2.rarity = 99; Plugin.logger.LogInfo((object)("Adding deez nuts button into moon " + ((Object)val).name)); val.spawnableScrap.Add(val2); Plugin.logger.LogInfo((object)"\n\n"); } if (!__instance.allItemsList.itemsList.Contains(Plugin.deez_nuts_item)) { __instance.allItemsList.itemsList.Add(Plugin.deez_nuts_item); } } } internal class NetworkPatches { private static GameObject networkPrefab; [HarmonyPostfix] [HarmonyPatch(typeof(GameNetworkManager), "Start")] public static void Init(GameNetworkManager __instance) { Plugin.logger.LogInfo((object)"inside deez nuts network patcher"); if (!((Object)(object)networkPrefab != (Object)null)) { Plugin.logger.LogInfo((object)"we are adding the deez nuts button to the network!"); networkPrefab = Plugin.deez_nuts_button; ((Component)__instance).GetComponent<NetworkManager>().PrefabHandler.AddNetworkPrefab(networkPrefab); } } } }
EnhancedTZP.dll
Decompiled 5 months agousing System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using EnhancedTZP.Control; using EnhancedTZP.Heal; using GameNetcodeStuff; using HarmonyLib; using Unity.Netcode; 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("EnhancedTZP")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("EnhancedTZP")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("f322a722-b739-46ad-a36a-811e2fe87987")] [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 EnhancedTZP { [BepInPlugin("xAsc3nt.EnhancedTZP", "EnhancedTZP", "1.1.1")] public class EnhancedTZP : BaseUnityPlugin { private const string modGUID = "xAsc3nt.EnhancedTZP"; private const string modName = "EnhancedTZP"; private const string modVersion = "1.1.1"; private readonly Harmony harmony = new Harmony("xAsc3nt.EnhancedTZP"); private ConfigEntry<bool> configInfiniteFuel; public static bool InfiniteFuel; private ConfigEntry<bool> configShowBatteryIcon; public static bool ShowBatteryIcon; public static EnhancedTZP Instance; internal ManualLogSource mls; private void Awake() { if ((Object)(object)Instance == (Object)null) { Instance = this; } mls = Logger.CreateLogSource("xAsc3nt.EnhancedTZP"); mls.LogInfo((object)"EnhancedTZP is activated :)"); harmony.PatchAll(typeof(EnhancedTZP)); harmony.PatchAll(typeof(PlayerControllerBPatch1)); harmony.PatchAll(typeof(PlayerControllerBPatch)); configInfiniteFuel = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Infinite TZP", false, "Prevent TZP from ever running out."); InfiniteFuel = configInfiniteFuel.Value; configShowBatteryIcon = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "Battery Icon", true, "Show a battery icon with the current TZP Fuel"); ShowBatteryIcon = configShowBatteryIcon.Value; } } } namespace EnhancedTZP.Heal { [HarmonyPatch(typeof(PlayerControllerB))] [HarmonyPatch(typeof(TetraChemicalItem))] internal class PlayerControllerBPatch : GrabbableObject { [HarmonyPatch(typeof(TetraChemicalItem), "Update")] [HarmonyPrefix] private static void PatchBattery(ref Item ___itemProperties, ref Battery ___insertedBattery, ref float ___fuel) { ___itemProperties.requiresBattery = false; ___insertedBattery.charge = ___fuel; ___insertedBattery.empty = false; } [HarmonyPatch(typeof(TetraChemicalItem), "Update")] [HarmonyPostfix] public static void healtzp(ref bool ___emittingGas, ref bool ___isHeld, PlayerControllerB __instance, ref float ___fuel, ref Item ___itemProperties, ref Battery ___insertedBattery) { //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) if (EnhancedTZP.InfiniteFuel && (int)(___fuel * 1000f) % 1000 < 500) { ___fuel = 1f; } if (EnhancedTZP.ShowBatteryIcon) { ___itemProperties.requiresBattery = true; ___insertedBattery.charge = ___fuel; ___insertedBattery.empty = false; } if (!(___emittingGas & ___isHeld) || !((NetworkBehaviour)__instance).IsOwner) { return; } int num = (int)(___fuel * 1000f) % 1000; GameNetworkManager.Instance.localPlayerController.inSpecialInteractAnimation = true; if (((NetworkBehaviour)__instance).IsOwner && num % 30 == 0 && GameNetworkManager.Instance.localPlayerController.health < 100) { HUDManager.Instance.DisplayStatusEffect("Strengthening...\nHealing ... " + (GameNetworkManager.Instance.localPlayerController.health + 1) + "%"); GameNetworkManager.Instance.localPlayerController.DamagePlayer(-5, false, true, (CauseOfDeath)0, 0, false, default(Vector3)); if (GameNetworkManager.Instance.localPlayerController.health >= 10 && GameNetworkManager.Instance.localPlayerController.criticallyInjured) { GameNetworkManager.Instance.localPlayerController.MakeCriticallyInjured(false); } HUDManager.Instance.HUDAnimator.ResetTrigger("SmallHit"); } if (GameNetworkManager.Instance.localPlayerController.health >= 99) { HUDManager.Instance.DisplayStatusEffect("Healthy.\nGet to work!"); HUDManager.Instance.statusEffectAnimator.SetTrigger("IndicateStatus"); } GameNetworkManager.Instance.localPlayerController.inSpecialInteractAnimation = false; } } } namespace EnhancedTZP.Control { [HarmonyPatch(typeof(PlayerControllerB))] internal class PlayerControllerBPatch1 { private static float? originalJumpForce; private static float? originalmovementSpeed; [HarmonyPatch("Update")] [HarmonyPrefix] private static void LongerDuration(ref float ___drunknessInertia, ref bool ___increasingDrunknessThisFrame, ref float ___drunkness, ref float ___drunknessSpeed, ref float ___movementSpeed, ref float ___jumpForce, ref float ___sprintMeter) { if (!originalJumpForce.HasValue) { originalJumpForce = 13f; originalmovementSpeed = 4.6f; } if (___increasingDrunknessThisFrame) { return; } if (___drunkness > 0f) { ___movementSpeed = 5.75f; ___jumpForce = 15.75f; if (___drunkness > 0.3f) { ___movementSpeed = 5.75f; ___jumpForce = 15.75f; if (___drunkness > 0.8f) { ___movementSpeed = 6.5f; ___jumpForce = 20f; ___sprintMeter = 1f; } } } else { if (originalJumpForce.HasValue) { ___jumpForce = originalJumpForce.Value; ___movementSpeed = originalmovementSpeed.Value; originalJumpForce = null; originalmovementSpeed = null; } ___drunknessInertia = 0f; } } } }