From 5882cc64ccad46e843514ec60127cf8bae5dcd11 Mon Sep 17 00:00:00 2001 From: Arne Kiesewetter Date: Thu, 10 Jul 2025 15:15:17 +0200 Subject: [PATCH 1/4] Update for the splittening --- CommunityBugFixCollection/BetterGridWorldPreset.cs | 1 + .../CaseInsensitiveCustomGenerics.cs | 2 +- .../CommunityBugFixCollection.csproj | 12 +++++++----- .../GammaCorrectedColorXLuminance.cs | 1 + CommunityBugFixCollection/NoLossOfColorProfile.cs | 1 + .../NonLinearColorXFromHexCode.cs | 2 +- CommunityBugFixCollection/SmoothDraggables.cs | 1 + Directory.Build.props | 4 ++-- 8 files changed, 15 insertions(+), 9 deletions(-) diff --git a/CommunityBugFixCollection/BetterGridWorldPreset.cs b/CommunityBugFixCollection/BetterGridWorldPreset.cs index 7116b75..1cdf1c6 100644 --- a/CommunityBugFixCollection/BetterGridWorldPreset.cs +++ b/CommunityBugFixCollection/BetterGridWorldPreset.cs @@ -1,6 +1,7 @@ using Elements.Core; using FrooxEngine; using HarmonyLib; +using Renderite.Shared; using System; using System.Collections.Generic; using System.Text; diff --git a/CommunityBugFixCollection/CaseInsensitiveCustomGenerics.cs b/CommunityBugFixCollection/CaseInsensitiveCustomGenerics.cs index e541a63..3313376 100644 --- a/CommunityBugFixCollection/CaseInsensitiveCustomGenerics.cs +++ b/CommunityBugFixCollection/CaseInsensitiveCustomGenerics.cs @@ -26,7 +26,7 @@ protected override bool OnLoaded() if (!Enabled) return true; - if (Mod.Loader.Get().ById("ComponentSelectorAdditions") is not null) + if (Mod.Loader.TryGet().ById("ComponentSelectorAdditions", out _)) { Logger.Info(() => "Skipping in favor of the ComponentSelectorAdditions fix."); return false; diff --git a/CommunityBugFixCollection/CommunityBugFixCollection.csproj b/CommunityBugFixCollection/CommunityBugFixCollection.csproj index 570fdbf..e125040 100644 --- a/CommunityBugFixCollection/CommunityBugFixCollection.csproj +++ b/CommunityBugFixCollection/CommunityBugFixCollection.csproj @@ -1,6 +1,6 @@  - netstandard2.0 + net9.0 CommunityBugFixCollection $(AssemblyTitle).dll CommunityBugFixCollection @@ -30,7 +30,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -40,14 +40,16 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + - + - + + + diff --git a/CommunityBugFixCollection/GammaCorrectedColorXLuminance.cs b/CommunityBugFixCollection/GammaCorrectedColorXLuminance.cs index 71d8bc5..4e2e643 100644 --- a/CommunityBugFixCollection/GammaCorrectedColorXLuminance.cs +++ b/CommunityBugFixCollection/GammaCorrectedColorXLuminance.cs @@ -1,5 +1,6 @@ using Elements.Core; using HarmonyLib; +using Renderite.Shared; using System; using System.Collections.Generic; using System.Text; diff --git a/CommunityBugFixCollection/NoLossOfColorProfile.cs b/CommunityBugFixCollection/NoLossOfColorProfile.cs index a83cf87..fd77579 100644 --- a/CommunityBugFixCollection/NoLossOfColorProfile.cs +++ b/CommunityBugFixCollection/NoLossOfColorProfile.cs @@ -1,5 +1,6 @@ using Elements.Core; using HarmonyLib; +using Renderite.Shared; using System; using System.Collections.Generic; using System.Linq; diff --git a/CommunityBugFixCollection/NonLinearColorXFromHexCode.cs b/CommunityBugFixCollection/NonLinearColorXFromHexCode.cs index c97a13d..2ec24d0 100644 --- a/CommunityBugFixCollection/NonLinearColorXFromHexCode.cs +++ b/CommunityBugFixCollection/NonLinearColorXFromHexCode.cs @@ -1,6 +1,6 @@ using Elements.Core; using HarmonyLib; -using MonkeyLoader.Resonite; +using Renderite.Shared; using System; using System.Collections.Generic; using System.Text; diff --git a/CommunityBugFixCollection/SmoothDraggables.cs b/CommunityBugFixCollection/SmoothDraggables.cs index 3979d3b..453b402 100644 --- a/CommunityBugFixCollection/SmoothDraggables.cs +++ b/CommunityBugFixCollection/SmoothDraggables.cs @@ -1,5 +1,6 @@ using FrooxEngine; using HarmonyLib; +using Renderite.Shared; using System; using System.Collections.Generic; using System.Text; diff --git a/Directory.Build.props b/Directory.Build.props index 55ce0c4..4bd838a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ Library - net462 + net9.0 $(AssemblyTitle).dll 12.0 enable @@ -39,7 +39,7 @@ C:\Program Files (x86)\Steam\steamapps\common\Resonite $(HOME)/.steam/steam/steamapps/common/Resonite D:/Files/Games/Resonite/app - D:\SteamLibrary\\steamapps\common\Resonite\ + D:\SteamLibrary\\steamapps\common\Resonite\ G:\SteamLibrary\steamapps\common\Resonite From db83c71c3a3259e68e44e2d64ab84f6cfc4e044d Mon Sep 17 00:00:00 2001 From: Arne Kiesewetter Date: Thu, 10 Jul 2025 22:54:23 +0200 Subject: [PATCH 2/4] Tweaking for splittening --- .../CaseInsensitiveCustomGenerics.cs | 2 ++ .../ConstantNodeNameAdjustments.cs | 2 ++ .../Properties/launchSettings.json | 19 +++++++++++++++++++ Directory.Build.props | 10 +++++++--- 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 CommunityBugFixCollection/Properties/launchSettings.json diff --git a/CommunityBugFixCollection/CaseInsensitiveCustomGenerics.cs b/CommunityBugFixCollection/CaseInsensitiveCustomGenerics.cs index 3313376..335b45d 100644 --- a/CommunityBugFixCollection/CaseInsensitiveCustomGenerics.cs +++ b/CommunityBugFixCollection/CaseInsensitiveCustomGenerics.cs @@ -23,6 +23,8 @@ internal sealed class CaseInsensitiveCustomGenerics : Monkey false; + protected override bool OnEngineReady() => base.OnEngineReady(); + [HarmonyPostfix] [HarmonyPatch(typeof(Backspace))] private static string BackspaceNamePostfix(string __result) diff --git a/CommunityBugFixCollection/Properties/launchSettings.json b/CommunityBugFixCollection/Properties/launchSettings.json new file mode 100644 index 0000000..7e705cb --- /dev/null +++ b/CommunityBugFixCollection/Properties/launchSettings.json @@ -0,0 +1,19 @@ +{ + "profiles": { + "MonkeyLoader.Resonite.Integration": { + "commandName": "Project" + }, + "Resonite": { + "commandName": "Executable", + "executablePath": "$(ResonitePath)/Resonite.exe", + "commandLineArgs": "-donotautoloadhome", + "workingDirectory": "$(ResonitePath)" + }, + "Resonite (Override Cache)": { + "commandName": "Executable", + "executablePath": "$(ResonitePath)/Resonite.exe", + "commandLineArgs": "-donotautoloadhome -CachePath \"$(ResoniteCachePath)\"", + "workingDirectory": "$(ResonitePath)" + } + } +} \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props index 4bd838a..1c51a82 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -36,10 +36,14 @@ $(MSBuildThisFileDirectory)Resonite - C:\Program Files (x86)\Steam\steamapps\common\Resonite + C:/Program Files (x86)/Steam/steamapps/common/Resonite $(HOME)/.steam/steam/steamapps/common/Resonite D:/Files/Games/Resonite/app - D:\SteamLibrary\\steamapps\common\Resonite\ - G:\SteamLibrary\steamapps\common\Resonite + D:/SteamLibrary//steamapps/common/Resonite + G:/SteamLibrary\steamapps\common\Resonite + + + + S:/Resonite/ From 523a20406bde46aa2d91cde7d43de8bba0074570 Mon Sep 17 00:00:00 2001 From: Arne Kiesewetter Date: Fri, 22 Aug 2025 21:48:07 +0200 Subject: [PATCH 3/4] Update dependencies --- .../CommunityBugFixCollection.csproj | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/CommunityBugFixCollection/CommunityBugFixCollection.csproj b/CommunityBugFixCollection/CommunityBugFixCollection.csproj index e125040..d817a27 100644 --- a/CommunityBugFixCollection/CommunityBugFixCollection.csproj +++ b/CommunityBugFixCollection/CommunityBugFixCollection.csproj @@ -34,22 +34,21 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - - - - - + + + + + - From 5d2ca4b3a83af33468d7dac942df5d72b35bcdee Mon Sep 17 00:00:00 2001 From: Arne Kiesewetter Date: Fri, 22 Aug 2025 21:50:23 +0200 Subject: [PATCH 4/4] =?UTF-8?q?Remove=20CorrectByteCasting=20Fixed=20by=20?= =?UTF-8?q?the=20Splittening=E2=84=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CorrectByteCasting.cs | 45 ------------------- CommunityBugFixCollection/Locale/de.json | 1 - CommunityBugFixCollection/Locale/en.json | 1 - CommunityBugFixCollection/Locale/ja.json | 3 +- README.md | 3 +- 5 files changed, 3 insertions(+), 50 deletions(-) delete mode 100644 CommunityBugFixCollection/CorrectByteCasting.cs diff --git a/CommunityBugFixCollection/CorrectByteCasting.cs b/CommunityBugFixCollection/CorrectByteCasting.cs deleted file mode 100644 index b9d33a1..0000000 --- a/CommunityBugFixCollection/CorrectByteCasting.cs +++ /dev/null @@ -1,45 +0,0 @@ -using HarmonyLib; -using ProtoFlux.Core; -using ProtoFlux.Runtimes.Execution; -using ProtoFlux.Runtimes.Execution.Nodes.Casts; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Text; - -namespace CommunityBugFixCollection -{ - internal sealed class CorrectByteCasting : ResoniteBugFixMonkey - { - public override IEnumerable Authors => Contributors.Banane9; - - protected override bool OnEngineReady() - { - var targets = AccessTools.GetTypesFromAssembly(typeof(Cast_byte_To_int).Assembly) - .Select(type => (Type: type, ValueCast: type.GetCustomAttribute())) - .Where(candidate => candidate.ValueCast?.From == typeof(byte)) - .Select(candidate => (candidate.ValueCast, Method: AccessTools.DeclaredMethod(candidate.Type, nameof(Cast_byte_To_int.Compute)))) - .Where(target => target.Method is not null); - - var computePrefix = AccessTools.DeclaredMethod(typeof(CorrectByteCasting), nameof(ComputePrefix)); - - foreach (var target in targets) - Harmony.Patch(target.Method, computePrefix.MakeGenericMethod(target.ValueCast.To)); - - return true; - } - - private static bool ComputePrefix(ExecutionContext context, ref T __result) - where T : unmanaged - { - if (!Enabled) - return true; - - var value = (object)0.ReadValue(context); - __result = (T)(Convert.ChangeType(value, typeof(T)) ?? default(T)); - - return false; - } - } -} \ No newline at end of file diff --git a/CommunityBugFixCollection/Locale/de.json b/CommunityBugFixCollection/Locale/de.json index be28b1d..e31e69b 100644 --- a/CommunityBugFixCollection/Locale/de.json +++ b/CommunityBugFixCollection/Locale/de.json @@ -19,7 +19,6 @@ "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.", "CommunityBugFixCollection.CorrectOverriddenSpelling.Description": "Korrigiert die Schreibweise von Overridden auf ProtoFlux Nodes.", "CommunityBugFixCollection.DuplicateAndMoveMultipleGrabbedItems.Description": "Verhindert, dass Referenzen zwischen mehreren duplizierten oder zwischen Welten transferierten Objekten gebrochen werden.", diff --git a/CommunityBugFixCollection/Locale/en.json b/CommunityBugFixCollection/Locale/en.json index f2bb34e..44aa892 100644 --- a/CommunityBugFixCollection/Locale/en.json +++ b/CommunityBugFixCollection/Locale/en.json @@ -24,7 +24,6 @@ "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.", "CommunityBugFixCollection.CorrectOverriddenSpelling.Description": "Corrects the spelling of Overridden on ProtoFlux nodes.", "CommunityBugFixCollection.DuplicateAndMoveMultipleGrabbedItems.Description": "Fixes references between multiple duplicated or transferred-between-worlds items breaking.", diff --git a/CommunityBugFixCollection/Locale/ja.json b/CommunityBugFixCollection/Locale/ja.json index 868cad3..afa880d 100644 --- a/CommunityBugFixCollection/Locale/ja.json +++ b/CommunityBugFixCollection/Locale/ja.json @@ -21,7 +21,6 @@ "CommunityBugFixCollection.ConstantNodeNameAdjustments.Name": "(削除予定) ConstantNodeNameAdjustments", "CommunityBugFixCollection.ConstantNodeNameAdjustments.Description": "Issue #0177 (削除予定)
Strings > Constantsの​ProtoFlux​ノード名を​元の​修正版の​名前に​変更します。", "CommunityBugFixCollection.CopySyncMemberToClipboardAction.Description": "Issue #0810
Inspectorの​参照以外の​メンバー​フィールドに​クリップボードに​コピー​アクションを​追加します。", - "CommunityBugFixCollection.CorrectByteCasting.Description": "Issue #2257
ProtoFluxで​byte型から​他の​値への​型変換が​正しく​動作しない​問題を​修正します。", "CommunityBugFixCollection.CorrectMaterialGizmoScaling.Description": "Issue #0528
Material Toolで​Editを​使用する​際に​MaterialGizmoが​二重に​縮尺変更される​問題を​修正します。", "CommunityBugFixCollection.CorrectOverriddenSpelling.Description": "Issue #1157
ProtoFluxノードの「Overridden」のスペルを修正します。", "CommunityBugFixCollection.DuplicateAndMoveMultipleGrabbedItems.Description": "Issue #0984
複数の​アイテムを​複製または​ワールド間で​転送する​際に、​アイテム間の​参照が​壊れる​問題を​修正します。", @@ -70,4 +69,4 @@ "CommunityBugFixCollection.StorageUnits.TB": "TB", "CommunityBugFixCollection.StorageUnits.PB": "PB" } -} +} \ No newline at end of file diff --git a/README.md b/README.md index 8037385..7a54b4f 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,6 @@ just disable them in the settings in the meantime. * https://github.com/Yellow-Dog-Man/Locale/issues/186 * FlipAtUser component does not respect view position (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/1335) * ColorX From HexCode (ProtoFlux node) defaults to Linear profile (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/1404) -* ProtoFlux value casts from byte to other values converting incorrectly (mono / graphical client only) (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/2257) * Resolution scale may get stuck at 0.5 when opening and closing the SteamVR dashboard while the game is hitching (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/2337) * `ValueMod` node crashes the game when B input is set to zero or disconnected. (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/2746) * Grid World grid being off-center (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/2754) @@ -102,4 +101,6 @@ but the exact implementation is inconsequential. * 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) +* ProtoFlux value casts from byte to other values converting incorrectly (mono / graphical client only) (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/2257) + * Fixed by the Splittening * Direct cursor size becoming very large when snapped to an object much closer than the true cursor (https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/3654) \ No newline at end of file