This commit is contained in:
Lea 2024-05-20 23:55:16 +02:00
parent 6fe683b4a9
commit 141505749f
Signed by: Lea
GPG key ID: 1BAFFE8347019C42
3 changed files with 13 additions and 12 deletions

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<Costura>
<IncludeAssemblies>
System.*
deniszykov.WebSocketListener
Buttplug
Buttplug.Client.Connectors.WebsocketConnector
<Costura>
<IncludeAssemblies>
System.*
deniszykov.WebSocketListener
Buttplug
Buttplug.Client.Connectors.WebsocketConnector
Newtonsoft.Json
</IncludeAssemblies>
</Costura>
</IncludeAssemblies>
</Costura>
</Weavers>

View file

@ -15,7 +15,8 @@ internal class UpdateBeatPatch {
$"Quarter beat, multiplier: {controller.GetCurrentTierIndex()}/{controller.GetNumTiers()-1} ({1 << controller.GetCurrentTierIndex()}x)"
);
ButtplugManager.Vibrate((float)controller.GetCurrentTierIndex() / ((float)controller.GetNumTiers() - 1), 100);
var scoreMultiplier = (float)controller.GetCurrentTierIndex() / ((float)controller.GetNumTiers() - 1);
ButtplugManager.Vibrate(scoreMultiplier, 100);
}
}

View file

@ -1,4 +1,5 @@
using BepInEx;
using System.Reflection;
using BepInEx;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using HarmonyLib;
@ -8,14 +9,13 @@ namespace MetalButtplug;
[BepInPlugin(MyPluginInfo.PLUGIN_GUID, MyPluginInfo.PLUGIN_NAME, MyPluginInfo.PLUGIN_VERSION)]
public class Plugin : BasePlugin {
Harmony harmony = new Harmony(MyPluginInfo.PLUGIN_GUID);
internal static new ManualLogSource Log;
public override void Load() {
Plugin.Log = base.Log;
Log.LogInfo($"Plugin {MyPluginInfo.PLUGIN_GUID} is loaded!");
harmony.PatchAll(typeof(Patches.UpdateBeatPatch));
Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly());
Log.LogInfo("Applied patches");
ButtplugManager.Init();