Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Modding:Modder Guide/APIs/Harmony
(view source)
Revision as of 20:21, 16 August 2021
36 bytes removed
,
20:21, 16 August 2021
update for SMAPI 3.12 and Harmony 2.0
Line 28:
Line 28:
<li>In your mod's <tt>Entry</tt> method, use Harmony's code API to register patches:
<li>In your mod's <tt>Entry</tt> method, use Harmony's code API to register patches:
<syntaxhighlight lang="c#">
<syntaxhighlight lang="c#">
−
var harmony =
HarmonyInstance.Create
(this.ModManifest.UniqueID);
+
var harmony =
new Harmony
(this.ModManifest.UniqueID);
// example patch, you'll need to edit this for your patch
// example patch, you'll need to edit this for your patch
Line 36:
Line 36:
);
);
</syntaxhighlight></li>
</syntaxhighlight></li>
−
<li>See the
{{github|pardeike
/
Harmony
/
wiki|Harmony 1
.
2 wiki}} (not 2
.
0!) for
tutorials and documentation.</li>
+
<li>See the
[https:
//
harmony
.
pardeike
.
net/ Harmony
tutorials and documentation
]
.</li>
</ol>
</ol>
Pathoschild
translators
8,439
edits
Navigation menu
Personal tools
Create account
Log in
Namespaces
Modding
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Recent changes
Admin noticeboard
Help Editing
Random page
Official Links
Official Site
Official Forums
Official Merchandise
Discord
Reddit
Tools
Upload file
Special pages
Printable version