diff --git a/build/0Harmony.dll b/build/0Harmony.dll index 72ca2b61..977aca20 100644 Binary files a/build/0Harmony.dll and b/build/0Harmony.dll differ diff --git a/build/0Harmony.pdb b/build/0Harmony.pdb new file mode 100644 index 00000000..29aae185 Binary files /dev/null and b/build/0Harmony.pdb differ diff --git a/build/0Harmony.xml b/build/0Harmony.xml index f1b9b4cf..cddd3566 100644 --- a/build/0Harmony.xml +++ b/build/0Harmony.xml @@ -130,121 +130,65 @@ - - A low level memory helper + + Delegate type for "ref return" injections + Return type of the original method, without ref modifier + + + + A mutable representation of an inline signature, similar to Mono.Cecil's CallSite. + Used by the calli instruction, can be used by transpilers + - - Mark method for no inlining (currently only works on Mono) - The method/constructor to change + + See - - Detours a method - The original method/constructor - The replacement method/constructor - An error string + + See - - Writes a jump to memory - The memory address - Jump destination - An error string + + See - - Gets the start of a method in memory - The method/constructor - [out] Details of the exception - The method start address + + The list of all parameter types or function pointer signatures received by the call site - - special parameter names that can be used in prefix and postfix methods - - - Patch function helpers - - - Sorts patch methods by their priority rules - The original method - Patches to sort - Use debug mode - The sorted patch methods + + The return type or function pointer signature returned by the call site - - Creates new replacement method with the latest patches and detours the original method - The original method - Information describing the patches - The newly created replacement method + + Returns a string representation of the inline signature + A string representation of the inline signature - - Creates a patch sorter - Array of patches that will be sorted - Use debugging + + + A mutable representation of a parameter type with an attached type modifier, + similar to Mono.Cecil's OptionalModifierType / RequiredModifierType and C#'s modopt / modreq + + - - Sorts internal PatchSortingWrapper collection and caches the results. - After first run the result is provided from the cache. - The original method - The sorted patch methods + + Whether this is a modopt (optional modifier type) or a modreq (required modifier type) + - - Checks if the sorter was created with the same patch list and as a result can be reused to - get the sorted order of the patches. - List of patches to check against - true if equal + + The modifier type attached to the parameter type + - - Removes one unresolved dependency from the least important patch. + + The modified parameter type + - - Outputs all unblocked patches from the waiting list to results list - - - Adds patch to both results list and handled patches set - Patch to add - - - Wrapper used over the Patch object to allow faster dependency access and - dependency removal in case of cyclic dependencies - - - Create patch wrapper object used for sorting - Patch to wrap - - - Determines how patches sort - The other patch - integer to define sort order (-1, 0, 1) - - - Determines whether patches are equal - The other patch - true if equal - - - Hash function - A hash code - - - Bidirectionally registers Patches as after dependencies - List of dependencies to register - - - Bidirectionally registers Patches as before dependencies - List of dependencies to register - - - Bidirectionally removes Patch from after dependencies - Patch to remove - - - Bidirectionally removes Patch from before dependencies - Patch to remove + + Returns a string representation of the modifier type + A string representation of the modifier type + Specifies the type of method @@ -266,7 +210,100 @@ This is a static constructor - This targets the MoveNext method of the enumerator result + This targets the MoveNext method of the enumerator result, that actually contains the method's implementation + + + This targets the MoveNext method of the async state machine, that actually contains the method's implementation + + + Finalize + + + This is a add event method + + + This is a remove event method + + + This is a op_Implicit + + + This is a op_Explicit + + + This is a op_UnaryPlus + + + This is a op_UnaryNegation + + + This is a op_LogicalNot + + + This is a op_OnesComplement + + + This is a op_Increment + + + This is a op_Decrement + + + This is a op_True + + + This is a op_False + + + This is a op_Addition + + + This is a op_Subtraction + + + This is a op_Multiply + + + This is a op_Division + + + This is a op_Modulus + + + This is a op_BitwiseAnd + + + This is a op_BitwiseOr + + + This is a op_ExclusiveOr + + + This is a op_LeftShift + + + This is a op_RightShift + + + This is a op_Equality + + + This is a op_Inequality + + + This is a op_GreaterThan + + + This is a op_LessThan + + + This is a op_GreaterThanOrEqual + + + This is a op_LessThanOrEqual + + + This is a op_Comma Specifies the type of argument @@ -306,6 +343,12 @@ A reverse patch + + An inner prefix patch + + + An inner postfix patch + Specifies the type of reverse patch @@ -358,6 +401,15 @@ The common information for all attributes + + Annotation to define a category for use with PatchCategory + + + + Annotation specifying the category + Name of patch category + + Annotation to define your Harmony patch methods @@ -786,25 +838,25 @@ Creates a CodeInstruction calling a method (CALL) The lambda expression using the method - + A new Codeinstruction Creates a CodeInstruction calling a method (CALL) The lambda expression using the method - + A new Codeinstruction Creates a CodeInstruction calling a method (CALL) The lambda expression using the method - + A new Codeinstruction Creates a CodeInstruction calling a method (CALL) The lambda expression using the method - + A new Codeinstruction @@ -819,13 +871,45 @@ The class/type where the field is defined The name of the field (case sensitive) Use address of field - + A new Codeinstruction Creates a CodeInstruction storing to a field (ST[S]FLD) The class/type where the field is defined The name of the field (case sensitive) - + A new Codeinstruction + + + Creates a CodeInstruction loading a local with the given index, using the shorter forms when possible + The index where the local is stored + Use address of local + A new Codeinstruction + + + + Creates a CodeInstruction storing to a local with the given index, using the shorter forms when possible + The index where the local is stored + A new Codeinstruction + + + + Creates a CodeInstruction loading an argument with the given index, using the shorter forms when possible + The index of the argument + Use address of argument + A new Codeinstruction + + + + Creates a CodeInstruction storing to an argument with the given index, using the shorter forms when possible + The index of the argument + A new Codeinstruction + + + + Checks if a CodeInstruction contains a given exception block type + Type of the exception block to check for + True if the instruction contains the exception block type, false otherwise + Returns a string representation of the code instruction @@ -861,7 +945,7 @@ - An exception block + An exception block @@ -873,22 +957,22 @@ - Creates an exception block + Creates a new ExceptionBlock The The catch type - The Harmony instance is the main entry to Harmony. After creating one with an unique identifier, it is used to patch and query the current application domain + The Harmony instance is the main entry to Harmony. After creating one with an unique identifier, it is used to patch and query the current application domain - The unique identifier + The unique identifier - Set to true before instantiating Harmony to debug Harmony or use an environment variable to set HARMONY_DEBUG to '1' like this: cmd /C "set HARMONY_DEBUG=1 && game.exe" - This is for full debugging. To debug only specific patches, use the attribute + Set to true before instantiating Harmony to debug Harmony or use an environment variable to set HARMONY_DEBUG to '1' like this: cmd /C "set HARMONY_DEBUG=1 && game.exe" + This is for full debugging. To debug only specific patches, use the attribute @@ -898,8 +982,8 @@ - Searches the current assembly for Harmony annotations and uses them to create patches - This method can fail to use the correct assembly when being inlined. It calls StackTrace.GetFrame(1) which can point to the wrong method/assembly. If you are unsure or run into problems, use PatchAll(Assembly.GetExecutingAssembly()) instead. + Searches the current assembly for Harmony annotations and uses them to create patches + This method can fail to use the correct assembly when being inlined. It calls StackTrace.GetFrame(1) which can point to the wrong method/assembly. If you are unsure or run into problems, use PatchAll(Assembly.GetExecutingAssembly()) instead. @@ -909,9 +993,9 @@ - Creates a patch class processor from an annotated class - The class/type - A new instance + Creates a patch class processor from a class + The class/type + A new instance @@ -922,8 +1006,28 @@ - Searches an assembly for Harmony annotations and uses them to create patches - The assembly + Searches an assembly for HarmonyPatch-annotated classes/structs and uses them to create patches + The assembly + + + + Searches an assembly for HarmonyPatch-annotated classes/structs without category annotations and uses them to create patches + + + + Searches an assembly for HarmonyPatch-annotated classes/structs without category annotations and uses them to create patches + The assembly + + + + Searches the current assembly for Harmony annotations with a specific category and uses them to create patches + Name of patch category + + + + Searches an assembly for HarmonyPatch-annotated classes/structs with a specific category and uses them to create patches + The assembly + Name of patch category @@ -937,11 +1041,11 @@ - Patches a foreign method onto a stub method of yours and optionally applies transpilers during the process - The original method/constructor you want to duplicate - Your stub method as that will become the original. Needs to have the correct signature (either original or whatever your transpilers generates) - An optional transpiler as method that will be applied during the process - The replacement method that was created to patch the stub method + Patches a foreign method onto a stub method of yours and optionally applies transpilers during the process + The original method/constructor you want to duplicate + Your stub method as that will become the original. Needs to have the correct signature (either original or whatever your transpilers generates) + An optional transpiler as method that will be applied during the process + The replacement method that was created to patch the stub method @@ -962,6 +1066,17 @@ The original method/constructor The patch method as method to remove + + + Searches the current assembly for types with a specific category annotation and uses them to unpatch existing patches. Fully unpatching is not supported. Be careful, unpatching is global + Name of patch category + + + + Searches an assembly for HarmonyPatch-annotated classes/structs with a specific category annotation and uses them to unpatch existing patches. Fully unpatching is not supported. Be careful, unpatching is global + The assembly + Name of patch category + Test for patches from a specific Harmony ID @@ -987,7 +1102,7 @@ Gets the original method from a given replacement method - A replacement method, for example from a stacktrace + A replacement method (patched original method) The original method/constructor or null if not found @@ -1008,14 +1123,33 @@ A dictionary containing assembly versions keyed by Harmony IDs - - Under Mono, HarmonyException wraps IL compile errors with detailed information about the failure + + Sets a MonoMod switch value (e.g., "DMDDebug", "DMDDumpTo") + The switch name + The value to set (bool, string, etc.) - - Default serialization constructor (not implemented) - The info - The context + + Clears a MonoMod switch value + The switch name + + + + Tries to get a MonoMod switch value + The switch name + The switch value if found + True if the switch was found, false otherwise + + + + Tries to determine if a MonoMod switch is enabled + The switch name + True if the switch is enabled, false otherwise + True if the switch enablement state could be determined, false otherwise + + + + Under Mono, HarmonyException wraps IL compile errors with detailed information about the failure @@ -1045,6 +1179,10 @@ The original method + + + Patch Category + Class/type declaring this patch @@ -1095,6 +1233,11 @@ Creates a patch from a given method The original method + + + Creates a patch from a given method + The original method + Creates a patch from a given method @@ -1104,6 +1247,15 @@ A list of harmony IDs that should come before this patch Set to true to generate debug output + + + Creates a patch from a given method + The original method + The patch + A list of harmony IDs that should come after this patch + A list of harmony IDs that should come before this patch + Set to true to generate debug output + Creates a patch from a given method @@ -1127,6 +1279,16 @@ Returns a string that represents the annotation A string representation + + + Creates a patch from a given method + The original method + + + + Creates a patch from a given method + The original method + Annotation extensions @@ -1175,189 +1337,22 @@ The merged - - - A mutable representation of an inline signature, similar to Mono.Cecil's CallSite. - Used by the calli instruction, can be used by transpilers - + + Occcurances of a method that is called inside some outer method - - See + + Which occcurances (1-based) of the method, negative numbers are counting from the end, empty array means all occurances - - See + + Creates an InnerMethod + The inner method + Which occcurances (1-based) of the method, negative numbers are counting from the end, empty array means all occurances - - See - - - - The list of all parameter types or function pointer signatures received by the call site - - - - The return type or function pointer signature returned by the call site - - - - Returns a string representation of the inline signature - A string representation of the inline signature - - - - - A mutable representation of a parameter type with an attached type modifier, - similar to Mono.Cecil's OptionalModifierType / RequiredModifierType and C#'s modopt / modreq - - - - - Whether this is a modopt (optional modifier type) or a modreq (required modifier type) - - - - The modifier type attached to the parameter type - - - - The modified parameter type - - - - Returns a string representation of the modifier type - A string representation of the modifier type - - - - Patch serialization - - - - Control the binding of a serialized object to a type - Specifies the assembly name of the serialized object - Specifies the type name of the serialized object - The type of the object the formatter creates a new instance of - - - - Serializes a patch info - The - The serialized data - - - - Deserialize a patch info - The serialized data - A - - - - Compare function to sort patch priorities - The patch - Zero-based index - The priority - A standard sort integer (-1, 0, 1) - - - - Serializable patch information - - - - Prefixes as an array of - - - - Postfixes as an array of - - - - Transpilers as an array of - - - - Finalizers as an array of - - - - Returns if any of the patches wants debugging turned on - - - - Adds prefixes - An owner (Harmony ID) - The patch methods - - - - Adds a prefix - - - Removes prefixes - The owner of the prefixes, or * for all - - - - Adds postfixes - An owner (Harmony ID) - The patch methods - - - - Adds a postfix - - - Removes postfixes - The owner of the postfixes, or * for all - - - - Adds transpilers - An owner (Harmony ID) - The patch methods - - - - Adds a transpiler - - - Removes transpilers - The owner of the transpilers, or * for all - - - - Adds finalizers - An owner (Harmony ID) - The patch methods - - - - Adds a finalizer - - - Removes finalizers - The owner of the finalizers, or * for all - - - - Removes a patch using its method - The method of the patch to remove - - - - Gets a concatenated list of patches - The Harmony instance ID adding the new patches - The patches to add - The current patches - - - - Gets a list of patches with any from the given owner removed - The owner of the methods, or * for all - The current patches + + The inner method @@ -1387,6 +1382,10 @@ A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + For an infix patch, this defines the inner method that we will apply the patch to + The method of the static patch method @@ -1433,19 +1432,27 @@ - A PatchClassProcessor used to turn on a class/type into patches + A PatchClassProcessor used to turn on a class/type into patches + + Name of the patch class's category + - Creates a patch class processor by pointing out a class. Similar to PatchAll() but without searching through all classes. + Creates a patch class processor by pointing out a class; similar to PatchAll() but without searching through all classes The Harmony instance - The class to process (need to have at least a [HarmonyPatch] attribute) + The class to process + Use this if you want to patch a class that is not annotated with HarmonyPatch Applies the patches A list of all created replacement methods or null if patch class is not annotated + + + REmoves the patches + A group of patches @@ -1466,29 +1473,158 @@ A collection of finalizer + + + A collection of inner prefix + + + + A collection of inner postfix + Gets all owners (Harmony IDs) or all known patches The patch owners - + Creates a group of patches An array of prefixes as An array of postfixes as An array of transpileres as An array of finalizeres as + An array of inner prefixes as + An array of inner postfixes as + + + + Serializable patch information + + + + Prefixes as an array of + + + + Postfixes as an array of + + + + Transpilers as an array of + + + + Finalizers as an array of + + + + InnerPrefixes as an array of + + + + InnerPostfixes as an array of + + + + Returns if any of the patches wants debugging turned on + + + + Number of replacements created + + + + Adds prefixes + An owner (Harmony ID) + The patch methods + + + + Adds a prefix + + + Removes prefixes + The owner of the prefixes, or * for all + + + + Adds postfixes + An owner (Harmony ID) + The patch methods + + + + Adds a postfix + + + Removes postfixes + The owner of the postfixes, or * for all + + + + Adds transpilers + An owner (Harmony ID) + The patch methods + + + + Adds a transpiler + + + Removes transpilers + Removes transpilers + The owner of the transpilers, or * for all + + + + Adds finalizers + An owner (Harmony ID) + The patch methods + + + + Adds a finalizer + + + Removes finalizers + The owner of the finalizers, or * for all + + + + Adds inner prefixes + An owner (Harmony ID) + The patch methods + + + + Removes inner prefixes + The owner of the inner prefixes, or * for all + + + + Adds inner postfixes + An owner (Harmony ID) + The patch methods + + + + Removes inner postfixes + The owner of the inner postfixes, or * for all + + + + Removes a patch using its method + The method of the patch to remove - A PatchProcessor handles patches on a method/constructor + A PatchProcessor handles patches on a method/constructor - Creates an empty patch processor - The Harmony instance - The original method/constructor - + Creates a new PatchProcessor + The Harmony instance + The original method/constructor Adds a prefix @@ -1537,6 +1673,30 @@ The finalizer method A for chaining calls + + + Adds an inner prefix + The inner prefix as a + A for chaining calls + + + + Adds an inner prefix + The inner prefix method + A for chaining calls + + + + Adds an inner postfix + The inner postfix as a + A for chaining calls + + + + Adds an inner postfix + The inner postfix method + A for chaining calls + Gets all patched original methods in the appdomain @@ -1675,7 +1835,7 @@ - A reverse patcher + A reverse patcher @@ -1717,6 +1877,37 @@ The log text Modified enumeration of + + + Patch serialization + + + + Control the binding of a serialized object to a type + Specifies the assembly name of the serialized object + Specifies the type name of the serialized object + The type of the object the formatter creates a new instance of + + + + Serializes a patch info + The + The serialized data + + + + Deserialize a patch info + The serialized data + A + + + + Compare function to sort patch priorities + The patch + Zero-based index + The priority + A standard sort integer (-1, 0, 1) + A helper class for reflection related functions @@ -1731,14 +1922,26 @@ - Enumerates all assemblies in the current app domain, excluding visual studio assemblies - An enumeration of + Enumerates all assemblies in the current app domain, excluding visual studio assemblies + An enumeration of + Gets a type by name. Prefers a full name with namespace but falls back to the first type matching the name otherwise The name A type or null if not found + + + Searches a type by regular expression; for exact searching, use + The regular expression that matches against Type.FullName or Type.Name + Refetches the cached types if set to true + The first type where FullName or Name matches the search + + + + Clears the type cache that uses + Gets all successfully loaded types from a given assembly @@ -1752,8 +1955,15 @@ - Enumerates all successfully loaded types in the current app domain, excluding visual studio assemblies - An enumeration of all in all assemblies, excluding visual studio assemblies + Enumerates all successfully loaded types in the current app domain, excluding visual studio assemblies + An enumeration of all in all assemblies, excluding visual studio assemblies + + + + Enumerates all inner types (non-recursive) of a given type + The class/type to start with + An enumeration of all inner + Applies a function going up the type hierarchy and stops at the first non-null result @@ -1776,6 +1986,11 @@ The first non-null result, or null if no match + + Creates an identifiable version of a method + The method + + Gets the reflection information for a directly declared field The class/type where the field is defined @@ -1821,6 +2036,13 @@ 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 a directly declared indexer property + The class/type where the indexer property is declared + Optional parameters to target a specific overload of multiple indexers + An indexer property or null when type is null or when it cannot be found + Gets the reflection information for the getter method of a directly declared property @@ -1834,6 +2056,13 @@ 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 getter method of a directly declared indexer property + The class/type where the indexer property is declared + Optional parameters to target a specific overload of multiple indexers + A method or null when type is null or when indexer property cannot be found + Gets the reflection information for the setter method of a directly declared property @@ -1847,6 +2076,13 @@ 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 indexer property + The class/type where the indexer property is declared + Optional parameters to target a specific overload of multiple indexers + A method or null when type is null or when indexer property cannot be found + Gets the reflection information for a property by searching the type and all its super types @@ -1860,6 +2096,13 @@ 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 an indexer property by searching the type and all its super types + The class/type + Optional parameters to target a specific overload of multiple indexers + An indexer property or null when type is null or when it cannot be found + Gets the reflection information for the getter method of a property by searching the type and all its super types @@ -1873,6 +2116,13 @@ 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 getter method of an indexer property by searching the type and all its super types + The class/type + Optional parameters to target a specific overload of multiple indexers + A method or null when type is null or when the indexer property cannot be found + Gets the reflection information for the setter method of a property by searching the type and all its super types @@ -1886,6 +2136,91 @@ 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 an indexer property by searching the type and all its super types + The class/type + Optional parameters to target a specific overload of multiple indexers + A method or null when type is null or when the indexer property cannot be found + + + + Gets the reflection information for a directly declared event + The class/type where the event is declared + The name of the event (case sensitive) + An event or null when type/name is null or when the event cannot be found + + + + Gets the reflection information for a directly declared event + The member in the form TypeFullName:MemberName, where TypeFullName matches the form recognized by Type.GetType like Some.Namespace.Type. + An event or null when the event cannot be found + + + + Gets the reflection information for an event by searching the type and all its super types + The class/type where the event is declared + The name of the event (case sensitive) + An event or null when type/name is null or when the event cannot be found + + + + Gets the reflection information for an event 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. + An event or null when the event cannot be found + + + + Gets the reflection information for the add method of a directly declared event + The class/type where the event is declared + The name of the event (case sensitive) + A method or null when type/name is null or when the event cannot be found + + + + Gets the reflection information for the add method of a directly declared event + 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 event cannot be found + + + + Gets the reflection information for the add method of an event by searching the type and all its super types + The class/type where the event is declared + The name of the event (case sensitive) + A method or null when type/name is null or when the event cannot be found + + + + Gets the reflection information for the add method of an event 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 the event cannot be found + + + + Gets the reflection information for the remove method of a directly declared event + The class/type where the event is declared + The name of the event (case sensitive) + A method or null when type/name is null or when the event cannot be found + + + + Gets the reflection information for the remove method of a directly declared event + 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 event cannot be found + + + + Gets the reflection information for the remove method of an event by searching the type and all its super types + The class/type where the event is declared + The name of the event (case sensitive) + A method or null when type/name is null or when the event cannot be found + + + + Gets the reflection information for the remove method of an event 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 the event cannot be found + Gets the reflection information for a directly declared method @@ -1922,9 +2257,28 @@ - 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 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 method of an async method's state machine + Async method that creates the state machine internally + The internal method of the async state machine or null if no valid async method is detected + + + + Gets the reflection information for a finalizer + The class/type that defines the finalizer + A method or null when type is null or when the finalizer cannot be found + + + + Gets the reflection information for a directly declared finalizer + The class/type that defines the finalizer + A method or null when type is null or when the finalizer cannot be found + Gets the names of all method that are declared in a type @@ -1968,6 +2322,12 @@ The class/type of this member + + Returns a by searching for module-id and token + The module of the method + The token of the method + + Test if a class member is actually an concrete implementation A member @@ -2193,10 +2553,11 @@ - 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) + 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) @@ -2405,7 +2766,7 @@ A readable/assignable delegate - + Creates a delegate to a given method The delegate Type The method to create a delegate from. @@ -2420,7 +2781,15 @@ 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. + + Only applies for instance methods, and if argument is null. + This argument only matters if the target signature contains a value type (such as struct or primitive types), + and your argument is replaced by a non-value type + (usually object) instead of using said value type. + Use this if the generic arguments of doesn't represent the delegate's + arguments, and calling this function fails A delegate of given to given + Delegate invocation is more performant and more convenient to use than @@ -2433,7 +2802,7 @@ - + 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. @@ -2448,7 +2817,15 @@ 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. + + Only applies for instance methods, and if argument is null. + This argument only matters if the target signature contains a value type (such as struct or primitive types), + and your argument is replaced by a non-value type + (usually object) instead of using said value type. + Use this if the generic arguments of doesn't represent the delegate's + arguments, and calling this function fails A delegate of given to given + Delegate invocation is more performant and more convenient to use than @@ -2472,7 +2849,7 @@ A delegate of given to the method specified via [] attributes on - This calls with the method and virtualCall arguments + This calls with the method and virtualCall arguments determined from the [] attributes on , and the given (for closed instance delegates). @@ -2525,9 +2902,10 @@ - - A cache for the or similar Add methods for different types. - + + A cache for the or similar Add methods for different types. + + Makes a deep copy of any object @@ -2632,6 +3010,420 @@ The objects The hash code + + + Adds extensions to Type for a lot of AccessTools methods + + + Enumerates all inner types (non-recursive) + The class/type to start with + An enumeration of all inner + + + + Applies a function going up the type hierarchy and stops at the first non-null result + Result type of func() + The class/type to start with + The evaluation function returning T + The first non-null result, or null if no match + + The type hierarchy of a class or value type (including struct) does NOT include implemented interfaces, + and the type hierarchy of an interface is only itself (regardless of whether that interface implements other interfaces). + The top-most type in the type hierarchy of all non-interface types (including value types) is . + + + + + Applies a function going into inner types and stops at the first non-null result + Generic type parameter + The class/type to start with + The evaluation function returning T + The first non-null result, or null if no match + + + + Gets the reflection information for a directly declared field + The class/type where the field is defined + 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 field by searching the type and all its super types + The class/type where the field is defined + 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 + The class/type where the field is declared + The zero-based index of the field inside the class definition + A field or null when type is null or when the field cannot be found + + + + Gets the reflection information for a directly declared property + The class/type where the property is declared + 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 indexer property + The class/type where the indexer property is declared + Optional parameters to target a specific overload of multiple indexers + An indexer property or null when type is null or when it cannot be found + + + + Gets the reflection information for the getter method of a directly declared property + The class/type where the property is declared + 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 indexer property + The class/type where the indexer property is declared + Optional parameters to target a specific overload of multiple indexers + A method or null when type is null or when indexer property cannot be found + + + + Gets the reflection information for the setter method of a directly declared property + The class/type where the property is declared + 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 indexer property + The class/type where the indexer property is declared + Optional parameters to target a specific overload of multiple indexers + A method or null when type is null or when indexer property cannot be found + + + + Gets the reflection information for a property by searching the type and all its super types + The class/type + The name + A property or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for an indexer property by searching the type and all its super types + The class/type + Optional parameters to target a specific overload of multiple indexers + An indexer property or null when type is null or when it cannot be found + + + + Gets the reflection information for the getter method of a property by searching the type and all its super types + The class/type + 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 an indexer property by searching the type and all its super types + The class/type + Optional parameters to target a specific overload of multiple indexers + A method or null when type is null or when the indexer 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 class/type + 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 an indexer property by searching the type and all its super types + The class/type + Optional parameters to target a specific overload of multiple indexers + A method or null when type is null or when the indexer property cannot be found + + + + Gets the reflection information for a directly declared event + The class/type where the event is declared + The name of the event (case sensitive) + An event or null when type/name is null or when the event cannot be found + + + + Gets the reflection information for an event by searching the type and all its super types + The class/type + The name + An event or null when type/name is null or when the event cannot be found + + + + Gets the reflection information for the add method of a directly declared event + The class/type where the event is declared + The name of the event (case sensitive) + A method or null when type/name is null or when the event cannot be found + + + + Gets the reflection information for the add method of an event by searching the type and all its super types + The class/type + The name + A method or null when type/name is null or when the event cannot be found + + + + Gets the reflection information for the remove method of a directly declared event + The class/type where the event is declared + The name of the event (case sensitive) + A method or null when type/name is null or when the event cannot be found + + + + Gets the reflection information for the remove method of an event by searching the type and all its super types + The class/type + The name + A method or null when type/name is null or when the event cannot be found + + + + Gets the reflection information for a finalizer + The class/type that defines the finalizer + A method or null when type is null or when the finalizer cannot be found + + + + Gets the reflection information for a directly declared finalizer + The class/type that defines the finalizer + A method or null when type is null or when the finalizer cannot be found + + + + Gets the reflection information for a directly declared method + The class/type where the method is declared + The name of the method (case sensitive) + 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 + + + + Gets the reflection information for a method by searching the type and all its super types + The class/type where the method is declared + The name of the method (case sensitive) + 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 + + + + Gets the names of all method that are declared in a type + The declaring class/type + A list of method names + + + + Gets the names of all fields that are declared in a type + The declaring class/type + A list of field names + + + + Gets the names of all properties that are declared in a type + The declaring class/type + A list of property names + + + + Gets the reflection information for a directly declared constructor + The class/type where the constructor is declared + Optional parameters to target a specific overload of the constructor + Optional parameters to only consider static constructors + A constructor info or null when type is null or when the constructor cannot be found + + + + Gets the reflection information for a constructor by searching the type and all its super types + The class/type where the constructor is declared + Optional parameters to target a specific overload of the method + Optional parameters to only consider static constructors + A constructor info or null when type is null or when the method cannot be found + + + + Gets reflection information for all declared constructors + The class/type where the constructors are declared + Optional parameters to only consider static constructors + A list of constructor infos + + + + Gets reflection information for all declared methods + The class/type where the methods are declared + A list of methods + + + + Gets reflection information for all declared properties + The class/type where the properties are declared + A list of properties + + + + Gets reflection information for all declared fields + The class/type where the fields are declared + A list of fields + + + + Given a type, returns the first inner type matching a recursive search by name + The class/type to start searching at + The name of the inner type (case sensitive) + The inner type or null if type/name is null or if a type with that name cannot be found + + + + Given a type, returns the first inner type matching a recursive search with a predicate + The class/type to start searching at + The predicate to search with + The inner type or null if type/predicate is null or if a type with that name cannot be found + + + + Given a type, returns the first method matching a predicate + The class/type to start searching at + The predicate to search with + The method or null if type/predicate is null or if a type with that name cannot be found + + + + Given a type, returns the first constructor matching a predicate + The class/type to start searching at + The predicate to search with + The constructor info or null if type/predicate is null or if a type with that name cannot be found + + + + Given a type, returns the first property matching a predicate + The class/type to start searching at + The predicate to search with + The property or null if type/predicate is null or if a type with that name cannot be found + + + + Creates a field reference delegate for an instance field of a class or static field (NOT an instance field of a struct) + + The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type), + a type that is assignable from that type; or if the field's type is an enum type, + either that type or the underlying integral type of that enum type + + + The type that defines the field, or derived class of this type; must not be a struct type unless the field is static + + The name of the field + + A readable/assignable delegate with T=object + (for static fields, the instance delegate parameter is ignored) + + + + This method is meant for cases where the given type is only known at runtime and thus can't be used as a type parameter T + in e.g. . + + + This method supports static fields, even those defined in structs, for legacy reasons. + Consider using (and other overloads) instead for static fields. + + + + + + Creates a static field reference + + The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type), + a type that is assignable from that type; or if the field's type is an enum type, + either that type or the underlying integral type of that enum type + + The type (can be class or struct) the field is defined in + The name of the field + A readable/assignable reference to the field + + + + Throws a missing member runtime exception + The type that is involved + A list of names + + + + Gets default value for a specific type + The class/type + The default value + + + + Creates an (possibly uninitialized) instance of a given type + The class/type + The new instance + + + + Tests if a type is a struct + The type + True if the type is a struct + + + + Tests if a type is a class + The type + True if the type is a class + + + + Tests if a type is a value type + The type + True if the type is a value type + + + + Tests if a type is an integer type + The type + True if the type represents some integer + + + + Tests if a type is a floating point type + The type + True if the type represents some floating point + + + + Tests if a type is a numerical type + The type + True if the type represents some number + + + + Tests if a type is void + The type + True if the type is void + + + + Tests whether a type is static, as defined in C# + The type + True if the type is static + + + + + By adding the following using statement to your source code: using static HarmonyLib.Code; + you can for example start using Ldarg_1 in you code instead of new CodeMatch(OpCodes.Ldarg_1) + and then you can use array notation to add an operand and/or a name: Call[myMethodInfo] instead of new CodeMatch(OpCodes.Call, myMethodInfo) + + A CodeInstruction match @@ -2639,7 +3431,10 @@ The name of the match - + + The matched opcodes + + The matched opcodes @@ -2660,6 +3455,13 @@ The optional operand The optional name + + + Creates a code match + The opcodes + The optional operand + The optional name + Creates a code match that calls a method @@ -2685,13 +3487,137 @@ An optional name + + Tests for any form of Ldarg* + The (optional) index + A new code match + + + + Tests for Ldarga/Ldarga_S + The (optional) index + A new code match + + + + Tests for Starg/Starg_S + The (optional) index + A new code match + + + + Tests for any form of Ldloc* + The optional local variable + A new code match + + + + Tests for any form of Stloc* + The optional local variable + A new code match + + + + Tests if the code instruction calls the method/constructor + The method + A new code match + + + + Tests if the code instruction loads a constant + A new code match + + + + Tests if the code instruction loads an integer constant + The integer constant + A new code match + + + + Tests if the code instruction loads a floating point constant + The floating point constant + A new code match + + + + Tests if the code instruction loads an enum constant + The enum + A new code match + + + + Tests if the code instruction loads a string constant + The string + A new code match + + + + Tests if the code instruction loads a field + The field + Set to true if the address of the field is loaded + A new code match + + + + Tests if the code instruction stores a field + The field + A new code match + + + + Creates a code match that calls a method + The lambda expression using the method + A new code match + + + Creates a code match that calls a method + The lambda expression using the method + A new code match + + + + Creates a code match for local loads + Whether to match for address loads + An optional name + A new code match + + + Creates a code match for local stores + An optional name + A new code match + + + Creates a code match for argument loads + Whether to match for address loads + An optional name + A new code match + + + Creates a code match for argument stores + An optional name + A new code match + + + Creates a code match for branching + An optional name + A new code match + Returns a string that represents the match A string representation - A CodeInstruction matcher + A CodeInstruction matcher + + + + Delegate for error handling + The current code matcher + The error message + True if the error should be suppressed and the matcher should continue (if possible) + The current position @@ -2739,7 +3665,8 @@ - Creates an empty code matcher + Creates an empty code matcher + Creates a code matcher from an enumeration of instructions @@ -2751,6 +3678,12 @@ Makes a clone of this instruction matcher A copy of this matcher + + + Resets the current position to -1 and clears last matches and errors + If true, sets position to 0, otherwise sets it to -1 + The same code matcher + Gets instructions at the current position @@ -2844,6 +3777,17 @@ The same code matcher + + Runs some code when chaining at the current position + The to run + The same code matcher + + + + Registers an error handler that is invoked instead of throwing an exception + The to register or null to remove the current handler + The same code matcher + Sets an instruction at current position The instruction to set @@ -2881,6 +3825,19 @@ The operand The same code matcher + + + Declares a local variable but does not add it + The variable type + [out] The new local variable + The same code matcher + + + + Declares a new label but does not add it + [out] The new label + The same code matcher + Creates a label at current position @@ -2896,7 +3853,7 @@ - Creates a label at a position + Creates a label at the given offset from the current position The offset [out] The new label The same code matcher @@ -2924,42 +3881,80 @@ - Inserts some instructions + Inserts some instructions at the current position The instructions The same code matcher - Inserts an enumeration of instructions + Inserts an enumeration of instructions at the current position The instructions The same code matcher - Inserts a branch + Inserts a branch at the current position The branch opcode Branch destination The same code matcher - Inserts some instructions and advances the position + Inserts some instructions at the current position and advances it The instructions The same code matcher - Inserts an enumeration of instructions and advances the position + Inserts an enumeration of instructions at the current position and advances it The instructions The same code matcher - Inserts a branch and advances the position + Inserts a branch at the current position and advances it The branch opcode Branch destination The same code matcher + + + Inserts instructions immediately after the current position + The instructions + The same code matcher + + + + Inserts an enumeration of instructions immediately after the current position + The instructions + The same code matcher + + + + Inserts a branch instruction immediately after the current position + The branch opcode + Branch destination index + The same code matcher + + + + Inserts instructions immediately after the current position and advances to the last inserted instruction + The instructions + The same code matcher + + + + Inserts an enumeration of instructions immediately after the current position and advances to the last inserted instruction + The instructions + The same code matcher + + + + Inserts a branch instruction immediately after the current position and advances the position + The branch opcode + Branch destination index + The same code matcher + Removes current instruction @@ -2980,7 +3975,7 @@ - Removes the instructions in a offset range + Removes the instructions in an offset range The start offset The end offset The same code matcher @@ -3004,13 +3999,13 @@ Searches forward with a predicate and advances position - The predicate + A function to test each instruction for a match The same code matcher - Searches backwards with a predicate and reverses position - The predicate + Searches backwards with a predicate and moves the position + A function to test each instruction for a match The same code matcher @@ -3019,21 +4014,69 @@ Some code matches The same code matcher + + + Prepares matching forward and advancing 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 + + + Prepares matching forward and advancing position to ending of matching sequence + Some code matches + The same code matcher + - Matches backwards and reverses position to beginning of matching sequence + Matches backwards and moves the position to beginning of matching sequence + Some code matches + The same code matcher + + + + Prepares matching backwards and reversing position to beginning of matching sequence Some code matches The same code matcher - Matches backwards and reverses position to ending of matching sequence + Matches backwards and moves the position to ending of matching sequence + Some code matches + The same code matcher + + + + Prepares matching backwards and reversing position to ending of matching sequence + Some code matches + The same code matcher + + + + Removes instructions from the current position forward until a predicate is matched. The matched instruction is not removed + A function to test each instruction for a match + The same code matcher + + + + Removes instructions from the current position backward until a predicate is matched. The matched instruction is not removed + A function to test each instruction for a match + The same code matcher + + + + Removes instructions from the current position up to the next match (exclusive) + Some code matches + The same code matcher + + + + Removes instructions backwards from the current position to the previous match (exclusive) Some code matches The same code matcher @@ -3088,6 +4131,11 @@ An array of types + + Tests if a type has the + The class/type to test + True if the type has the + A helper to access a value via key from a dictionary The key type @@ -3251,6 +4299,20 @@ True if the instruction stores this field + + Returns the index targeted by this ldloc, ldloca, or stloc + The + The index it targets + + + + + Returns the index targeted by this ldarg, ldarga, or starg + The + The index it targets + + + Adds labels to the code instruction and return it The @@ -3309,8 +4371,18 @@ The other to move the ExceptionBlocks from The code instruction that received the blocks + + Extensions for a sequence of + + + + Searches a list of by running a sequence of against it + The CodeInstructions (like a body of a method) to search in + An array of representing the sequence of codes you want to search for + + - General extensions for collections + General extensions for collections @@ -3353,7 +4425,7 @@ - General extensions for collections + General extensions for collections @@ -3414,8 +4486,62 @@ - Log a string directly to disk. Slower method that prevents missing information in case of a crash - The string to log. + Logs a string directly to disk to avoid losing information in case of a crash + The string to log. + + + + Logs an inline comment at the specified code position + This method formats the comment with the code position and logs it. + The position in the code where the comment should be logged. + The comment text to log. Cannot be null or empty. + + + + Logs the specified Intermediate Language (IL) operation code and its position in the code stream + This method formats the IL operation code and its position into a string and logs it. + The position of the IL operation code in the code stream. + The IL operation code to log. + + + + Logs information about an Intermediate Language (IL) instruction, including its position, opcode, and operand + This method formats and logs details about an IL instruction for debugging or analysis purposes. + The logged output includes the instruction's position, opcode, and operand (if any). + The position of the IL instruction within the method body. + The representing the operation to be performed. + The operand associated with the IL instruction, or if the instruction has no operand. + + + + Logs information about a local variable in Intermediate Language (IL) code + The logged information includes the variable's index, type, and whether it is pinned. + The representing the local variable to log. Must not be . + + + + Logs the intermediate language (IL) code at the specified position with the given label operand + Formats and logs the IL code position and label operand for detailed IL tracking or debugging. + The position in the IL code to log. + The label operand associated with the IL code to log. + + + + Logs the beginning of an intermediate language (IL) exception handling block + Logs the start of an exception handling block (e.g., .try, .catch, .finally, .fault), + adjusts indentation, and simulates a LEAVE opcode for consistency. + The position of the IL code where the block begins. + The representing the type of exception handling block to log. This includes + information about the block type (e.g., try, catch, finally) and any associated metadata. + + + + Logs the end of an intermediate language (IL) exception block + This method handles the logging of specific types of exception blocks, such as the end of a try-catch or + similar constructs. It adjusts the indentation level and outputs relevant information about the block's conclusion. + The position in the IL code where the block ends. + The exception block to log. Must have a valid block type. @@ -3555,6 +4681,21 @@ Gets the type of the current field or property The type + + + Checks if the current traverse instance is for a field + True if its a field + + + + Checks if the current traverse instance is for a property + True if its a property + + + + Checks if the current field or property is writeable + True if writing is possible + Moves the current traverse instance to a inner type diff --git a/build/deploy-local-smapi.targets b/build/deploy-local-smapi.targets index 14c4d816..ada50395 100644 --- a/build/deploy-local-smapi.targets +++ b/build/deploy-local-smapi.targets @@ -30,11 +30,16 @@ This assumes `find-game-folder.targets` has already been imported and validated. + - + + + + + diff --git a/build/unix/prepare-install-package.sh b/build/unix/prepare-install-package.sh index 837f8884..f1762f8d 100755 --- a/build/unix/prepare-install-package.sh +++ b/build/unix/prepare-install-package.sh @@ -159,7 +159,7 @@ for folder in ${folders[@]}; do cp -r "$smapiBin/i18n" "$bundlePath/smapi-internal" # bundle smapi-internal - for name in "0Harmony.dll" "0Harmony.xml" "Markdig.dll" "Mono.Cecil.dll" "Mono.Cecil.Mdb.dll" "Mono.Cecil.Pdb.dll" "MonoMod.Common.dll" "Newtonsoft.Json.dll" "Pathoschild.Http.Client.dll" "Pintail.dll" "TMXTile.dll" "SMAPI.Toolkit.dll" "SMAPI.Toolkit.xml" "SMAPI.Toolkit.CoreInterfaces.dll" "SMAPI.Toolkit.CoreInterfaces.xml" "System.Net.Http.Formatting.dll"; do + for name in "0Harmony.dll" "0Harmony.pdb" "0Harmony.xml" "Markdig.dll" "Mono.Cecil.dll" "Mono.Cecil.Mdb.dll" "Mono.Cecil.Pdb.dll" "MonoMod.Backports.dll" "MonoMod.Core.dll" "MonoMod.Iced.dll" "MonoMod.ILHelpers.dll" "MonoMod.Utils.dll" "Newtonsoft.Json.dll" "Pathoschild.Http.Client.dll" "Pintail.dll" "TMXTile.dll" "SMAPI.Toolkit.dll" "SMAPI.Toolkit.xml" "SMAPI.Toolkit.CoreInterfaces.dll" "SMAPI.Toolkit.CoreInterfaces.xml" "System.Net.Http.Formatting.dll"; do cp "$smapiBin/$name" "$bundlePath/smapi-internal" done diff --git a/build/windows/prepare-install-package.ps1 b/build/windows/prepare-install-package.ps1 index a5a6b043..afd0b571 100644 --- a/build/windows/prepare-install-package.ps1 +++ b/build/windows/prepare-install-package.ps1 @@ -179,7 +179,7 @@ foreach ($folder in $folders) { cp -Recurse "$smapiBin/i18n" "$bundlePath/smapi-internal" # bundle smapi-internal - foreach ($name in @("0Harmony.dll", "0Harmony.xml", "Markdig.dll", "Mono.Cecil.dll", "Mono.Cecil.Mdb.dll", "Mono.Cecil.Pdb.dll", "MonoMod.Common.dll", "Newtonsoft.Json.dll", "Pathoschild.Http.Client.dll", "Pintail.dll", "TMXTile.dll", "SMAPI.Toolkit.dll", "SMAPI.Toolkit.xml", "SMAPI.Toolkit.CoreInterfaces.dll", "SMAPI.Toolkit.CoreInterfaces.xml", "System.Net.Http.Formatting.dll")) { + foreach ($name in @("0Harmony.dll", "0Harmony.pdb", "0Harmony.xml", "Markdig.dll", "Mono.Cecil.dll", "Mono.Cecil.Mdb.dll", "Mono.Cecil.Pdb.dll", "MonoMod.Backports.dll", "MonoMod.Core.dll", "MonoMod.Iced.dll", "MonoMod.ILHelpers.dll", "MonoMod.Utils.dll", "Newtonsoft.Json.dll", "Pathoschild.Http.Client.dll", "Pintail.dll", "TMXTile.dll", "SMAPI.Toolkit.dll", "SMAPI.Toolkit.xml", "SMAPI.Toolkit.CoreInterfaces.dll", "SMAPI.Toolkit.CoreInterfaces.xml", "System.Net.Http.Formatting.dll")) { cp "$smapiBin/$name" "$bundlePath/smapi-internal" } diff --git a/docs/release-notes.md b/docs/release-notes.md index f7d705bb..2d6ff80b 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -16,6 +16,7 @@ * Improved performance when propagating localized assets in some cases (thanks to SinZ!). * Improved error-handling during asset propagation. * Updated dependencies, including... + * [Harmony](https://harmony.pardeike.net) 2.2.2 → 2.4.2 (see [changes](https://github.com/pardeike/Harmony/releases)). * [Newtonsoft.Json](https://www.newtonsoft.com/json) 13.0.3 → 13.0.4 (see [changes](https://github.com/JamesNK/Newtonsoft.Json/releases/tag/13.0.4)); * [Pintail](https://github.com/Nanoray-pl/Pintail) 2.8.1 → 2.9.1 (see [changes](https://github.com/Nanoray-pl/Pintail/blob/master/docs/release-notes.md#291)). * Removed `System.Management.dll`, which SMAPI no longer uses. @@ -30,6 +31,10 @@ * Fixed validation error if a `Target` contains multiple targets (thanks to irocendar!). * Fixed `FromFile` errors like "_matches a schema that is not allowed_" (thanks to irocendar!). +**Breaking changes for mod authors:** +* Newer Harmony versions have stricter validation, which will break some patches which do unusual things (like + selecting instructions past the end). + ## 4.3.2 Released 14 July 2025 for Stardew Valley 1.6.14 or later. See [4.3 release highlights](https://www.patreon.com/posts/133992196). diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 28b4f77e..a18b445d 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -10,7 +10,7 @@ - + diff --git a/src/SMAPI.ModBuildConfig/Framework/MainModFileManager.cs b/src/SMAPI.ModBuildConfig/Framework/MainModFileManager.cs index 6107013b..a416a8da 100644 --- a/src/SMAPI.ModBuildConfig/Framework/MainModFileManager.cs +++ b/src/SMAPI.ModBuildConfig/Framework/MainModFileManager.cs @@ -33,7 +33,11 @@ internal class MainModFileManager : IModFileManager "Mono.Cecil", "Mono.Cecil.Mdb", "Mono.Cecil.Pdb", - "MonoMod.Common", + "MonoMod.Backports", + "MonoMod.Core", + "MonoMod.Iced", + "MonoMod.ILHelpers", + "MonoMod.Utils", "Newtonsoft.Json", "StardewModdingAPI", "SMAPI.Toolkit", diff --git a/src/SMAPI/SMAPI.csproj b/src/SMAPI/SMAPI.csproj index 2d6d11e6..7823dbe0 100644 --- a/src/SMAPI/SMAPI.csproj +++ b/src/SMAPI/SMAPI.csproj @@ -22,7 +22,7 @@ - +