managed to actually inject something woooo
This commit is contained in:
parent
14deee32ce
commit
f803f865f2
|
@ -12,6 +12,7 @@
|
||||||
https://nuget.bepinex.dev/v3/index.json
|
https://nuget.bepinex.dev/v3/index.json
|
||||||
</RestoreAdditionalProjectSources>
|
</RestoreAdditionalProjectSources>
|
||||||
<RootNamespace>MetalButtplug</RootNamespace>
|
<RootNamespace>MetalButtplug</RootNamespace>
|
||||||
|
<NoWarn>$(NoWarn);NU1603</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
13
Patches/TestPatch.cs
Normal file
13
Patches/TestPatch.cs
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
|
||||||
|
namespace MetalButtplug.Patches;
|
||||||
|
|
||||||
|
[HarmonyPatch(typeof(BeatSequencer))]
|
||||||
|
[HarmonyPatch("UpdateBeat")]
|
||||||
|
class TestPatch {
|
||||||
|
static void Prefix(BeatStatusProvider beatStatus) {
|
||||||
|
if (beatStatus.BeatFlags.HasFlag(BeatFlags.Quarter)) {
|
||||||
|
Plugin.Log.LogInfo("Quarter beat: " + beatStatus.GetBeatProgress(BeatType.Quarter));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,4 +1,5 @@
|
||||||
using BepInEx;
|
using BepInEx;
|
||||||
|
using BepInEx.Logging;
|
||||||
using BepInEx.Unity.IL2CPP;
|
using BepInEx.Unity.IL2CPP;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
|
|
||||||
|
@ -6,9 +7,13 @@ namespace MetalButtplug;
|
||||||
|
|
||||||
[BepInPlugin(MyPluginInfo.PLUGIN_GUID, MyPluginInfo.PLUGIN_NAME, MyPluginInfo.PLUGIN_VERSION)]
|
[BepInPlugin(MyPluginInfo.PLUGIN_GUID, MyPluginInfo.PLUGIN_NAME, MyPluginInfo.PLUGIN_VERSION)]
|
||||||
public class Plugin : BasePlugin {
|
public class Plugin : BasePlugin {
|
||||||
|
Harmony harmony = new Harmony(MyPluginInfo.PLUGIN_GUID);
|
||||||
|
internal static new ManualLogSource Log;
|
||||||
public override void Load() {
|
public override void Load() {
|
||||||
// Plugin startup logic
|
Plugin.Log = base.Log;
|
||||||
|
|
||||||
Log.LogInfo($"Plugin {MyPluginInfo.PLUGIN_GUID} is loaded!");
|
Log.LogInfo($"Plugin {MyPluginInfo.PLUGIN_GUID} is loaded!");
|
||||||
Log.LogInfo("GAY SEX!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
Log.LogInfo("GAY SEX!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||||
|
harmony.PatchAll(typeof(Patches.TestPatch));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue