Creating a Patch class
The following Patch class will use HarmonyX to allow us to modify how GTFO behaves
First, in Visual Studio, click Project > Add Class and change Class1.cs to Patch.cs
Next replace the pre-generated code with the following
After that go back to our Plugin class and add the following line to your Load method
You can now compile the plugin and when you click the About Rundown button in-game you will unlock a new rundown
Explaining how this works
When the plugin loads it will create a Harmony instance and apply our patch using the attributes we gave to the MyPatch method. When an object of CM_PageRundown_New calls the Setup method our code will be executed. Our patch replaces the action of the about rundown button with our own code.
If multiple patch classes are desired first create a harmony instance and then use the types
To find more information on how to use HarmonyX please reference their Github Wiki
Last updated