@@ -47,28 +47,18 @@ mod uses Terrain Patcher, anyone using your mod needs to have Terrain Patcher in
47
47
48
48
### Patch Loading
49
49
50
- There are two ways to load a terrain patch. The easiest way is to distribute your ` .optoctreepatch `
51
- file alongside your mod. ** Terrain Patcher will find and load all ` .optoctreepatch ` files placed
52
- anywhere in the ` BepInEx/plugins ` folder or any subfolder.**
50
+ To load a terrain patch, just distribute your ` .optoctreepatch ` file alongside your mod. ** Terrain
51
+ Patcher will find and load all ` .optoctreepatch ` files placed anywhere in the ` BepInEx/plugins `
52
+ folder or any subfolder** , so you don't need to do anything else to make sure your terrain patch
53
+ gets loaded.
53
54
54
- Alternatively, you can add your ` .optoctreepatch ` file to your project as an embedded resource and
55
- add ` TerrainPatcher.dll ` as a reference. You can then use ` Assembly.GetManifestResourceStream ` (as
56
- demonstrated in [ ` ExampleMod.cs ` ] ( ./examples/ExampleMod.cs ) ) to load the resource. If you pass this
57
- stream to ` TerrainRegistry.PatchTerrain ` , Terrain Patcher will apply your patch file. Below is an
58
- example of how to do this.
59
-
60
- ``` cs
61
- var asm = System .Reflection .Assembly .GetExecutingAssembly ();
62
- var patch = asm .GetManifestResourceStream (" MyModName.my-file-name.optoctreepatch" );
63
- TerrainPatcher .TerrainRegistry .PatchTerrain (" my-file-name" , patch );
64
- ```
65
-
66
- Using ` TerrainRegistry.PatchTerrain ` to load terrain patches may be deprecated in a future release.
55
+ Terrain patcher also currently supports loading patches via the
56
+ ` TerrainPatcher.TerrainRegistry.PatchTerrain ` method, but this method is deprecated and may be
57
+ removed in a future release of Terrain Patcher.
67
58
68
59
### Dependency Registration
69
60
70
- Regardless of which method you use to load terrain patches, you'll need to add Terrain Patcher as a
71
- dependency of your mod.
61
+ If your mod contains terrain patches, you should add Terrain Patcher as a dependency of your mod.
72
62
73
63
If your mod ** requires** Terrain Patcher to function, add the
74
64
` [BepInDependency("Esper89.TerrainPatcher")] ` attribute to your mod's entry point (below the
@@ -94,11 +84,11 @@ internal class Mod : BaseUnityPlugin { /* ... */ }
94
84
95
85
Terrain Patcher is licensed under the GNU AGPL, which says that derivative works must also be
96
86
licensed under the GNU AGPL. If your mod directly interacts with Terrain Patcher (e.g. by
97
- referencing ` TerrainPatcher.dll ` and calling ` TerrainPatcher.TerrainRegistry.PatchTerrain ` ), it
98
- might be considered a derivative work. To avoid any possible copyright issues, if your mod isn't
99
- licensed under the GNU AGPL, you should avoid referencing ` TerrainPatcher.dll ` or otherwise
100
- interacting with Terrain Patcher directly. Patches can still be loaded without referencing Terrain
101
- Patcher by distributing them alongside your mod as separate ` .optoctreepatch ` files.
87
+ referencing ` TerrainPatcher.dll ` ), it might be considered a derivative work. To avoid any possible
88
+ copyright issues, if your mod isn't licensed under the GNU AGPL, you should avoid referencing
89
+ ` TerrainPatcher.dll ` or otherwise interacting with Terrain Patcher directly. Terrain patches are
90
+ loaded without referencing Terrain Patcher by distributing them alongside your mod as separate
91
+ ` .optoctreepatch ` files.
102
92
103
93
## Patch Format
104
94
0 commit comments