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..335b45d 100644 --- a/CommunityBugFixCollection/CaseInsensitiveCustomGenerics.cs +++ b/CommunityBugFixCollection/CaseInsensitiveCustomGenerics.cs @@ -23,10 +23,12 @@ internal sealed class CaseInsensitiveCustomGenerics : Monkey().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..d817a27 100644 --- a/CommunityBugFixCollection/CommunityBugFixCollection.csproj +++ b/CommunityBugFixCollection/CommunityBugFixCollection.csproj @@ -1,6 +1,6 @@  - netstandard2.0 + net9.0 CommunityBugFixCollection $(AssemblyTitle).dll CommunityBugFixCollection @@ -30,23 +30,24 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - - - - - + + + + + + diff --git a/CommunityBugFixCollection/ConstantNodeNameAdjustments.cs b/CommunityBugFixCollection/ConstantNodeNameAdjustments.cs index ee7361c..d2a7704 100644 --- a/CommunityBugFixCollection/ConstantNodeNameAdjustments.cs +++ b/CommunityBugFixCollection/ConstantNodeNameAdjustments.cs @@ -16,6 +16,8 @@ internal sealed class ConstantNodeNameAdjustments : ResoniteBugFixMonkey false; + protected override bool OnEngineReady() => base.OnEngineReady(); + [HarmonyPostfix] [HarmonyPatch(typeof(Backspace))] private static string BackspaceNamePostfix(string __result) 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/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/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/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/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/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..1c51a82 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ Library - net462 + net9.0 $(AssemblyTitle).dll 12.0 enable @@ -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/ 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