Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Banane9 committed Jan 12, 2025
1 parent dde5bb0 commit 044a4e3
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions CommunityBugFixCollection/FireBrushToolDequipEvents.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using FrooxEngine;
using HarmonyLib;
using MonkeyLoader.Resonite;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CommunityBugFixCollection
{
[HarmonyPatchCategory(nameof(FireBrushToolDequipEvents))]
[HarmonyPatch(typeof(BrushTool), nameof(BrushTool.OnDequipped))]
internal sealed class FireBrushToolDequipEvents : ResoniteMonkey<FireBrushToolDequipEvents>
{
public override bool CanBeDisabled => true;

private static bool Prepare() => Enabled;

private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
{
return new[]
{
CodeInstruction.LoadArgument(0),
CodeInstruction.Call((Tool tool) => tool.OnDequipped())
}
.Concat(instructions);
}
}
}

0 comments on commit 044a4e3

Please sign in to comment.