Open main menu
Home
Random
Log in
Settings
About Stardew Valley Wiki
Disclaimers
Stardew Valley Wiki
Search
Changes
← Older edit
Newer edit →
Modding:Modder Guide/APIs/Harmony
(view source)
Revision as of 23:24, 11 January 2020
26 bytes added
,
23:24, 11 January 2020
→How to use it
:
tweak example to avoid alias confusion
Line 32:
Line 32:
// example patch, you'll need to edit this for your patch
// example patch, you'll need to edit this for your patch
harmony.Patch(
harmony.Patch(
−
original: AccessTools.Method(typeof(
SObject
), nameof(
SObject
.canBePlacedHere)),
+
original: AccessTools.Method(typeof(
StardewValley.Object
), nameof(
StardewValley.Object
.canBePlacedHere)),
prefix: new HarmonyMethod(typeof(ObjectPatches), nameof(ObjectPatches.CanBePlacedHere_Prefix))
prefix: new HarmonyMethod(typeof(ObjectPatches), nameof(ObjectPatches.CanBePlacedHere_Prefix))
);
);
Pathoschild
translators
8,439
edits