diff --git a/CommunityBugFixCollection/BreakDragAndDropCopiedComponentDrives.cs b/CommunityBugFixCollection/BreakDragAndDropCopiedComponentDrives.cs index f814492..871be5e 100644 --- a/CommunityBugFixCollection/BreakDragAndDropCopiedComponentDrives.cs +++ b/CommunityBugFixCollection/BreakDragAndDropCopiedComponentDrives.cs @@ -22,6 +22,7 @@ protected override bool OnEngineReady() var integrationMod = Mod.Loader.Get().ById("MonkeyLoader.GamePacks.Resonite"); // Newer version than last one that did not include the fix + // accidentally not included in 0.23.0 ... if (integrationMod is not null && integrationMod.Version > new NuGetVersion(0, 22, 1)) { Logger.Info(() => "Skipping in favor of the Resonite Integration fix."); diff --git a/CommunityBugFixCollection/ColorDisplayValueProxy.cs b/CommunityBugFixCollection/ColorDisplayValueProxy.cs index b1c13fe..98a3764 100644 --- a/CommunityBugFixCollection/ColorDisplayValueProxy.cs +++ b/CommunityBugFixCollection/ColorDisplayValueProxy.cs @@ -9,6 +9,7 @@ namespace CommunityBugFixCollection { + // Todo: do this for strings and objects too? [HarmonyPatchCategory(nameof(ColorDisplayValueProxy))] [HarmonyPatch(typeof(ValueDisplay), nameof(ValueDisplay.BuildContentUI))] internal sealed class ColorDisplayValueProxy : ResoniteBugFixMonkey diff --git a/CommunityBugFixCollection/CommunityBugFixCollection.csproj b/CommunityBugFixCollection/CommunityBugFixCollection.csproj index a82c5cf..6cd8bb1 100644 --- a/CommunityBugFixCollection/CommunityBugFixCollection.csproj +++ b/CommunityBugFixCollection/CommunityBugFixCollection.csproj @@ -30,11 +30,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -42,11 +42,11 @@ - + - + diff --git a/CommunityBugFixCollection/ConstantNodeNameAdjustments.cs b/CommunityBugFixCollection/ConstantNodeNameAdjustments.cs new file mode 100644 index 0000000..ee7361c --- /dev/null +++ b/CommunityBugFixCollection/ConstantNodeNameAdjustments.cs @@ -0,0 +1,89 @@ +using FrooxEngine.ProtoFlux; +using FrooxEngine.ProtoFlux.Runtimes.Execution.Nodes.Strings.Characters; +using HarmonyLib; +using System; +using System.Collections.Generic; +using System.Text; + +namespace CommunityBugFixCollection +{ + [HarmonyPatchCategory(nameof(ConstantNodeNameAdjustments))] + [HarmonyPatch(nameof(ProtoFluxNode.NodeName), MethodType.Getter)] + internal sealed class ConstantNodeNameAdjustments : ResoniteBugFixMonkey + { + public override IEnumerable Authors => Contributors.Banane9; + + // Legacy Fix, so off by default + protected override bool OnComputeDefaultEnabledState() => false; + + [HarmonyPostfix] + [HarmonyPatch(typeof(Backspace))] + private static string BackspaceNamePostfix(string __result) + { + if (!Enabled) + return __result; + + return "Backspace (\\b)"; + } + + [HarmonyPostfix] + [HarmonyPatch(typeof(Bell))] + private static string BellNamePostfix(string __result) + { + if (!Enabled) + return __result; + + return "Bell (\\a)"; + } + + [HarmonyPostfix] + [HarmonyPatch(typeof(CarriageReturn))] + private static string CarriageReturnNamePostfix(string __result) + { + if (!Enabled) + return __result; + + return "Carriage Return (\\r)"; + } + + [HarmonyPostfix] + [HarmonyPatch(typeof(FormFeed))] + private static string FormFeedNamePostfix(string __result) + { + if (!Enabled) + return __result; + + return "Form Feed (\\f)"; + } + + [HarmonyPostfix] + [HarmonyPatch(typeof(Space))] + private static string SpaceNamePostfix(string __result) + { + if (!Enabled) + return __result; + + return "Space ( )"; + } + + [HarmonyPostfix] + [HarmonyPatch(typeof(Tab))] + private static string TabNamePostfix(string __result) + { + if (!Enabled) + return __result; + + return "Tab (\\t)"; + } + + [HarmonyPostfix] + [HarmonyPatch(typeof(VerticalTab))] + private static string VerticalTabNamePostfix(string __result) + { + if (!Enabled) + return __result; + + return "Vertical Tab (\\v)"; + } + } +} \ No newline at end of file diff --git a/CommunityBugFixCollection/Locale/de.json b/CommunityBugFixCollection/Locale/de.json index 213d4bc..eb64a1c 100644 --- a/CommunityBugFixCollection/Locale/de.json +++ b/CommunityBugFixCollection/Locale/de.json @@ -16,6 +16,8 @@ "CommunityBugFixCollection.ColorDisplayValueProxy.Description": "Sorgt dafür, dass ValueDisplay Nodes eine ValueProxySource Komponente haben.", "CommunityBugFixCollection.ColorXNodeNamesSpacing.Description": "Korrigiert die Schreibweise der Namen von ProtoFlux Nodes die ColorX enthalten.", "CommunityBugFixCollection.ConsistentContextMenuAngularSize.Description": "Sorgt dafür, dass das Kontextmenü im Desktopmodus immer die gleiche Größe auf dem Bildschirm hat, unabhängig vom Sichtfeld (FOV).", + "CommunityBugFixCollection.ConstantNodeNameAdjustments.Name": "(Alt) Constant Nodenamen Anpassungen", + "CommunityBugFixCollection.ConstantNodeNameAdjustments.Description": "(Alt) Ändert die Namen der ProtoFlux Nodes in Strings > Constants darauf, wie sie im ursprünglichen Fix waren.", "CommunityBugFixCollection.CopySyncMemberToClipboardAction.Description": "Fügt eine Kopieren Aktion zu Feldern in Inspektoren hinzu, die keine Referenzen sind.", "CommunityBugFixCollection.CorrectByteCasting.Description": "Korrigiert die Konvertierung von bytes in andere Werte mittels ProtoFlux Value Casts.", "CommunityBugFixCollection.CorrectMaterialGizmoScaling.Description": "Verhindert, dass das MaterialGizmo zweimal skaliert wird, wenn man Editieren auf dem Materialwerzeug nutzt.", @@ -35,7 +37,7 @@ "CommunityBugFixCollection.NaNtEqual.Description": "Sorgt dafür, dass NaN float / double Werte sich bei den == und != ProtoFlux Nodes sowie bei der ValueEqualityDriver Komponente niemals gleichen.", "CommunityBugFixCollection.NoLossOfColorProfile.Description": "Verhindert, dass Farbprofile nicht bei allen Berechnungen erhalten bleiben.", "CommunityBugFixCollection.NoZeroScaleToolRaycast.Description": "Verhinder einen Crash wenn (Multi-)Werkzeuge auf null skaliert werden.", - "CommunityBugFixCollection.NodeNameAdjustments.Description": "Korrigiert, dass die Namen der meisten ProtoFlux Nodes in Strings > Constants unsichtbar sind.", + "CommunityBugFixCollection.NodeNameAdjustments.Description": "Verbessert die verwirrenden Namen der Remap [-1; 1] zu [0; 1] ProtoFlux Nodes.", "CommunityBugFixCollection.NonHDRColorClamping.Description": "Korrigiert, dass die nicht-HDR Varianten der Color(X) Kanal-Additionen die Werte nicht limitieren.", "CommunityBugFixCollection.NonLinearColorXFromHexCode.Description": "Zwingt colorX From HexCode das sRGB statt dem Linearen Farbprofil zu nutzen.", "CommunityBugFixCollection.PauseAnimatorUpdates.Description": "Verhindert, dass Animatoren jeden Frame in alle assoziierten Felder schreiben, obwohl sie nicht am animieren sind.", diff --git a/CommunityBugFixCollection/Locale/en.json b/CommunityBugFixCollection/Locale/en.json index 6d8fefc..398a6b7 100644 --- a/CommunityBugFixCollection/Locale/en.json +++ b/CommunityBugFixCollection/Locale/en.json @@ -21,6 +21,8 @@ "CommunityBugFixCollection.ColorDisplayValueProxy.Description": "Fixes ValueDisplay not having a ValueProxySource component.", "CommunityBugFixCollection.ColorXNodeNamesSpacing.Description": "Fixes ProtoFlux node names containing ColorX being spaced wrong.", "CommunityBugFixCollection.ConsistentContextMenuAngularSize.Description": "Makes the context menu stay a fixed on-screen size in desktop mode, regardless of FOV.", + "CommunityBugFixCollection.ConstantNodeNameAdjustments.Name": "(Legacy) Constant Node Name Adjustments", + "CommunityBugFixCollection.ConstantNodeNameAdjustments.Description": "(Legacy) Changes the names of the ProtoFlux nodes in Strings > Constants to be how they were with the original fix.", "CommunityBugFixCollection.CopySyncMemberToClipboardAction.Description": "Adds Copy to Clipboard action on any non-reference member fields in Inspectors.", "CommunityBugFixCollection.CorrectByteCasting.Description": "Fixes ProtoFlux value casts from byte to some other value converting incorrectly.", "CommunityBugFixCollection.CorrectMaterialGizmoScaling.Description": "Fixes the MaterialGizmo being scaled twice when using Edit on the Material Tool.", @@ -41,7 +43,7 @@ "CommunityBugFixCollection.NaNtEqual.Description": "Makes NaN floats / doubles never equal to each other for the ProtoFlux == and != nodes, as well as the ValueEqualityDriver component.", "CommunityBugFixCollection.NoLossOfColorProfile.Description": "Fixes Color Profile not being preserved on all operations.", "CommunityBugFixCollection.NoZeroScaleToolRaycast.Description": "Fixes a crash when a (multi)tool is scaled to zero.", - "CommunityBugFixCollection.NodeNameAdjustments.Description": "Fixes most ProtoFlux nodes in Strings > Constants having invisible names.", + "CommunityBugFixCollection.NodeNameAdjustments.Description": "Fixes the confusing names of the Remap [-1; 1] to [0; 1] ProtoFlux nodes.", "CommunityBugFixCollection.NonHDRColorClamping.Description": "Fixes non-HDR variants of Color(X) channel addition not clamping.", "CommunityBugFixCollection.NonLinearColorXFromHexCode.Description": "Forces colorX From HexCode to use the sRGB rather than Linear profile.", "CommunityBugFixCollection.PauseAnimatorUpdates.Description": "Fixes animators updating all associated fields every frame while enabled but not playing.", diff --git a/CommunityBugFixCollection/NodeNameAdjustments.cs b/CommunityBugFixCollection/NodeNameAdjustments.cs index 63dab97..93ca334 100644 --- a/CommunityBugFixCollection/NodeNameAdjustments.cs +++ b/CommunityBugFixCollection/NodeNameAdjustments.cs @@ -1,6 +1,5 @@ using FrooxEngine.ProtoFlux; using FrooxEngine.ProtoFlux.Runtimes.Execution.Nodes.Math; -using FrooxEngine.ProtoFlux.Runtimes.Execution.Nodes.Strings.Characters; using HarmonyLib; using System; using System.Collections.Generic; @@ -14,48 +13,6 @@ internal sealed class NodeNameAdjustments : ResoniteBugFixMonkey Authors => Contributors.Banane9; - [HarmonyPostfix] - [HarmonyPatch(typeof(Backspace))] - private static string BackspaceNamePostfix(string __result) - { - if (!Enabled) - return __result; - - return "Backspace (\\b)"; - } - - [HarmonyPostfix] - [HarmonyPatch(typeof(Bell))] - private static string BellNamePostfix(string __result) - { - if (!Enabled) - return __result; - - return "Bell (\\a)"; - } - - [HarmonyPostfix] - [HarmonyPatch(typeof(CarriageReturn))] - private static string CarriageReturnNamePostfix(string __result) - { - if (!Enabled) - return __result; - - return "Carriage Return (\\r)"; - } - - [HarmonyPostfix] - [HarmonyPatch(typeof(FormFeed))] - private static string FormFeedNamePostfix(string __result) - { - if (!Enabled) - return __result; - - return "Form Feed (\\f)"; - } - - private static bool Prepare() => Enabled; - [HarmonyPostfix] [HarmonyPatch(typeof(Remap11_01_Double))] private static string Remap11_01_DoubleNamePostfix(string __result) @@ -75,35 +32,5 @@ private static string Remap11_01_FloatNamePostfix(string __result) return "Remap [-1; 1] to [0; 1]"; } - - [HarmonyPostfix] - [HarmonyPatch(typeof(Space))] - private static string SpaceNamePostfix(string __result) - { - if (!Enabled) - return __result; - - return "Space ( )"; - } - - [HarmonyPostfix] - [HarmonyPatch(typeof(Tab))] - private static string TabNamePostfix(string __result) - { - if (!Enabled) - return __result; - - return "Tab (\\t)"; - } - - [HarmonyPostfix] - [HarmonyPatch(typeof(VerticalTab))] - private static string VerticalTabNamePostfix(string __result) - { - if (!Enabled) - return __result; - - return "Vertical Tab (\\v)"; - } } } \ No newline at end of file diff --git a/CommunityBugFixCollection/ValidQuaternionInputs.cs b/CommunityBugFixCollection/ValidQuaternionInputs.cs index 06b04aa..5e5f695 100644 --- a/CommunityBugFixCollection/ValidQuaternionInputs.cs +++ b/CommunityBugFixCollection/ValidQuaternionInputs.cs @@ -20,8 +20,6 @@ private static void Postfix(ProtoFluxNode __result) if (!Enabled) return; - Logger.Info(() => $"__result is: {__result.GetType().CompactDescription()}"); - __result.RunInUpdates(0, () => { if (__result is ValueInput floatQInput) diff --git a/README.md b/README.md index 3fcbb82..5a4385c 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,6 @@ just disable them in the settings in the meantime. * Duplicating Components breaking drives (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/92) * Selecting Copy Component when drag and dropping a Component onto an Inspector * Worlds crashing when a (multi)tool is scaled to zero (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/98) -* Most ProtoFlux nodes in Strings > Constants having invisible names (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/177) * The `Remap -1 1 to 0 1` ProtoFlux node having a hard to understand name (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/245) * ColorX Luminance calculations being incorrect for non-linear color profiles (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/281) * Non-HDR variants of Color(X) channel addition not clamping (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/316) @@ -92,9 +91,14 @@ just disable them in the settings in the meantime. ## Closed Issues The issues that were first closed in this mod but have officially been closed now will be linked in the following list. -If they appear here, their implementation has been removed from the mod. +If they appear here, their implementation has been removed from the mod, +unless it is marked with `(Legacy)`. +In that case, the original fix is left in but disabled by default. +This is done for changes where the vanilla implementation is noticably different from the fix, +but the exact implementation is inconsequential. * Duplicating Components breaking drives (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/92) * Pressing Duplicate on the Component in an Inspector * Using the Component Clone Tool to duplicate them onto a slot +* (Legacy) Most ProtoFlux nodes in Strings > Constants having invisible names (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/177) * UserInspectors not listing existing users in the session for non-host users (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/1964) \ No newline at end of file