-
-
Notifications
You must be signed in to change notification settings - Fork 506
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
64 additions
and
310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,12 +10,14 @@ It supports **Mono** and **.NET** environments on Windows, Unix and macOS except | |
|
||
Designed to be used by multiple users (usually called Mods) that would otherwise override each others hooks, it was originally created for the game [RimWorld](https://rimworldgame.com) and its large modding community by [Andreas Pardeike](https://www.patreon.com/pardeike). | ||
|
||
Enjoy! | ||
Enjoy! | ||
/Andreas Pardeike | ||
|
||
# Getting Started | ||
|
||
Installation is usually done by copying and referencing [0Harmony.dll](https://github.com/pardeike/Harmony/releases) from your project or by using the [Lib.Harmony](https://www.nuget.org/packages/Lib.Harmony) nuget package. | ||
If you want a single file, dependency-merged assembly, you should use the [Lib.Harmony](https://www.nuget.org/packages/Lib.Harmony) nuget package. This is the **preferred** way. | ||
|
||
If you instead want to supply the dependencies yourself, you should use the [Lib.Harmony.Thin](https://www.nuget.org/packages/Lib.Harmony.Thin) nuget package. You get more control but you are responsible to make all references available at runtime. | ||
|
||
# Documentation | ||
|
||
|
@@ -27,7 +29,7 @@ If you find a factual error or if you have feedback about the documentation you | |
- file a documentation Issue on the repo | ||
- or write about it on the official discord | ||
|
||
**New to modding and C#?** Beside the basic language features you need at least a good overview of **Reflection** in C#. Read this short and useful [introduction](https://dotnetcademy.net/Learn/4/Pages/1). | ||
**New to modding and C#?** Beside the basic language features you need at least a good overview of **Reflection** in C#. Read this short and useful [introduction](https://dotnetcademy.net/Learn/4/Pages/1). | ||
|
||
## Community | ||
|
||
|
@@ -37,11 +39,11 @@ Help by promoting this library so other developers can find it. One way is to up | |
|
||
# Contact | ||
|
||
Andreas Pardeike | ||
[email protected] | ||
twitter: @pardeike | ||
Andreas Pardeike | ||
[email protected] | ||
twitter: @pardeike | ||
|
||
## Donations | ||
|
||
Donations keep me going: | ||
Donations keep me going: | ||
[https://www.patreon.com/pardeike](https://www.patreon.com/pardeike) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<p align="center"> | ||
<img src="https://raw.githubusercontent.com/pardeike/Harmony/master/HarmonyLogo.png" alt="Harmony" width="180" /><br> | ||
<b>Version 2</b><br> | ||
<b>Version 2.3</b><br> | ||
A library for patching, replacing and decorating<br> | ||
.NET and Mono methods during runtime. | ||
</p> | ||
|
@@ -15,15 +15,17 @@ It is also used in unit testing WPF controls and in many other areas. | |
|
||
If you develop in C# and your code is loaded as a module/plugin into a host application, you can use Harmony to alter the functionality of all the available assemblies of that application. Where other patch libraries simply allow you to replace the original method, Harmony goes one step further and gives you: | ||
|
||
• A way to keep the original method intact | ||
• Execute your code before and/or after the original method | ||
• Modify the original with IL code processors | ||
• Multiple Harmony patches co-exist and don't conflict with each other | ||
• A way to keep the original method intact | ||
• Execute your code before and/or after the original method | ||
• Modify the original with IL code processors | ||
• Multiple Harmony patches co-exist and don't conflict with each other | ||
• Works at runtime and does not touch any files | ||
|
||
### Installation | ||
|
||
Installation is done by using [0Harmony.dll](https://github.com/pardeike/Harmony/releases) in your project or by using the [Lib.Harmony](https://www.nuget.org/packages/Lib.Harmony) nuget package. | ||
If you want a single file, dependency-merged assembly, you should use the [Lib.Harmony](https://www.nuget.org/packages/Lib.Harmony) nuget package. This is the **preferred** way. | ||
|
||
If you instead want to supply the dependencies yourself, you should use the [Lib.Harmony.Thin](https://www.nuget.org/packages/Lib.Harmony.Thin) nuget package. You get more control but you are responsible to make all references available at runtime. | ||
|
||
### Documentation | ||
|
||
|
@@ -33,9 +35,9 @@ Please check out the [documentation](https://harmony.pardeike.net) and join the | |
|
||
I put thousands of hours into this project and its support. So every little action helps: | ||
|
||
• Upvote this [stackoverflow answer](https://stackoverflow.com/questions/7299097/dynamically-replace-the-contents-of-a-c-sharp-method/42043003#42043003) | ||
• Spread the word in your developer communities | ||
• Become a [GitHub sponsor](https://github.com/sponsors/pardeike) or a [Patreon](https://www.patreon.com/pardeike) | ||
• Upvote this [stackoverflow answer](https://stackoverflow.com/questions/7299097/dynamically-replace-the-contents-of-a-c-sharp-method/42043003#42043003) | ||
• Spread the word in your developer communities | ||
|
||
This project uses the great [MonoMod.Core](https://github.com/MonoMod) library by [0x0ade](https://github.com/0x0ade) and [nike4613](https://github.com/nike4613). | ||
|
||
|
@@ -46,20 +48,19 @@ Harmony 1 is deprecated and not under active development anymore. The latest ver | |
<br> | ||
|
||
<p align="center"> | ||
<a href="../../releases/latest"><img src="https://img.shields.io/github/release/pardeike/harmony.svg?style=flat" /></a> | ||
<a href="https://www.nuget.org/packages/lib.harmony"><img src="https://img.shields.io/nuget/v/lib.harmony.svg?style=flat" /></a> | ||
<a href="https://harmony.pardeike.net"><img src="https://img.shields.io/badge/documentation-%F0%9F%94%8D-blue?style=flat" /></a> | ||
<a href="../../blob/master/LICENSE"><img src="https://img.shields.io/github/license/pardeike/harmony.svg?style=flat-squared&label=License" /></a> | ||
<a href="../../releases/latest"><img src="https://img.shields.io/github/release/pardeike/harmony.svg?style=flat-squared&label=Release" /></a> | ||
<a href="https://harmony.pardeike.net"><img src="https://img.shields.io/badge/documentation-%F0%9F%94%8D-9cf?style=flat-squared&label=Documentation" /></a> | ||
</p> | ||
<p align="center"> | ||
<a href="https://github.com/pardeike/Harmony/actions/workflows/test.yml"><img src="https://github.com/pardeike/Harmony/actions/workflows/test.yml/badge.svg" /></a> | ||
<a href="https://dev.azure.com/pardeike/Harmony/_build"><img src="https://pardeike.visualstudio.com/Harmony/_apis/build/status/Build%20and%20test" /></a> | ||
<a href="https://github.com/pardeike/Harmony/releases/latest"><img src="https://img.shields.io/github/downloads/pardeike/Harmony/total.svg?style=flat-squared&logo=github&color=009900&label=Release%20Downloads" /></a> | ||
<a href="https://www.nuget.org/packages/Lib.Harmony"><img src="https://img.shields.io/nuget/dt/Lib.Harmony?style=flat-squared&logo=nuget&label=Nuget%20Downloads&color=009900" /></a> | ||
</p> | ||
<p align="center"> | ||
<a href="https://github.com/pardeike/Harmony/releases/latest"><img src="https://img.shields.io/github/downloads/pardeike/Harmony/total.svg?style=flat&logo=github" /></a> | ||
<a href="https://discord.gg/xXgghXR"><img src="https://img.shields.io/discord/131466550938042369.svg?style=flat&logo=discord&label=discord" /></a> | ||
<a href="../../blob/master/LICENSE"><img src="https://img.shields.io/github/license/pardeike/harmony.svg?style=flat" /></a> | ||
<a href="https://github.com/pardeike/Harmony/actions/workflows/test.yml"><img src="https://img.shields.io/github/actions/workflow/status/pardeike/Harmony/test.yml?style=flat-squared&logo=github&label=CI%20Tests" /></a> | ||
<a href="https://discord.gg/xXgghXR"><img src="https://img.shields.io/discord/131466550938042369.svg?style=flat-squared&logo=discord&label=Official%20Discord" /></a> | ||
</p> | ||
<p align="center"> | ||
<a href="mailto:[email protected]"><img src="https://img.shields.io/badge/[email protected]?style=flat" /></a> | ||
<a href="https://twitter.com/pardeike"><img src="https://img.shields.io/badge/[email protected]?style=flat&logo=twitter" /></a> | ||
<a href="mailto:[email protected]"><img src="https://img.shields.io/badge/[email protected]?style=flat-squared&label=Email" /></a> | ||
<a href="https://twitter.com/pardeike"><img src="https://img.shields.io/badge/[email protected]?style=flat-squared&logo=twitter&label=Twitter" /></a> | ||
</p> |
Oops, something went wrong.