Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CommunityBugFixCollection/CommunityBugFixCollection.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="MicroUtils.HarmonyAnalyzers" Version="1.3.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="MonkeyLoader.GamePacks.Resonite" Version="0.21.2-beta" />
<PackageReference Include="PolySharp" Version="1.15.0">
<PrivateAssets>all</PrivateAssets>
Expand All @@ -39,5 +43,6 @@
<PackageReference Include="Resonite.Elements.Core" Version="1.4.2" />
<PackageReference Include="Resonite.Elements.Quantity" Version="1.2.2" />
<PackageReference Include="Resonite.FrooxEngine" Version="2024.11.21.479" />
<PackageReference Include="Resonite.ProtoFluxBindings" Version="2024.13.19.479" />
</ItemGroup>
</Project>
69 changes: 69 additions & 0 deletions CommunityBugFixCollection/NodeNameAdjustments.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
using FrooxEngine.ProtoFlux;
using FrooxEngine.ProtoFlux.Runtimes.Execution.Nodes.Math;
using FrooxEngine.ProtoFlux.Runtimes.Execution.Nodes.Strings.Characters;
using HarmonyLib;
using MonkeyLoader.Resonite;
using System;
using System.Collections.Generic;
using System.Text;

#pragma warning disable IDE0060 // Remove unused parameter

namespace CommunityBugFixCollection
{
[HarmonyPatchCategory(nameof(NodeNameAdjustments))]
[HarmonyPatch(nameof(ProtoFluxNode.NodeName), MethodType.Getter)]
internal sealed class NodeNameAdjustments : ResoniteMonkey<NodeNameAdjustments>
{
public override bool CanBeDisabled => true;

[HarmonyPostfix]
[HarmonyPatch(typeof(Backspace))]
private static string BackspaceNamePostfix(string __result)
=> "Backspace (\\b)";

[HarmonyPostfix]
[HarmonyPatch(typeof(Bell))]
private static string BellNamePostfix(string __result)
=> "Bell (\\a)";

[HarmonyPostfix]
[HarmonyPatch(typeof(CarriageReturn))]
private static string CarriageReturnNamePostfix(string __result)
=> "Carriage Return (\\r)";

[HarmonyPostfix]
[HarmonyPatch(typeof(FormFeed))]
private static string FormFeedNamePostfix(string __result)
=> "Form Feed (\\f)";

private static bool Prepare() => Enabled;

[HarmonyPostfix]
[HarmonyPatch(typeof(Remap11_01_Double))]
private static string Remap11_01_DoubleNamePostfix(string __result)
=> "Remap [-1; 1] to [0; 1]";

[HarmonyPostfix]
[HarmonyPatch(typeof(Remap11_01_Float))]
private static string Remap11_01_FloatNamePostfix(string __result)
=> "Remap [-1; 1] to [0; 1]";

[HarmonyPostfix]
[HarmonyPatch(typeof(Space))]
private static string SpaceNamePostfix(string __result)
=> "Space ( )";

[HarmonyPostfix]
[HarmonyPatch(typeof(Tab))]
private static string TabNamePostfix(string __result)
=> "Tab (\\t)";

[HarmonyPostfix]
[HarmonyPatch(typeof(VerticalTab))]
private static string VerticalTabNamePostfix(string __result)
=> "Vertical Tab (\\v)";
}
}

#pragma warning restore IDE0060 // Remove unused parameter
Loading