diff --git a/YashSpeedMod/Patches/PlayerControllerBPatch.cs b/YashSpeedMod/Patches/PlayerControllerBPatch.cs new file mode 100644 index 0000000..1bd911d --- /dev/null +++ b/YashSpeedMod/Patches/PlayerControllerBPatch.cs @@ -0,0 +1,21 @@ +using GameNetcodeStuff; +using HarmonyLib; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace YashSpeedMod.Patches +{ + [HarmonyPatch(typeof(PlayerControllerB))] + internal class PlayerControllerBPatch + { + [HarmonyPatch("Update")] + [HarmonyPostfix] + static void SpeedPatch(ref float ___movementSpeed) + { + ___movementSpeed = 0f; + } + } +} diff --git a/YashSpeedMod/Plugin.cs b/YashSpeedMod/Plugin.cs new file mode 100644 index 0000000..cb5913b --- /dev/null +++ b/YashSpeedMod/Plugin.cs @@ -0,0 +1,45 @@ +using BepInEx; +using BepInEx.Logging; +using HarmonyLib; +using YashSpeedMod.Patches; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LCModTest +{ + [BepInPlugin(modGUID, modName, modVersion)] + public class TutorialModBase : BaseUnityPlugin + + { + private const string modGUID = "YashSpeedMod"; + private const string modName = "Speed Mod"; + private const string modVersion = "1.0.0.0"; + + private readonly Harmony harmony = new Harmony(modGUID); + + private static TutorialModBase Instance; + + internal ManualLogSource mls; + + void Awake() + { + if(Instance == null) + { + Instance = this; + } + mls = BepInEx.Logging.Logger.CreateLogSource(modGUID); + + mls.LogInfo("The test mod has awoken"); + + harmony.PatchAll(typeof(TutorialModBase)); + harmony.PatchAll(typeof(PlayerControllerBPatch)); + } + } + + + + +} diff --git a/YashSpeedMod/Properties/AssemblyInfo.cs b/YashSpeedMod/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4e74363 --- /dev/null +++ b/YashSpeedMod/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("LCModTest")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("LCModTest")] +[assembly: AssemblyCopyright("Copyright © 2024")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("21bd19e0-c190-4814-b002-5e98df85bfc5")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/YashSpeedMod/YashSpeedMod.csproj b/YashSpeedMod/YashSpeedMod.csproj new file mode 100644 index 0000000..93e086b --- /dev/null +++ b/YashSpeedMod/YashSpeedMod.csproj @@ -0,0 +1,65 @@ + + + + + Debug + AnyCPU + {21BD19E0-C190-4814-B002-5E98DF85BFC5} + Library + Properties + YashSpeedMod + YashSpeedMod + v4.7.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AnyCPU + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Lethal Company\BepInEx\core\0Harmony.dll + + + ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Lethal Company\Lethal Company_Data\Managed\Assembly-CSharp.dll + + + ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Lethal Company\BepInEx\core\BepInEx.dll + + + + + + + + + + + ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Lethal Company\Lethal Company_Data\Managed\UnityEngine.dll + + + ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Lethal Company\Lethal Company_Data\Managed\UnityEngine.CoreModule.dll + + + + + + + + + \ No newline at end of file