From b6a8dcdd46dbc2875b24e0f77049c61a5cf398d9 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 29 Mar 2022 18:59:05 -0400 Subject: update to Harmony 2.2.1 --- build/0Harmony.dll | Bin 167424 -> 238592 bytes build/0Harmony.xml | 594 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 567 insertions(+), 27 deletions(-) (limited to 'build') diff --git a/build/0Harmony.dll b/build/0Harmony.dll index 91d36ea2..492255be 100644 Binary files a/build/0Harmony.dll and b/build/0Harmony.dll differ diff --git a/build/0Harmony.xml b/build/0Harmony.xml index ba2f340e..8499d20b 100644 --- a/build/0Harmony.xml +++ b/build/0Harmony.xml @@ -265,6 +265,9 @@ This is a static constructor + + This targets the MoveNext method of the enumerator result + Specifies the type of argument @@ -475,6 +478,13 @@ An array of argument types to target overloads An array of + + + An annotation that specifies a method, property or constructor to patch + The full name of the declaring class/type + The name of the method, property or constructor to patch + The + Annotation to define the original method for delegate injection @@ -796,6 +806,13 @@ The lambda expression using the method + + + Returns an instruction to call the specified closure + The delegate type to emit + The closure that defines the method to call + A that calls the closure as a method + Creates a CodeInstruction loading a field (LD[S]FLD[A]) @@ -980,6 +997,11 @@ For normal frames, frame.GetMethod() is returned. For frames containing patched methods, the replacement method is returned or null if no method can be found + + Gets the original method from the stackframe and uses original if method is a dynamic replacement + The + The original method from that stackframe + Gets Harmony version for all active Harmony instances [out] The current Harmony version @@ -1210,7 +1232,7 @@ - Patch serialization + Patch serialization @@ -1241,27 +1263,27 @@ - Serializable patch information + Serializable patch information - Prefixes as an array of + Prefixes as an array of - Postfixes as an array of + Postfixes as an array of - Transpilers as an array of + Transpilers as an array of - Finalizers as an array of + Finalizers as an array of - Returns if any of the patches wants debugging turned on + Returns if any of the patches wants debugging turned on @@ -1339,35 +1361,35 @@ - A serializable patch + A serializable patch - Zero-based index + Zero-based index - The owner (Harmony ID) + The owner (Harmony ID) - The priority, see + The priority, see - Keep this patch before the patches indicated in the list of Harmony IDs + Keep this patch before the patches indicated in the list of Harmony IDs - Keep this patch after the patches indicated in the list of Harmony IDs + Keep this patch after the patches indicated in the list of Harmony IDs - A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future - The method of the static patch method + The method of the static patch method @@ -1760,6 +1782,12 @@ The name of the field A field or null when type/name is null or when the field cannot be found + + + Gets the reflection information for a directly declared field + The member in the form TypeFullName:MemberName, where TypeFullName matches the form recognized by Type.GetType like Some.Namespace.Type. + A field or null when the field cannot be found + Gets the reflection information for a field by searching the type and all its super types @@ -1767,6 +1795,12 @@ The name of the field (case sensitive) A field or null when type/name is null or when the field cannot be found + + + Gets the reflection information for a field by searching the type and all its super types + The member in the form TypeFullName:MemberName, where TypeFullName matches the form recognized by Type.GetType like Some.Namespace.Type. + A field or null when the field cannot be found + Gets the reflection information for a field @@ -1781,6 +1815,12 @@ The name of the property (case sensitive) A property or null when type/name is null or when the property cannot be found + + + Gets the reflection information for a directly declared property + The member in the form TypeFullName:MemberName, where TypeFullName matches the form recognized by Type.GetType like Some.Namespace.Type. + A property or null when the property cannot be found + Gets the reflection information for the getter method of a directly declared property @@ -1788,6 +1828,12 @@ The name of the property (case sensitive) A method or null when type/name is null or when the property cannot be found + + + Gets the reflection information for the getter method of a directly declared property + The member in the form TypeFullName:MemberName, where TypeFullName matches the form recognized by Type.GetType like Some.Namespace.Type. + A method or null when the property cannot be found + Gets the reflection information for the setter method of a directly declared property @@ -1795,6 +1841,12 @@ The name of the property (case sensitive) A method or null when type/name is null or when the property cannot be found + + + Gets the reflection information for the Setter method of a directly declared property + The member in the form TypeFullName:MemberName, where TypeFullName matches the form recognized by Type.GetType like Some.Namespace.Type. + A method or null when the property cannot be found + Gets the reflection information for a property by searching the type and all its super types @@ -1802,6 +1854,12 @@ The name A property or null when type/name is null or when the property cannot be found + + + Gets the reflection information for a property by searching the type and all its super types + The member in the form TypeFullName:MemberName, where TypeFullName matches the form recognized by Type.GetType like Some.Namespace.Type. + A property or null when the property cannot be found + Gets the reflection information for the getter method of a property by searching the type and all its super types @@ -1809,6 +1867,12 @@ The name A method or null when type/name is null or when the property cannot be found + + + Gets the reflection information for the getter method of a property by searching the type and all its super types + The member in the form TypeFullName:MemberName, where TypeFullName matches the form recognized by Type.GetType like Some.Namespace.Type. + A method or null when type/name is null or when the property cannot be found + Gets the reflection information for the setter method of a property by searching the type and all its super types @@ -1816,6 +1880,12 @@ The name A method or null when type/name is null or when the property cannot be found + + + Gets the reflection information for the setter method of a property by searching the type and all its super types + The member in the form TypeFullName:MemberName, where TypeFullName matches the form recognized by Type.GetType like Some.Namespace.Type. + A method or null when type/name is null or when the property cannot be found + Gets the reflection information for a directly declared method @@ -1825,6 +1895,14 @@ Optional list of types that define the generic version of the method A method or null when type/name is null or when the method cannot be found + + + Gets the reflection information for a directly declared method + The member in the form TypeFullName:MemberName, where TypeFullName matches the form recognized by Type.GetType like Some.Namespace.Type. + Optional parameters to target a specific overload of the method + Optional list of types that define the generic version of the method + A method or null when the method cannot be found + Gets the reflection information for a method by searching the type and all its super types @@ -1837,12 +1915,17 @@ Gets the reflection information for a method by searching the type and all its super types - The target method in the form TypeFullName:MethodName, where the type name matches a form recognized by Type.GetType like Some.Namespace.Type. + The member in the form TypeFullName:MemberName, where TypeFullName matches the form recognized by Type.GetType like Some.Namespace.Type. Optional parameters to target a specific overload of the method Optional list of types that define the generic version of the method - A method or null when type/name is null or when the method cannot be found + A method or null when the method cannot be found + + Gets the method of an enumerator method + Enumerator method that creates the enumerator + The internal method of the enumerator or null if no valid enumerator is detected + Gets the names of all method that are declared in a type The declaring class/type @@ -2109,6 +2192,12 @@ + + Creates a field reference delegate for an instance field of a class or static field (NOT an instance field of a struct) + type of the field + The member in the form TypeFullName:MemberName, where TypeFullName matches the form recognized by Type.GetType like Some.Namespace.Type. + A readable/assignable delegate with T=object + Creates a field reference delegate for an instance field of a class or static field (NOT an instance field of a struct) @@ -2281,6 +2370,13 @@ The name of the field A readable/assignable reference to the field + + + Creates a static field reference + The type of the field + The member in the form TypeFullName:MemberName, where TypeFullName matches the form recognized by Type.GetType like Some.Namespace.Type. + A readable/assignable reference to the field + Creates a static field reference @@ -2336,6 +2432,34 @@ + + + Creates a delegate to a given method + The delegate Type + The method in the form TypeFullName:MemberName, where TypeFullName matches the form recognized by Type.GetType like Some.Namespace.Type. + + Only applies for instance methods. If null (default), returned delegate is an open (a.k.a. unbound) instance delegate + where an instance is supplied as the first argument to the delegate invocation; else, delegate is a closed (a.k.a. bound) + instance delegate where the delegate invocation always applies to the given . + + + Only applies for instance methods. If true (default) and is virtual, invocation of the delegate + calls the instance method virtually (the instance type's most-derived/overriden implementation of the method is called); + else, invocation of the delegate calls the exact specified (this is useful for calling base class methods) + Note: if false and is an interface method, an ArgumentException is thrown. + + A delegate of given to given + + + Delegate invocation is more performant and more convenient to use than + at a one-time setup cost. + + + Works for both type of static and instance methods, both open and closed (a.k.a. unbound and bound) instance methods, + and both class and struct methods. + + + Creates a delegate for a given delegate definition, attributed with [] @@ -2508,6 +2632,412 @@ The objects The hash code + + + A CodeInstruction match + + + The name of the match + + + The matched opcodes + + + The matched operands + + + The jumps from the match + + + The jumps to the match + + + The match predicate + + + Creates a code match + The optional opcode + The optional operand + The optional name + + + + Creates a code match + The CodeInstruction + An optional name + + + + Creates a code match + The predicate + An optional name + + + + Returns a string that represents the match + A string representation + + + + A CodeInstruction matcher + + + The current position + The index or -1 if out of bounds + + + + Gets the number of code instructions in this matcher + The count + + + + Checks whether the position of this CodeMatcher is within bounds + True if this CodeMatcher is valid + + + + Checks whether the position of this CodeMatcher is outside its bounds + True if this CodeMatcher is invalid + + + + Gets the remaining code instructions + The remaining count + + + + Gets the opcode at the current position + The opcode + + + + Gets the operand at the current position + The operand + + + + Gets the labels at the current position + The labels + + + + Gets the exception blocks at the current position + The blocks + + + + Creates an empty code matcher + + + Creates a code matcher from an enumeration of instructions + The instructions (transpiler argument) + An optional IL generator + + + + Makes a clone of this instruction matcher + A copy of this matcher + + + + Gets instructions at the current position + The instruction + + + + Gets instructions at the current position with offset + The offset + The instruction + + + + Gets all instructions + A list of instructions + + + + Gets all instructions as an enumeration + A list of instructions + + + + Gets some instructions counting from current position + Number of instructions + A list of instructions + + + + Gets all instructions within a range + The start index + The end index + A list of instructions + + + + Gets all instructions within a range (relative to current position) + The start offset + The end offset + A list of instructions + + + + Gets a list of all distinct labels + The instructions (transpiler argument) + A list of Labels + + + + Reports a failure + The method involved + The logger + True if current position is invalid and error was logged + + + + Throw an InvalidOperationException if current state is invalid (position out of bounds / last match failed) + Explanation of where/why the exception was thrown that will be added to the exception message + The same code matcher + + + + Throw an InvalidOperationException if current state is invalid (position out of bounds / last match failed), + or if the matches do not match at current position + Explanation of where/why the exception was thrown that will be added to the exception message + Some code matches + The same code matcher + + + + Throw an InvalidOperationException if current state is invalid (position out of bounds / last match failed), + or if the matches do not match at any point between current position and the end + Explanation of where/why the exception was thrown that will be added to the exception message + Some code matches + The same code matcher + + + + Throw an InvalidOperationException if current state is invalid (position out of bounds / last match failed), + or if the matches do not match at any point between current position and the start + Explanation of where/why the exception was thrown that will be added to the exception message + Some code matches + The same code matcher + + + + Throw an InvalidOperationException if current state is invalid (position out of bounds / last match failed), + or if the check function returns false + Explanation of where/why the exception was thrown that will be added to the exception message + Function that checks validity of current state. If it returns false, an exception is thrown + The same code matcher + + + + Sets an instruction at current position + The instruction to set + The same code matcher + + + + Sets instruction at current position and advances + The instruction + The same code matcher + + + + Sets opcode and operand at current position + The opcode + The operand + The same code matcher + + + + Sets opcode and operand at current position and advances + The opcode + The operand + The same code matcher + + + + Sets opcode at current position and advances + The opcode + The same code matcher + + + + Sets operand at current position and advances + The operand + The same code matcher + + + + Creates a label at current position + [out] The label + The same code matcher + + + + Creates a label at a position + The position + [out] The new label + The same code matcher + + + + Creates a label at a position + The offset + [out] The new label + The same code matcher + + + + Adds an enumeration of labels to current position + The labels + The same code matcher + + + + Adds an enumeration of labels at a position + The position + The labels + The same code matcher + + + + Sets jump to + Branch instruction + Destination for the jump + [out] The created label + The same code matcher + + + + Inserts some instructions + The instructions + The same code matcher + + + + Inserts an enumeration of instructions + The instructions + The same code matcher + + + + Inserts a branch + The branch opcode + Branch destination + The same code matcher + + + + Inserts some instructions and advances the position + The instructions + The same code matcher + + + + Inserts an enumeration of instructions and advances the position + The instructions + The same code matcher + + + + Inserts a branch and advances the position + The branch opcode + Branch destination + The same code matcher + + + + Removes current instruction + The same code matcher + + + + Removes some instruction from current position by count + Number of instructions + The same code matcher + + + + Removes the instructions in a range + The start + The end + The same code matcher + + + + Removes the instructions in a offset range + The start offset + The end offset + The same code matcher + + + + Advances the current position + The offset + The same code matcher + + + + Moves the current position to the start + The same code matcher + + + + Moves the current position to the end + The same code matcher + + + + Searches forward with a predicate and advances position + The predicate + The same code matcher + + + + Searches backwards with a predicate and reverses position + The predicate + The same code matcher + + + + Matches forward and advances position to beginning of matching sequence + Some code matches + The same code matcher + + + + Matches forward and advances position to ending of matching sequence + Some code matches + The same code matcher + + + + Matches backwards and reverses position to beginning of matching sequence + Some code matches + The same code matcher + + + + Matches backwards and reverses position to ending of matching sequence + Some code matches + The same code matcher + + + + Repeats a match action until boundaries are met + The match action + An optional action that is executed when no match is found + The same code matcher + + + + Gets a match by its name + The match name + An instruction + General extensions for common cases @@ -2574,6 +3104,11 @@ Extensions for + + Returns if an is initialized and valid + The + + Shortcut for testing whether the operand is equal to a non-null value The @@ -2715,15 +3250,15 @@ A list of - Moves all labels from the code instruction to a different one + Moves all labels from the code instruction to another one The to move the labels from - The to move the labels to + The other to move the labels to The code instruction labels were moved from (now empty) - Moves all labels from a different code instruction to the current one - The to move the labels from - The to move the labels to + Moves all labels from another code instruction to the current one + The to move the labels to + The other to move the labels from The code instruction that received the labels @@ -2744,15 +3279,15 @@ A list of - Moves all ExceptionBlocks from the code instruction to a different one + Moves all ExceptionBlocks from the code instruction to another one The to move the ExceptionBlocks from - The to move the ExceptionBlocks to + The other to move the ExceptionBlocks to The code instruction blocks were moved from (now empty) - Moves all ExceptionBlocks from a different code instruction to the current one - The to move the ExceptionBlocks from - The to move the ExceptionBlocks to + Moves all ExceptionBlocks from another code instruction to the current one + The to move the ExceptionBlocks to + The other to move the ExceptionBlocks from The code instruction that received the blocks @@ -2859,6 +3394,11 @@ Log a string directly to disk. Slower method that prevents missing information in case of a crash The string to log. + + + Log a string directly to disk if Harmony.DEBUG is true. Slower method that prevents missing information in case of a crash + The string to log. + Resets and deletes the log -- cgit From 011aa4c9d07d6fc313d6d1ee107651778bb3c665 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 16 Jun 2022 22:14:09 -0400 Subject: prepare for release --- build/common.targets | 2 +- docs/release-notes.md | 6 +++--- src/SMAPI.Mods.ConsoleCommands/manifest.json | 4 ++-- src/SMAPI.Mods.ErrorHandler/manifest.json | 4 ++-- src/SMAPI.Mods.SaveBackup/manifest.json | 4 ++-- src/SMAPI/Constants.cs | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) (limited to 'build') diff --git a/build/common.targets b/build/common.targets index ca9a1d12..8b17c45a 100644 --- a/build/common.targets +++ b/build/common.targets @@ -1,7 +1,7 @@ - 3.14.7 + 3.15.0 SMAPI latest $(AssemblySearchPaths);{GAC} diff --git a/docs/release-notes.md b/docs/release-notes.md index 14658340..496d016a 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,8 +1,8 @@ ← [README](README.md) # Release notes -## Upcoming release -See [release highlights](https://www.patreon.com/posts/66986798). +## 3.15.0 +Released 17 June 2022 for Stardew Valley 1.5.6 or later. See [release highlights](https://www.patreon.com/posts/67877219). * For players: * Optimized mod image file loading. @@ -10,7 +10,7 @@ See [release highlights](https://www.patreon.com/posts/66986798). * Updated compatibility list. * For mod authors: - * Added a [new `IRawTextureData` asset type](https://stardewvalleywiki.com/Modding:Migrate_to_SMAPI_4.0#Raw_texture_data), so mods can avoid creating full `Texture2D` instances in many cases. + * Added an [`IRawTextureData` asset type](https://stardewvalleywiki.com/Modding:Migrate_to_SMAPI_4.0#Raw_texture_data), to avoid creating full `Texture2D` instances in many cases. * In `smapi-internal/config.json`, you can now enable verbose logging for specific mods (instead of all or nothing). * Updated dependencies: * Harmony 2.2.1 (see changes in [2.2.0](https://github.com/pardeike/Harmony/releases/tag/v2.2.0.0) and [2.2.1](https://github.com/pardeike/Harmony/releases/tag/v2.2.1.0)); diff --git a/src/SMAPI.Mods.ConsoleCommands/manifest.json b/src/SMAPI.Mods.ConsoleCommands/manifest.json index 564e480e..300de9d2 100644 --- a/src/SMAPI.Mods.ConsoleCommands/manifest.json +++ b/src/SMAPI.Mods.ConsoleCommands/manifest.json @@ -1,9 +1,9 @@ { "Name": "Console Commands", "Author": "SMAPI", - "Version": "3.14.7", + "Version": "3.15.0", "Description": "Adds SMAPI console commands that let you manipulate the game.", "UniqueID": "SMAPI.ConsoleCommands", "EntryDll": "ConsoleCommands.dll", - "MinimumApiVersion": "3.14.7" + "MinimumApiVersion": "3.15.0" } diff --git a/src/SMAPI.Mods.ErrorHandler/manifest.json b/src/SMAPI.Mods.ErrorHandler/manifest.json index 39d22b5f..15a1e0f3 100644 --- a/src/SMAPI.Mods.ErrorHandler/manifest.json +++ b/src/SMAPI.Mods.ErrorHandler/manifest.json @@ -1,9 +1,9 @@ { "Name": "Error Handler", "Author": "SMAPI", - "Version": "3.14.7", + "Version": "3.15.0", "Description": "Handles some common vanilla errors to log more useful info or avoid breaking the game.", "UniqueID": "SMAPI.ErrorHandler", "EntryDll": "ErrorHandler.dll", - "MinimumApiVersion": "3.14.7" + "MinimumApiVersion": "3.15.0" } diff --git a/src/SMAPI.Mods.SaveBackup/manifest.json b/src/SMAPI.Mods.SaveBackup/manifest.json index 8eaf2475..1a11742c 100644 --- a/src/SMAPI.Mods.SaveBackup/manifest.json +++ b/src/SMAPI.Mods.SaveBackup/manifest.json @@ -1,9 +1,9 @@ { "Name": "Save Backup", "Author": "SMAPI", - "Version": "3.14.7", + "Version": "3.15.0", "Description": "Automatically backs up all your saves once per day into its folder.", "UniqueID": "SMAPI.SaveBackup", "EntryDll": "SaveBackup.dll", - "MinimumApiVersion": "3.14.7" + "MinimumApiVersion": "3.15.0" } diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs index c63324e3..db88563e 100644 --- a/src/SMAPI/Constants.cs +++ b/src/SMAPI/Constants.cs @@ -50,7 +50,7 @@ namespace StardewModdingAPI internal static int? LogScreenId { get; set; } /// SMAPI's current raw semantic version. - internal static string RawApiVersion = "3.14.7"; + internal static string RawApiVersion = "3.15.0"; } /// Contains SMAPI's constants and assumptions. -- cgit