This file contains hidden or 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
| void Main() | |
| { | |
| var harmony = new Harmony("test"); | |
| Harmony.DEBUG = true; | |
| harmony.PatchAll(); | |
| Class.Test(); | |
| } | |
| [HarmonyPriority(Priority.High)] | |
| [HarmonyPatch(typeof(Class), nameof(Class.Test))] |
This file contains hidden or 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
| static void Main(string[] args) | |
| { | |
| var test = new Test(); | |
| Console.WriteLine($"--> OriginalMethod={test.OriginalMethod(0, "foobartest")}"); | |
| Console.WriteLine(""); | |
| Console.WriteLine($"--> OriginalMethod={test.OriginalMethod(123, "foobartest")}"); | |
| Console.WriteLine(""); | |
| // patching would happen here |
This file contains hidden or 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
| /* | |
| The following code creates this class: | |
| using System; | |
| public static void Method1() | |
| { | |
| try | |
| { | |
| Console.WriteLine("code"); | |
| } |
This file contains hidden or 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
| using HarmonyLib; | |
| using RimWorld; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using Verse; | |
| namespace Brrainz | |
| { | |
| [StaticConstructorOnStartup] |
This file contains hidden or 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
| REM ################ Mod build and install script (c) Andreas Pardeike 2020 ################ | |
| REM | |
| REM Call this script from Visual Studio's Build Events post-build event command line box: | |
| REM "$(ProjectDir)Install.bat" $(ConfigurationName) "$(ProjectDir)" "$(ProjectName)" "About Assemblies Languages Textures v1.1" "LoadFolders.xml" | |
| REM | |
| REM The project structure should look like this: | |
| REM | |
| REM Modname | |
| REM +- .git | |
| REM +- .vs |
This file contains hidden or 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
| using System; | |
| using System.Collections.Generic; | |
| using HarmonyLib; | |
| using Verse; | |
| public class Debouncer | |
| { | |
| private Debouncer() { } | |
| private readonly int tickThrottle; | |
| private readonly bool onlyWhenRunning; |
This file contains hidden or 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
| using HarmonyLib; | |
| using System.Runtime.CompilerServices; | |
| namespace HarmonyTestbed; | |
| public struct Class6Struct | |
| { | |
| public double d1; | |
| public double d2; | |
| public double d3; |
This file contains hidden or 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
| <Personality> | |
| <azureVoice>en-US-AnaNeural</azureVoice> | |
| <azureVoiceStyle>default</azureVoiceStyle> | |
| <azureVoiceStyleDegree>0</azureVoiceStyleDegree> | |
| <speechRate>0</speechRate> | |
| <speechPitch>0</speechPitch> | |
| <phrasesLimit>40</phrasesLimit> | |
| <phraseBatchSize>20</phraseBatchSize> | |
| <phraseDelayMin>1</phraseDelayMin> | |
| <phraseDelayMax>1</phraseDelayMax> |
This file contains hidden or 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
| <Personality> | |
| <azureVoiceLanguage>English</azureVoiceLanguage> | |
| <azureVoice>en-US-JasonNeural</azureVoice> | |
| <azureVoiceStyle>default</azureVoiceStyle> | |
| <azureVoiceStyleDegree>2</azureVoiceStyleDegree> | |
| <speechLanguage></speechLanguage> | |
| <speechRate>-0.12</speechRate> | |
| <speechPitch>-0.269999981</speechPitch> | |
| <phrasesLimit>40</phrasesLimit> | |
| <phraseBatchSize>20</phraseBatchSize> |