├── .gitattributes ├── .github └── workflows │ └── build.yml ├── .gitignore ├── LICENSE ├── README.md ├── assets ├── modinfo.json └── thumbnail.png ├── lib ├── Assembly-CSharp-firstpass.dll ├── BepInEx.dll ├── BepInEx.xml ├── HOOKS-Assembly-CSharp.dll ├── Mono.Cecil.Rocks.dll ├── Mono.Cecil.dll ├── MonoMod.RuntimeDetour.dll ├── MonoMod.RuntimeDetour.xml ├── MonoMod.Utils.dll ├── MonoMod.Utils.xml ├── MonoMod.dll ├── PUBLIC-Assembly-CSharp.dll ├── UnityEngine.CoreModule.dll └── UnityEngine.dll └── src ├── Plugin.cs └── TestMod.csproj /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: [push] 4 | 5 | jobs: 6 | build: 7 | name: Build .NET assemblies 8 | runs-on: ubuntu-latest 9 | env: 10 | ACTIONS_ALLOW_UNSECURE_COMMANDS: true 11 | steps: 12 | - name: Check out repo 13 | uses: actions/checkout@v3 14 | - name: Set up .NET 15 | uses: actions/setup-dotnet@v3 16 | with: 17 | dotnet-version: '7.0.x' 18 | - name: Build solution 19 | run: dotnet publish src -c Release -o output 20 | - name: Upload artifacts 21 | uses: actions/upload-artifact@v3 22 | with: 23 | path: | 24 | output/*.dll 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Ll]og/ 33 | [Ll]ogs/ 34 | 35 | # Visual Studio 2015/2017 cache/options directory 36 | .vs/ 37 | # Uncomment if you have tasks that create the project's static files in wwwroot 38 | #wwwroot/ 39 | 40 | # Visual Studio 2017 auto generated files 41 | Generated\ Files/ 42 | 43 | # MSTest test Results 44 | [Tt]est[Rr]esult*/ 45 | [Bb]uild[Ll]og.* 46 | 47 | # NUnit 48 | *.VisualState.xml 49 | TestResult.xml 50 | nunit-*.xml 51 | 52 | # Build Results of an ATL Project 53 | [Dd]ebugPS/ 54 | [Rr]eleasePS/ 55 | dlldata.c 56 | 57 | # Benchmark Results 58 | BenchmarkDotNet.Artifacts/ 59 | 60 | # .NET Core 61 | project.lock.json 62 | project.fragment.lock.json 63 | artifacts/ 64 | 65 | # ASP.NET Scaffolding 66 | ScaffoldingReadMe.txt 67 | 68 | # StyleCop 69 | StyleCopReport.xml 70 | 71 | # Files built by Visual Studio 72 | *_i.c 73 | *_p.c 74 | *_h.h 75 | *.ilk 76 | *.meta 77 | *.obj 78 | *.iobj 79 | *.pch 80 | *.pdb 81 | *.ipdb 82 | *.pgc 83 | *.pgd 84 | *.rsp 85 | *.sbr 86 | *.tlb 87 | *.tli 88 | *.tlh 89 | *.tmp 90 | *.tmp_proj 91 | *_wpftmp.csproj 92 | *.log 93 | *.tlog 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio 6 auto-generated project file (contains which files were open etc.) 298 | *.vbp 299 | 300 | # Visual Studio 6 workspace and project file (working project files containing files to include in project) 301 | *.dsw 302 | *.dsp 303 | 304 | # Visual Studio 6 technical files 305 | *.ncb 306 | *.aps 307 | 308 | # Visual Studio LightSwitch build output 309 | **/*.HTMLClient/GeneratedArtifacts 310 | **/*.DesktopClient/GeneratedArtifacts 311 | **/*.DesktopClient/ModelManifest.xml 312 | **/*.Server/GeneratedArtifacts 313 | **/*.Server/ModelManifest.xml 314 | _Pvt_Extensions 315 | 316 | # Paket dependency manager 317 | .paket/paket.exe 318 | paket-files/ 319 | 320 | # FAKE - F# Make 321 | .fake/ 322 | 323 | # CodeRush personal settings 324 | .cr/personal 325 | 326 | # Python Tools for Visual Studio (PTVS) 327 | __pycache__/ 328 | *.pyc 329 | 330 | # Cake - Uncomment if you are using it 331 | # tools/** 332 | # !tools/packages.config 333 | 334 | # Tabs Studio 335 | *.tss 336 | 337 | # Telerik's JustMock configuration file 338 | *.jmconfig 339 | 340 | # BizTalk build output 341 | *.btp.cs 342 | *.btm.cs 343 | *.odx.cs 344 | *.xsd.cs 345 | 346 | # OpenCover UI analysis results 347 | OpenCover/ 348 | 349 | # Azure Stream Analytics local run output 350 | ASALocalRun/ 351 | 352 | # MSBuild Binary and Structured Log 353 | *.binlog 354 | 355 | # NVidia Nsight GPU debugger configuration file 356 | *.nvuser 357 | 358 | # MFractors (Xamarin productivity tool) working folder 359 | .mfractor/ 360 | 361 | # Local History for Visual Studio 362 | .localhistory/ 363 | 364 | # Visual Studio History (VSHistory) files 365 | .vshistory/ 366 | 367 | # BeatPulse healthcheck temp database 368 | healthchecksdb 369 | 370 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 371 | MigrationBackup/ 372 | 373 | # Ionide (cross platform F# VS Code tools) working folder 374 | .ionide/ 375 | 376 | # Fody - auto-generated XML schema 377 | FodyWeavers.xsd 378 | 379 | # VS Code files for those working on multiple tools 380 | .vscode/* 381 | !.vscode/settings.json 382 | !.vscode/tasks.json 383 | !.vscode/launch.json 384 | !.vscode/extensions.json 385 | *.code-workspace 386 | 387 | # Local History for Visual Studio Code 388 | .history/ 389 | 390 | # Windows Installer files from build outputs 391 | *.cab 392 | *.msi 393 | *.msix 394 | *.msm 395 | *.msp 396 | 397 | # JetBrains Rider 398 | *.sln.iml 399 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Use this template on GitHub or just [download the code](https://github.com/Dual-Iron/TestMod/archive/refs/heads/master.zip), whichever is easiest. 2 | 3 | Rename `src/TestMod.csproj`, then edit `assets/modinfo.json` and `src/Plugin.cs` to customize your mod. 4 | 5 | See [the modding wiki](https://rainworldmodding.miraheze.org/wiki/Downpour_Reference/Mod_Directories) for `modinfo.json` documentation. 6 | -------------------------------------------------------------------------------- /assets/modinfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "testmod", 3 | "name": "Test Mod", 4 | "version": "0.1.0", 5 | "authors": "Author", 6 | "target_game_version": "v1.9", 7 | "description": "Put a neat description here", 8 | "tags": [], 9 | "requirements": [], 10 | "requirements_names": [], 11 | "checksum_override_version": false 12 | } 13 | -------------------------------------------------------------------------------- /assets/thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dual-Iron/TestMod/e060cd1bdc11500545b10ba6e706b1568da9c865/assets/thumbnail.png -------------------------------------------------------------------------------- /lib/Assembly-CSharp-firstpass.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dual-Iron/TestMod/e060cd1bdc11500545b10ba6e706b1568da9c865/lib/Assembly-CSharp-firstpass.dll -------------------------------------------------------------------------------- /lib/BepInEx.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dual-Iron/TestMod/e060cd1bdc11500545b10ba6e706b1568da9c865/lib/BepInEx.dll -------------------------------------------------------------------------------- /lib/BepInEx.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | BepInEx 5 | 6 | 7 | 8 | 9 | Base type of all classes representing and enforcing acceptable values of config settings. 10 | 11 | 12 | 13 | Type of values that this class can Clamp. 14 | 15 | 16 | 17 | Change the value to be acceptable, if it's not already. 18 | 19 | 20 | 21 | 22 | Check if the value is an acceptable value. 23 | 24 | 25 | 26 | 27 | Type of the supported values. 28 | 29 | 30 | 31 | 32 | Get the string for use in config files. 33 | 34 | 35 | 36 | 37 | Specify the list of acceptable values for a setting. 38 | 39 | 40 | 41 | 42 | List of values that a setting can take. 43 | 44 | 45 | 46 | 47 | Specify the list of acceptable values for a setting. 48 | If the setting does not equal any of the values, it will be set to the first one. 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | Specify the range of acceptable values for a setting. 63 | 64 | 65 | 66 | Lowest acceptable value 67 | Highest acceptable value 68 | 69 | 70 | 71 | Lowest acceptable value 72 | 73 | 74 | 75 | 76 | Highest acceptable value 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | Provides access to a single setting inside of a . 91 | 92 | Type of the setting. 93 | 94 | 95 | 96 | Fired when the setting is changed. Does not detect changes made outside from this object. 97 | 98 | 99 | 100 | 101 | Value of this setting. 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | Container for a single setting of a . 110 | Each config entry is linked to one config file. 111 | 112 | 113 | 114 | 115 | Types of defaultValue and definition.AcceptableValues have to be the same as settingType. 116 | 117 | 118 | 119 | 120 | Config file this entry is a part of. 121 | 122 | 123 | 124 | 125 | Category and name of this setting. Used as a unique key for identification within a . 126 | 127 | 128 | 129 | 130 | Description / metadata of this setting. 131 | 132 | 133 | 134 | 135 | Type of the that this setting holds. 136 | 137 | 138 | 139 | 140 | Default value of this setting (set only if the setting was not changed before). 141 | 142 | 143 | 144 | 145 | Get or set the value of the setting. 146 | 147 | 148 | 149 | 150 | Get the serialized representation of the value. 151 | 152 | 153 | 154 | 155 | Set the value by using its serialized form. 156 | 157 | 158 | 159 | 160 | If necessary, clamp the value to acceptable value range. T has to be equal to settingType. 161 | 162 | 163 | 164 | 165 | Trigger setting changed event. 166 | 167 | 168 | 169 | 170 | Write a description of this setting using all available metadata. 171 | 172 | 173 | 174 | 175 | Section and key of a setting. Used as a unique key for identification within a . 176 | The same definition can be used in multiple config files, it will point to different settings then. 177 | 178 | 179 | 180 | 181 | 182 | Group of the setting. All settings within a config file are grouped by this. 183 | 184 | 185 | 186 | 187 | Name of the setting. 188 | 189 | 190 | 191 | 192 | Create a new definition. Definitions with same section and key are equal. 193 | 194 | Group of the setting, case sensitive. 195 | Name of the setting, case sensitive. 196 | 197 | 198 | 199 | 200 | 201 | 202 | Check if the definitions are the same. 203 | 204 | 205 | 206 | 207 | 208 | Check if the definitions are the same. 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | Check if the definitions are the same. 217 | 218 | 219 | 220 | 221 | Check if the definitions are the same. 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | Metadata of a . 230 | 231 | 232 | 233 | 234 | Create a new description. 235 | 236 | Text describing the function of the setting and any notes or warnings. 237 | Range of values that this setting can take. The setting's value will be automatically clamped. 238 | Objects that can be used by user-made classes to add functionality. 239 | 240 | 241 | 242 | Text describing the function of the setting and any notes or warnings. 243 | 244 | 245 | 246 | 247 | Range of acceptable values for a setting. 248 | 249 | 250 | 251 | 252 | Objects that can be used by user-made classes to add functionality. 253 | 254 | 255 | 256 | 257 | An empty description. 258 | 259 | 260 | 261 | 262 | A helper class to handle persistent data. All public methods are thread-safe. 263 | 264 | 265 | 266 | 267 | All config entries inside 268 | 269 | 270 | 271 | 272 | Create a list with all config entries inside of this config file. 273 | 274 | 275 | 276 | 277 | Create an array with all config entries inside of this config file. Should be only used for metadata purposes. 278 | If you want to access and modify an existing setting then use 279 | instead with no description. 280 | 281 | 282 | 283 | 284 | Full path to the config file. The file might not exist until a setting is added and changed, or is called. 285 | 286 | 287 | 288 | 289 | If enabled, writes the config to disk every time a value is set. 290 | If disabled, you have to manually use or the changes will be lost! 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | Create a new config file at the specified config path. 299 | 300 | Full path to a file that contains settings. The file will be created as needed. 301 | If the config file/directory doesn't exist, create it immediately. 302 | Information about the plugin that owns this setting file. 303 | 304 | 305 | 306 | Reloads the config from disk. Unsaved changes are lost. 307 | 308 | 309 | 310 | 311 | Writes the config to disk. 312 | 313 | 314 | 315 | 316 | Access one of the existing settings. If the setting has not been added yet, null is returned. 317 | If the setting exists but has a different type than T, an exception is thrown. 318 | New settings should be added with . 319 | 320 | Type of the value contained in this setting. 321 | Section and Key of the setting. 322 | 323 | 324 | 325 | Access one of the existing settings. If the setting has not been added yet, null is returned. 326 | If the setting exists but has a different type than T, an exception is thrown. 327 | New settings should be added with . 328 | 329 | Type of the value contained in this setting. 330 | Section/category/group of the setting. Settings are grouped by this. 331 | Name of the setting. 332 | 333 | 334 | 335 | Access one of the existing settings. If the setting has not been added yet, false is returned. Otherwise, true. 336 | If the setting exists but has a different type than T, an exception is thrown. 337 | New settings should be added with . 338 | 339 | Type of the value contained in this setting. 340 | Section and Key of the setting. 341 | The ConfigEntry value to return. 342 | 343 | 344 | 345 | Access one of the existing settings. If the setting has not been added yet, null is returned. 346 | If the setting exists but has a different type than T, an exception is thrown. 347 | New settings should be added with . 348 | 349 | Type of the value contained in this setting. 350 | Section/category/group of the setting. Settings are grouped by this. 351 | Name of the setting. 352 | The ConfigEntry value to return. 353 | 354 | 355 | 356 | Create a new setting. The setting is saved to drive and loaded automatically. 357 | Each definition can be used to add only one setting, trying to add a second setting will throw an exception. 358 | 359 | Type of the value contained in this setting. 360 | Section and Key of the setting. 361 | Value of the setting if the setting was not created yet. 362 | Description of the setting shown to the user and other metadata. 363 | 364 | 365 | 366 | Create a new setting. The setting is saved to drive and loaded automatically. 367 | Each section and key pair can be used to add only one setting, trying to add a second setting will throw an exception. 368 | 369 | Type of the value contained in this setting. 370 | Section/category/group of the setting. Settings are grouped by this. 371 | Name of the setting. 372 | Value of the setting if the setting was not created yet. 373 | Description of the setting shown to the user and other metadata. 374 | 375 | 376 | 377 | Create a new setting. The setting is saved to drive and loaded automatically. 378 | Each section and key pair can be used to add only one setting, trying to add a second setting will throw an exception. 379 | 380 | Type of the value contained in this setting. 381 | Section/category/group of the setting. Settings are grouped by this. 382 | Name of the setting. 383 | Value of the setting if the setting was not created yet. 384 | Simple description of the setting shown to the user. 385 | 386 | 387 | 388 | Create a new setting. The setting is saved to drive and loaded automatically. 389 | Each definition can be used to add only one setting, trying to add a second setting will throw an exception. 390 | 391 | Type of the value contained in this setting. 392 | Section and Key of the setting. 393 | Value of the setting if the setting was not created yet. 394 | Description of the setting shown to the user and other metadata. 395 | 396 | 397 | 398 | Create a new setting. The setting is saved to drive and loaded automatically. 399 | Each section and key pair can be used to add only one setting, trying to add a second setting will throw an exception. 400 | 401 | Type of the value contained in this setting. 402 | Section/category/group of the setting. Settings are grouped by this. 403 | Name of the setting. 404 | Value of the setting if the setting was not created yet. 405 | Description of the setting shown to the user and other metadata. 406 | 407 | 408 | 409 | Create a new setting. The setting is saved to drive and loaded automatically. 410 | Each section and key pair can be used to add only one setting, trying to add a second setting will throw an exception. 411 | 412 | Type of the value contained in this setting. 413 | Section/category/group of the setting. Settings are grouped by this. 414 | Name of the setting. 415 | Value of the setting if the setting was not created yet. 416 | Simple description of the setting shown to the user. 417 | 418 | 419 | 420 | Access a setting. Use Bind instead. 421 | 422 | 423 | 424 | 425 | Access a setting. Use Bind instead. 426 | 427 | 428 | 429 | 430 | An event that is fired every time the config is reloaded. 431 | 432 | 433 | 434 | 435 | Fired when one of the settings is changed. 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | Returns the ConfigDefinitions that the ConfigFile contains. 478 | Creates a new array when the property is accessed. Thread-safe. 479 | 480 | 481 | 482 | 483 | Returns the ConfigEntryBase values that the ConfigFile contains. 484 | Creates a new array when the property is accessed. Thread-safe. 485 | 486 | 487 | 488 | 489 | Provides access to a single setting inside of a . 490 | 491 | Type of the setting. 492 | 493 | 494 | 495 | Entry of this setting in the . 496 | 497 | 498 | 499 | 500 | Unique definition of this setting. 501 | 502 | 503 | 504 | 505 | Config file this setting is inside of. 506 | 507 | 508 | 509 | 510 | Fired when the setting is changed. Does not detect changes made outside from this object. 511 | 512 | 513 | 514 | 515 | Value of this setting. 516 | 517 | 518 | 519 | 520 | A keyboard shortcut that can be used in Update method to check if user presses a key combo. The shortcut is only 521 | triggered when the user presses the exact combination. For example, F + LeftCtrl will trigger only if user 522 | presses and holds only LeftCtrl, and then presses F. If any other keys are pressed, the shortcut will not trigger. 523 | 524 | Can be used as a value of a setting in 525 | to allow user to change this shortcut and have the changes saved. 526 | 527 | How to use: Use in this class instead of in the Update loop. 528 | 529 | 530 | 531 | 532 | Shortcut that never triggers. 533 | 534 | 535 | 536 | 537 | All KeyCode values that can be used in a keyboard shortcut. 538 | 539 | 540 | 541 | 542 | Create a new keyboard shortcut. 543 | 544 | Main key to press 545 | Keys that should be held down before main key is registered 546 | 547 | 548 | 549 | Main key of the key combination. It has to be pressed / let go last for the combination to be triggered. 550 | If the combination is empty, is returned. 551 | 552 | 553 | 554 | 555 | Modifiers of the key combination, if any. 556 | 557 | 558 | 559 | 560 | Attempt to deserialize key combination from the string. 561 | 562 | 563 | 564 | 565 | Serialize the key combination into a user readable string. 566 | 567 | 568 | 569 | 570 | Check if the main key was just pressed (Input.GetKeyDown), and specified modifier keys are all pressed 571 | 572 | 573 | 574 | 575 | Check if the main key is currently held down (Input.GetKey), and specified modifier keys are all pressed 576 | 577 | 578 | 579 | 580 | Check if the main key was just lifted (Input.GetKeyUp), and specified modifier keys are all pressed. 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | Arguments for events concerning a change of a setting. 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | Setting that was changed 604 | 605 | 606 | 607 | 608 | Serializer/deserializer used by the config system. 609 | 610 | 611 | 612 | 613 | Convert object of a given type to a string using available converters. 614 | 615 | 616 | 617 | 618 | Convert string to an object of a given type using available converters. 619 | 620 | 621 | 622 | 623 | Convert string to an object of a given type using available converters. 624 | 625 | 626 | 627 | 628 | Get a converter for a given type if there is any. 629 | 630 | 631 | 632 | 633 | Add a new type converter for a given type. 634 | If a different converter is already added, this call is ignored and false is returned. 635 | 636 | 637 | 638 | 639 | Check if a given type can be converted to and from string. 640 | 641 | 642 | 643 | 644 | Give a list of types with registered converters. 645 | 646 | 647 | 648 | 649 | For types that are in assemblies that can't get loaded before preloader runs (or it won't work on these assemblies) 650 | 651 | 652 | 653 | 654 | A serializer/deserializer combo for some type(s). Used by the config system. 655 | 656 | 657 | 658 | 659 | Used to serialize the type into a (hopefully) human-readable string. 660 | Object is the instance to serialize, Type is the object's type. 661 | 662 | 663 | 664 | 665 | Used to deserialize the type from a string. 666 | String is the data to deserialize, Type is the object's type, should return instance to an object of Type. 667 | 668 | 669 | 670 | 671 | True if an external console has been started, false otherwise. 672 | 673 | 674 | 675 | 676 | The stream that writes to the standard out stream of the process. Should never be null. 677 | 678 | 679 | 680 | 681 | The stream that writes to an external console. Null if no such console exists 682 | 683 | 684 | 685 | 686 | Data class that represents information about a loadable BepInEx plugin. 687 | Contains all metadata and additional info required for plugin loading by . 688 | 689 | 690 | 691 | 692 | General metadata about a plugin. 693 | 694 | 695 | 696 | 697 | Collection of attributes that describe what processes the plugin can run on. 698 | 699 | 700 | 701 | 702 | Collection of attributes that describe what plugins this plugin depends on. 703 | 704 | 705 | 706 | 707 | Collection of attributes that describe what plugins this plugin 708 | is incompatible with. 709 | 710 | 711 | 712 | 713 | File path to the plugin DLL 714 | 715 | 716 | 717 | 718 | Instance of the plugin that represents this info. NULL if no plugin is instantiated from info (yet) 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | This attribute denotes that a class is a plugin, and specifies the required metadata. 727 | 728 | 729 | 730 | 731 | The unique identifier of the plugin. Should not change between plugin versions. 732 | 733 | 734 | 735 | 736 | The user friendly name of the plugin. Is able to be changed between versions. 737 | 738 | 739 | 740 | 741 | The specfic version of the plugin. 742 | 743 | 744 | 745 | The unique identifier of the plugin. Should not change between plugin versions. 746 | The user friendly name of the plugin. Is able to be changed between versions. 747 | The specfic version of the plugin. 748 | 749 | 750 | 751 | This attribute specifies any dependencies that this plugin has on other plugins. 752 | 753 | 754 | 755 | 756 | Flags that are applied to a dependency 757 | 758 | 759 | 760 | 761 | The plugin has a hard dependency on the referenced plugin, and will not run without it. 762 | 763 | 764 | 765 | 766 | This plugin has a soft dependency on the referenced plugin, and is able to run without it. 767 | 768 | 769 | 770 | 771 | The GUID of the referenced plugin. 772 | 773 | 774 | 775 | 776 | The flags associated with this dependency definition. 777 | 778 | 779 | 780 | 781 | The minimum version of the referenced plugin. 782 | 783 | 784 | 785 | 786 | Marks this as depenant on another plugin. The other plugin will be loaded before this one. 787 | If the other plugin doesn't exist, what happens depends on the parameter. 788 | 789 | The GUID of the referenced plugin. 790 | The flags associated with this dependency definition. 791 | 792 | 793 | 794 | Marks this as depenant on another plugin. The other plugin will be loaded before this one. 795 | If the other plugin doesn't exist or is of a version below , this plugin will not load and an error will be logged instead. 796 | 797 | The GUID of the referenced plugin. 798 | The minimum version of the referenced plugin. 799 | When version is supplied the dependency is always treated as HardDependency 800 | 801 | 802 | 803 | This attribute specifies other plugins that are incompatible with this plugin. 804 | 805 | 806 | 807 | 808 | The GUID of the referenced plugin. 809 | 810 | 811 | 812 | 813 | Marks this as incompatible with another plugin. 814 | If the other plugin exists, this plugin will not be loaded and a warning will be shown. 815 | 816 | The GUID of the referenced plugin. 817 | 818 | 819 | 820 | This attribute specifies which processes this plugin should be run for. Not specifying this attribute will load the plugin under every process. 821 | 822 | 823 | 824 | 825 | The name of the process that this plugin will run under. 826 | 827 | 828 | 829 | The name of the process that this plugin will run under. 830 | 831 | 832 | 833 | Helper class to use for retrieving metadata about a plugin, defined as attributes. 834 | 835 | 836 | 837 | 838 | Retrieves the BepInPlugin metadata from a plugin type. 839 | 840 | The plugin type. 841 | The BepInPlugin metadata of the plugin type. 842 | 843 | 844 | 845 | Retrieves the BepInPlugin metadata from a plugin instance. 846 | 847 | The plugin instance. 848 | The BepInPlugin metadata of the plugin instance. 849 | 850 | 851 | 852 | Gets the specified attributes of a type, if they exist. 853 | 854 | The attribute type to retrieve. 855 | The plugin type. 856 | The attributes of the type, if existing. 857 | 858 | 859 | 860 | Gets the specified attributes of an instance, if they exist. 861 | 862 | The attribute type to retrieve. 863 | The plugin instance. 864 | The attributes of the instance, if existing. 865 | 866 | 867 | 868 | Retrieves the dependencies of the specified plugin type. 869 | 870 | The plugin type. 871 | A list of all plugin types that the specified plugin type depends upon. 872 | 873 | 874 | 875 | This class is appended to AssemblyInfo.cs when BepInEx is built via a CI pipeline. 876 | It is mainly intended to signify that the current build is not a release build and is special, like for instance a bleeding edge build. 877 | 878 | 879 | 880 | 881 | The manager and loader for all plugins, and the entry point for BepInEx plugin system. 882 | 883 | 884 | 885 | 886 | The loaded and initialized list of plugins. 887 | 888 | 889 | 890 | 891 | List of all loaded via the chainloader. 892 | 893 | 894 | 895 | 896 | Collection of error chainloader messages that occured during plugin loading. 897 | Contains information about what certain plugins were not loaded. 898 | 899 | 900 | 901 | 902 | The GameObject that all plugins are attached to as components. 903 | 904 | 905 | 906 | 907 | Initializes BepInEx to be able to start the chainloader. 908 | 909 | 910 | 911 | 912 | Analyzes the given type definition and attempts to convert it to a valid 913 | 914 | Type definition to analyze. 915 | If the type represent a valid plugin, returns a instance. Otherwise, return null. 916 | 917 | 918 | 919 | The entrypoint for the BepInEx plugin system. 920 | 921 | 922 | 923 | 924 | A cacheable metadata item. Can be used with and to cache plugin metadata. 925 | 926 | 927 | 928 | 929 | Serialize the object into a binary format. 930 | 931 | 932 | 933 | 934 | 935 | Loads the object from binary format. 936 | 937 | 938 | 939 | 940 | 941 | A cached assembly. 942 | 943 | 944 | 945 | 946 | 947 | List of cached items inside the assembly. 948 | 949 | 950 | 951 | 952 | Timestamp of the assembly. Used to check the age of the cache. 953 | 954 | 955 | 956 | 957 | Provides methods for loading specified types from an assembly. 958 | 959 | 960 | 961 | 962 | Default assembly resolved used by the 963 | 964 | 965 | 966 | 967 | Default reader parameters used by 968 | 969 | 970 | 971 | 972 | Event fired when fails to resolve a type during type loading. 973 | 974 | 975 | 976 | 977 | Looks up assemblies in the given directory and locates all types that can be loaded and collects their metadata. 978 | 979 | The specific base type to search for. 980 | The directory to search for assemblies. 981 | A function to check if a type should be selected and to build the type metadata. 982 | A filter function to quickly determine if the assembly can be loaded. 983 | The name of the cache to get cached types from. 984 | A dictionary of all assemblies in the directory and the list of type metadatas of types that match the selector. 985 | 986 | 987 | 988 | Loads an index of type metadatas from a cache. 989 | 990 | Name of the cache 991 | Cacheable item 992 | Cached type metadatas indexed by the path of the assembly that defines the type. If no cache is defined, return null. 993 | 994 | 995 | 996 | Saves indexed type metadata into a cache. 997 | 998 | Name of the cache 999 | List of plugin metadatas indexed by the path to the assembly that contains the types 1000 | Cacheable item 1001 | 1002 | 1003 | 1004 | Converts TypeLoadException to a readable string. 1005 | 1006 | TypeLoadException 1007 | Readable representation of the exception 1008 | 1009 | 1010 | 1011 | The base plugin type that is used by the BepInEx plugin loader. 1012 | 1013 | 1014 | 1015 | 1016 | Information about this plugin as it was loaded. 1017 | 1018 | 1019 | 1020 | 1021 | Logger instance tied to this plugin. 1022 | 1023 | 1024 | 1025 | 1026 | Default config file tied to this plugin. The config file will not be created until 1027 | any settings are added and changed, or is called. 1028 | 1029 | 1030 | 1031 | 1032 | Create a new instance of a plugin and all of its tied in objects. 1033 | 1034 | BepInPlugin attribute is missing. 1035 | 1036 | 1037 | 1038 | Logs entries using Unity specific outputs. 1039 | 1040 | 1041 | 1042 | 1043 | Log levels to display. 1044 | 1045 | 1046 | 1047 | 1048 | Writer for the disk log. 1049 | 1050 | 1051 | 1052 | 1053 | Timer for flushing the logs to a file. 1054 | 1055 | 1056 | 1057 | 1058 | Whether to write Unity log messages to disk log. 1059 | 1060 | 1061 | 1062 | 1063 | Creates a new disk log listener. 1064 | 1065 | Path to the log. 1066 | Log levels to display. 1067 | Whether to append logs to an already existing log file. 1068 | Whether to include Unity log into the disk log. 1069 | 1070 | 1071 | 1072 | 1073 | 1074 | 1075 | 1076 | 1077 | 1078 | Disposes of Disk logger 1079 | 1080 | 1081 | 1082 | 1083 | Log event arguments. Contains info about the log message. 1084 | 1085 | 1086 | 1087 | 1088 | Logged data. 1089 | 1090 | 1091 | 1092 | 1093 | Log levels for the data. 1094 | 1095 | 1096 | 1097 | 1098 | Log source that emitted the log event. 1099 | 1100 | 1101 | 1102 | 1103 | Creates the log event args- 1104 | 1105 | Logged data. 1106 | Log level of the data. 1107 | Log source that emits these args. 1108 | 1109 | 1110 | 1111 | 1112 | 1113 | 1114 | Like but appends newline at the end. 1115 | 1116 | Same output as but with new line. 1117 | 1118 | 1119 | 1120 | A static Logger instance. 1121 | 1122 | 1123 | 1124 | 1125 | Collection of all log listeners that receive log events. 1126 | 1127 | 1128 | 1129 | 1130 | Collection of all log source that output log events. 1131 | 1132 | 1133 | 1134 | 1135 | Logs an entry to the current logger instance. 1136 | 1137 | The level of the entry. 1138 | The textual value of the entry. 1139 | 1140 | 1141 | 1142 | Creates a new log source with a name and attaches it to log sources. 1143 | 1144 | Name of the log source to create. 1145 | An instance of that allows to write logs. 1146 | 1147 | 1148 | 1149 | The level, or severity of a log entry. 1150 | 1151 | 1152 | 1153 | 1154 | No level selected. 1155 | 1156 | 1157 | 1158 | 1159 | A fatal error has occurred, which cannot be recovered from. 1160 | 1161 | 1162 | 1163 | 1164 | An error has occured, but can be recovered from. 1165 | 1166 | 1167 | 1168 | 1169 | A warning has been produced, but does not necessarily mean that something wrong has happened. 1170 | 1171 | 1172 | 1173 | 1174 | An important message that should be displayed to the user. 1175 | 1176 | 1177 | 1178 | 1179 | A message of low importance. 1180 | 1181 | 1182 | 1183 | 1184 | A message that would likely only interest a developer. 1185 | 1186 | 1187 | 1188 | 1189 | All log levels. 1190 | 1191 | 1192 | 1193 | 1194 | Helper methods for log level handling. 1195 | 1196 | 1197 | 1198 | 1199 | Gets the highest log level when there could potentially be multiple levels provided. 1200 | 1201 | The log level(s). 1202 | The highest log level supplied. 1203 | 1204 | 1205 | 1206 | Returns a translation of a log level to it's associated console colour. 1207 | 1208 | The log level(s). 1209 | A console color associated with the highest log level supplied. 1210 | 1211 | 1212 | 1213 | A generic log listener that receives log events and can route them to some output (e.g. file, console, socket). 1214 | 1215 | 1216 | 1217 | 1218 | Handle an incoming log event. 1219 | 1220 | Log source that sent the event. Don't use; instead use 1221 | Information about the log message. 1222 | 1223 | 1224 | 1225 | Log source that can output log messages. 1226 | 1227 | 1228 | 1229 | 1230 | Name of the log source. 1231 | 1232 | 1233 | 1234 | 1235 | Event that sends the log message. Call to send a log message. 1236 | 1237 | 1238 | 1239 | 1240 | A generic, multi-purpose log source. Exposes simple API to manually emit logs. 1241 | 1242 | 1243 | 1244 | 1245 | 1246 | 1247 | 1248 | 1249 | 1250 | 1251 | Creates a manual log source. 1252 | 1253 | Name of the log source. 1254 | 1255 | 1256 | 1257 | Logs a message with the specified log level. 1258 | 1259 | Log levels to attach to the message. Multiple can be used with bitwise ORing. 1260 | Data to log. 1261 | 1262 | 1263 | 1264 | Logs a message with level. 1265 | 1266 | Data to log. 1267 | 1268 | 1269 | 1270 | Logs a message with level. 1271 | 1272 | Data to log. 1273 | 1274 | 1275 | 1276 | Logs a message with level. 1277 | 1278 | Data to log. 1279 | 1280 | 1281 | 1282 | Logs a message with level. 1283 | 1284 | Data to log. 1285 | 1286 | 1287 | 1288 | Logs a message with level. 1289 | 1290 | Data to log. 1291 | 1292 | 1293 | 1294 | Logs a message with level. 1295 | 1296 | Data to log. 1297 | 1298 | 1299 | 1300 | 1301 | 1302 | 1303 | A source that routes all logs from API to BepInEx logger. 1304 | 1305 | 1306 | 1307 | 1308 | 1309 | Whether Trace logs are rerouted. 1310 | 1311 | 1312 | 1313 | 1314 | Creates a new trace log source. 1315 | 1316 | New log source (or already existing one). 1317 | 1318 | 1319 | 1320 | Internal log source. 1321 | 1322 | 1323 | 1324 | 1325 | Creates a new trace log source. 1326 | 1327 | 1328 | 1329 | 1330 | Writes a message to the underlying instance. 1331 | 1332 | The message to write. 1333 | 1334 | 1335 | 1336 | Writes a message and a newline to the underlying instance. 1337 | 1338 | The message to write. 1339 | 1340 | 1341 | 1342 | 1343 | 1344 | 1345 | 1346 | 1347 | 1348 | Logs entries using Unity specific outputs. 1349 | 1350 | 1351 | 1352 | 1353 | 1354 | 1355 | 1356 | 1357 | 1358 | 1359 | Logs entries using Unity specific outputs. 1360 | 1361 | 1362 | 1363 | 1364 | 1365 | 1366 | 1367 | 1368 | 1369 | 1370 | Logs entries using Unity specific outputs. 1371 | 1372 | 1373 | 1374 | 1375 | 1376 | 1377 | 1378 | 1379 | 1380 | 1381 | Creates a new Unity log source. 1382 | 1383 | 1384 | 1385 | 1386 | 1387 | 1388 | 1389 | Paths used by BepInEx 1390 | 1391 | 1392 | 1393 | 1394 | List of directories from where Mono will search assemblies before assembly resolving is invoked. 1395 | 1396 | 1397 | 1398 | 1399 | The directory that the core BepInEx DLLs reside in. 1400 | 1401 | 1402 | 1403 | 1404 | The path to the core BepInEx DLL. 1405 | 1406 | 1407 | 1408 | 1409 | The path to the main BepInEx folder. 1410 | 1411 | 1412 | 1413 | 1414 | The path of the currently executing program BepInEx is encapsulated in. 1415 | 1416 | 1417 | 1418 | 1419 | The directory that the currently executing process resides in. 1420 | On OSX however, this is the parent directory of the game.app folder. 1421 | 1422 | 1423 | 1424 | 1425 | The path to the Managed folder of the currently running Unity game. 1426 | 1427 | 1428 | 1429 | 1430 | The path to the config directory. 1431 | 1432 | 1433 | 1434 | 1435 | The path to the global BepInEx configuration file. 1436 | 1437 | 1438 | 1439 | 1440 | The path to temporary cache files. 1441 | 1442 | 1443 | 1444 | 1445 | The path to the patcher plugin folder which resides in the BepInEx folder. 1446 | 1447 | 1448 | 1449 | 1450 | The path to the plugin folder which resides in the BepInEx folder. 1451 | 1452 | This is ONLY guaranteed to be set correctly when Chainloader has been initialized. 1453 | 1454 | 1455 | 1456 | 1457 | 1458 | The name of the currently executing process. 1459 | 1460 | 1461 | 1462 | 1463 | Provides methods for running code on other threads and synchronizing with the main thread. 1464 | 1465 | 1466 | 1467 | 1468 | Current instance of the helper. 1469 | 1470 | 1471 | 1472 | 1473 | Gives methods for invoking delegates on the main unity thread, both synchronously and asynchronously. 1474 | Can be used in many built-in framework types, for example 1475 | and to make their events fire on the main unity thread. 1476 | 1477 | 1478 | 1479 | 1480 | Queue the delegate to be invoked on the main unity thread. Use to synchronize your threads. 1481 | 1482 | 1483 | 1484 | 1485 | Queue the delegate to be invoked on a background thread. Use this to run slow tasks without affecting the game. 1486 | NOTE: Most of Unity API can not be accessed while running on another thread! 1487 | 1488 | 1489 | Task to be executed on another thread. Can optionally return an Action that will be executed on the main thread. 1490 | You can use this action to return results of your work safely. Return null if this is not needed. 1491 | 1492 | 1493 | 1494 | 1495 | False if current code is executing on the main unity thread, otherwise True. 1496 | Warning: Will return true before the first frame finishes (i.e. inside plugin Awake and Start methods). 1497 | 1498 | 1499 | 1500 | 1501 | 1502 | Convenience extensions for utilizing multiple threads and using the . 1503 | 1504 | 1505 | 1506 | 1507 | 1508 | 1509 | 1510 | Apply a function to a collection of data by spreading the work on multiple threads. 1511 | Outputs of the functions are returned to the current thread and yielded one by one. 1512 | 1513 | Type of the input values. 1514 | Type of the output values. 1515 | Input values for the work function. 1516 | Function to apply to the data on multiple threads at once. 1517 | Number of worker threads. By default SystemInfo.processorCount is used. 1518 | An exception was thrown inside one of the threads, and the operation was aborted. 1519 | Need at least 1 workerCount. 1520 | 1521 | 1522 | 1523 | Generic helper properties and methods. 1524 | 1525 | 1526 | 1527 | 1528 | Whether current Common Language Runtime supports dynamic method generation using namespace. 1529 | 1530 | 1531 | 1532 | 1533 | An encoding for UTF-8 which does not emit a byte order mark (BOM). 1534 | 1535 | 1536 | 1537 | 1538 | Try to perform an action. 1539 | 1540 | Action to perform. 1541 | Possible exception that gets returned. 1542 | True, if action succeeded, false if an exception occured. 1543 | 1544 | 1545 | 1546 | Combines multiple paths together, as the specific method is not available in .NET 3.5. 1547 | 1548 | The multiple paths to combine together. 1549 | A combined path. 1550 | 1551 | 1552 | 1553 | Returns the parent directory of a path, optionally specifying the amount of levels. 1554 | 1555 | The path to get the parent directory of. 1556 | The amount of levels to traverse. Defaults to 1 1557 | The parent directory. 1558 | 1559 | 1560 | 1561 | Tries to parse a bool, with a default value if unable to parse. 1562 | 1563 | The string to parse 1564 | The value to return if parsing is unsuccessful. 1565 | Boolean value of input if able to be parsed, otherwise default value. 1566 | 1567 | 1568 | 1569 | Converts a file path into a UnityEngine.WWW format. 1570 | 1571 | The file path to convert. 1572 | A converted file path. 1573 | 1574 | 1575 | 1576 | Indicates whether a specified string is null, empty, or consists only of white-space characters. 1577 | 1578 | The string to test. 1579 | True if the value parameter is null or empty, or if value consists exclusively of white-space characters. 1580 | 1581 | 1582 | 1583 | Sorts a given dependency graph using a direct toposort, reporting possible cyclic dependencies. 1584 | 1585 | Nodes to sort 1586 | Function that maps a node to a collection of its dependencies. 1587 | Type of the node in a dependency graph. 1588 | Collection of nodes sorted in the order of least dependencies to the most. 1589 | Thrown when a cyclic dependency occurs. 1590 | 1591 | 1592 | 1593 | Checks whether a given cecil type definition is a subtype of a provided type. 1594 | 1595 | Cecil type definition 1596 | Type to check against 1597 | Whether the given cecil type is a subtype of the type. 1598 | 1599 | 1600 | 1601 | Try to resolve and load the given assembly DLL. 1602 | 1603 | Name of the assembly, of the type . 1604 | Directory to search the assembly from. 1605 | The loaded assembly. 1606 | True, if the assembly was found and loaded. Otherwise, false. 1607 | 1608 | 1609 | 1610 | Try to resolve and load the given assembly DLL. 1611 | 1612 | Name of the assembly, of the type . 1613 | Directory to search the assembly from. 1614 | Reader parameters that contain possible custom assembly resolver. 1615 | The loaded assembly. 1616 | True, if the assembly was found and loaded. Otherwise, false. 1617 | 1618 | 1619 | 1620 | Tries to create a file with the given name 1621 | 1622 | Path of the file to create 1623 | File open mode 1624 | Resulting filestream 1625 | File access options 1626 | File share options 1627 | 1628 | 1629 | 1630 | 1631 | Try to parse given string as an assembly name 1632 | 1633 | Fully qualified assembly name 1634 | Resulting instance 1635 | true, if parsing was successful, otherwise false 1636 | 1637 | On some versions of mono, using fails because it runs on unmanaged side 1638 | which has problems with encoding. 1639 | Using solves this by doing parsing on managed side instead. 1640 | 1641 | 1642 | 1643 | 1644 | Gets unique files in all given directories. If the file with the same name exists in multiple directories, 1645 | only the first occurrence is returned. 1646 | 1647 | Directories to search from. 1648 | File pattern to search. 1649 | Collection of all files in the directories. 1650 | 1651 | 1652 | 1653 | Console class with safe handlers for Unity 4.x, which does not have a proper Console implementation 1654 | 1655 | 1656 | 1657 | 1658 | -------------------------------------------------------------------------------- /lib/HOOKS-Assembly-CSharp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dual-Iron/TestMod/e060cd1bdc11500545b10ba6e706b1568da9c865/lib/HOOKS-Assembly-CSharp.dll -------------------------------------------------------------------------------- /lib/Mono.Cecil.Rocks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dual-Iron/TestMod/e060cd1bdc11500545b10ba6e706b1568da9c865/lib/Mono.Cecil.Rocks.dll -------------------------------------------------------------------------------- /lib/Mono.Cecil.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dual-Iron/TestMod/e060cd1bdc11500545b10ba6e706b1568da9c865/lib/Mono.Cecil.dll -------------------------------------------------------------------------------- /lib/MonoMod.RuntimeDetour.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dual-Iron/TestMod/e060cd1bdc11500545b10ba6e706b1568da9c865/lib/MonoMod.RuntimeDetour.dll -------------------------------------------------------------------------------- /lib/MonoMod.RuntimeDetour.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | MonoMod.RuntimeDetour 5 | 6 | 7 | 8 | 9 | A fully managed detour. 10 | Multiple Detours for a method to detour from can exist at any given time. Detours can be layered. 11 | If you're writing your own detour manager or need to detour native functions, it's better to create instances of NativeDetour instead. 12 | 13 | 14 | 15 | 16 | Mark the detour as applied in the detour chain. This can be done automatically when creating an instance. 17 | 18 | 19 | 20 | 21 | Undo the detour without freeing it, allowing you to reapply it later. 22 | 23 | 24 | 25 | 26 | Free the detour, while also permanently undoing it. This makes any further operations on this detour invalid. 27 | 28 | 29 | 30 | 31 | Undo and free this temporary detour. 32 | 33 | 34 | 35 | 36 | Generate a new DynamicMethod with which you can invoke the previous state. 37 | 38 | 39 | 40 | 41 | Generate a new DynamicMethod with which you can invoke the previous state. 42 | 43 | 44 | 45 | 46 | Generate a new DynamicMethod with which you can invoke the previous state. 47 | 48 | 49 | 50 | 51 | A "raw" native detour, acting as a wrapper around NativeDetourData with a few helpers. 52 | Only one NativeDetour for a method to detour from can exist at any given time. NativeDetours cannot be layered. 53 | If you don't need the trampoline generator or any of the management helpers, use DetourManager.Native directly. 54 | Unless you're writing your own detour manager or need to detour native functions, it's better to create instances of Detour instead. 55 | 56 | 57 | 58 | 59 | Apply the native detour. This can be done automatically when creating an instance. 60 | 61 | 62 | 63 | 64 | Undo the native detour without freeing the detour native data, allowing you to reapply it later. 65 | 66 | 67 | 68 | 69 | Changes the source of this native detour to a new source address. This does not repair the old source location. 70 | This also assumes that is simply a new address for the same method as this was constructed with. 71 | 72 | The new source location. 73 | 74 | 75 | 76 | Changed the target of this native detour to a new target. 77 | 78 | The new target address. 79 | 80 | 81 | 82 | Free the detour's data without undoing it. This makes any further operations on this detour invalid. 83 | 84 | 85 | 86 | 87 | Undo and free this temporary detour. 88 | 89 | 90 | 91 | 92 | Generate a new DynamicMethod with which you can invoke the previous state. 93 | If the NativeDetour holds a reference to a managed method, a copy of the original method is returned. 94 | If the NativeDetour holds a reference to a native function, an "undo-call-redo" trampoline with a matching signature is returned. 95 | 96 | 97 | 98 | 99 | Generate a new delegate with which you can invoke the previous state. 100 | If the NativeDetour holds a reference to a managed method, a copy of the original method is returned. 101 | If the NativeDetour holds a reference to a native function, an "undo-call-redo" trampoline with a matching signature is returned. 102 | 103 | 104 | 105 | 106 | Write the given value at the address to + offs, afterwards advancing offs by sizeof(byte). 107 | 108 | 109 | 110 | 111 | Write the given value at the address to + offs, afterwards advancing offs by sizeof(ushort). 112 | 113 | 114 | 115 | 116 | Write the given value at the address to + offs, afterwards advancing offs by sizeof(ushort). 117 | 118 | 119 | 120 | 121 | Write the given value at the address to + offs, afterwards advancing offs by sizeof(ulong). 122 | 123 | 124 | 125 | 126 | Generate a DynamicMethod to easily call the given native function from another DynamicMethod. 127 | 128 | The pointer to the native function to call. 129 | A MethodBase with the target function's signature. 130 | The detoured DynamicMethod. 131 | 132 | 133 | 134 | Fill the DynamicMethodDefinition with a throw. 135 | 136 | 137 | 138 | 139 | Emit a call to DetourManager.Native.Copy using the given parameters. 140 | 141 | 142 | 143 | 144 | Emit a call to DetourManager.Native.Apply using a copy of the given data. 145 | 146 | 147 | 148 | 149 | The data forming a "raw" native detour, created and consumed by DetourManager.Native. 150 | 151 | 152 | 153 | 154 | The method to detour from. Set when the structure is created by the IDetourNativePlatform. 155 | 156 | 157 | 158 | 159 | The target method to be called instead. Set when the structure is created by the IDetourNativePlatform. 160 | 161 | 162 | 163 | 164 | The type of the detour. Determined when the structure is created by the IDetourNativePlatform. 165 | 166 | 167 | 168 | 169 | The size of the detour. Calculated when the structure is created by the IDetourNativePlatform. 170 | 171 | 172 | 173 | 174 | DetourManager.Native-specific data. 175 | 176 | 177 | 178 | 179 | -------------------------------------------------------------------------------- /lib/MonoMod.Utils.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dual-Iron/TestMod/e060cd1bdc11500545b10ba6e706b1568da9c865/lib/MonoMod.Utils.dll -------------------------------------------------------------------------------- /lib/MonoMod.Utils.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | MonoMod.Utils 5 | 6 | 7 | 8 | 9 | An IL manipulation "context" with various helpers and direct access to the MethodBody. 10 | 11 | 12 | 13 | 14 | The manipulator callback, accepted by the Invoke method. 15 | 16 | 17 | 18 | 19 | 20 | The manipulated method. 21 | 22 | 23 | 24 | 25 | The manipulated method's IL processor. 26 | 27 | 28 | 29 | 30 | The manipulated method body. 31 | 32 | 33 | 34 | 35 | The manipulated method's module. 36 | 37 | 38 | 39 | 40 | The manipulated method instructions. 41 | 42 | 43 | 44 | 45 | A readonly list of all defined labels. 46 | 47 | 48 | 49 | 50 | Has the context been made read-only? No further method access is possible, but the context has not yet been disposed. 51 | 52 | 53 | 54 | 55 | Events which run when the context will be disposed. 56 | 57 | 58 | 59 | 60 | The current reference bag. Used for methods such as EmitReference and EmitDelegate. 61 | 62 | 63 | 64 | 65 | Invoke a given manipulator callback. 66 | 67 | The manipulator to run in this context. 68 | 69 | 70 | 71 | Mark this ILContext as read-only and prevent this context from further accessing the originally passed method. 72 | 73 | 74 | If the method is altered prior to calling MakeReadOnly or afterwards by accessing the method directly, the results are undefined. 75 | 76 | 77 | 78 | 79 | See 80 | 81 | 82 | 83 | 84 | See 85 | 86 | 87 | 88 | 89 | See 90 | 91 | 92 | 93 | 94 | Define a new label to be marked with a cursor. 95 | 96 | A label without a target instruction. 97 | 98 | 99 | 100 | Define a new label pointing at a given instruction. 101 | 102 | The instruction the label will point at. 103 | A label pointing at the given instruction. 104 | 105 | 106 | 107 | Determine the index of a given instruction. 108 | 109 | The instruction to get the index of. 110 | The instruction index, or the end of the method body if it hasn't been found. 111 | 112 | 113 | 114 | Obtain all labels pointing at the given instruction. 115 | 116 | The instruction to get all labels for. 117 | All labels targeting the given instruction. 118 | 119 | 120 | 121 | Bind an arbitary object to an ILContext for static retrieval. 122 | 123 | The type of the object. The combination of typeparam and id provides the unique static reference. 124 | The object to store. 125 | The id to use in combination with the typeparam for object retrieval. 126 | 127 | 128 | 129 | Dispose this context, making it read-only and invoking all OnDispose event listeners. 130 | 131 | 132 | 133 | 134 | Obtain a string representation of this context (method ID and body). 135 | 136 | A string representation of this context. 137 | 138 | 139 | 140 | Specifies where a ILCursor should be positioned in relation to the target of a search function 141 | 142 | 143 | 144 | 145 | Move the cursor before the first instruction in the match 146 | 147 | 148 | 149 | 150 | Equivalent to Before with `cursor.MoveAfterLabels()` causing emitted instructions to become the target of incoming labels 151 | 152 | 153 | 154 | 155 | Move the cursor after the last instruction in the match 156 | 157 | 158 | 159 | 160 | Indicates whether the position of a ILCursor is the result of a search function and 161 | if the next search should ignore the instruction preceeding or following this cursor. 162 | 163 | SearchTarget.Next is the result of searching with MoveType.Before, and SearchTarget.Prev from MoveType.After 164 | 165 | 166 | 167 | 168 | A foward searching function cannot match the Next instruction and must move the cursor forward 169 | 170 | 171 | 172 | 173 | A reverse searching function cannot match the Next instruction and must move the cursor backward 174 | 175 | 176 | 177 | 178 | A cursor used to manipulate a method body in an ILContext. 179 | 180 | 181 | 182 | 183 | The context to which this cursor belongs to. 184 | 185 | 186 | 187 | 188 | The instruction immediately following the cursor position or null if the cursor is at the end of the instruction list. 189 | 190 | 191 | 192 | 193 | The instruction immediately preceding the cursor position or null if the cursor is at the start of the instruction list. 194 | 195 | 196 | 197 | 198 | The instruction immediately preceding the cursor position or null if the cursor is at the start of the instruction list. 199 | 200 | 201 | 202 | 203 | The index of the instruction immediately following the cursor position. Range: 0 to Instrs.Count 204 | Setter accepts negative indexing by adding Instrs.Count to the operand 205 | 206 | 207 | 208 | 209 | Indicates whether the position of a MMILCursor is the result of a search function and 210 | if the next search should ignore the instruction preceeding or following this cursor. 211 | 212 | See 213 | 214 | 215 | 216 | 217 | Enumerates all labels which point to the current instruction (label.Target == Next) 218 | 219 | 220 | 221 | 222 | See 223 | 224 | 225 | 226 | 227 | See 228 | 229 | 230 | 231 | 232 | See 233 | 234 | 235 | 236 | 237 | See 238 | 239 | 240 | 241 | 242 | See 243 | 244 | 245 | 246 | 247 | Create a clone of this cursor. 248 | 249 | The cloned cursor. 250 | 251 | 252 | 253 | Is this cursor before the given instruction? 254 | 255 | The instruction to check. 256 | True if this cursor is before the given instruction, false otherwise. 257 | 258 | 259 | 260 | Is this cursor after the given instruction? 261 | 262 | The instruction to check. 263 | True if this cursor is after the given instruction, false otherwise. 264 | 265 | 266 | 267 | Obtain a string representation of this cursor (method ID, index, search target, surrounding instructions). 268 | 269 | A string representation of this cursor. 270 | 271 | 272 | 273 | Move the cursor to a target instruction. All other movements go through this. 274 | 275 | The target instruction 276 | Where to move in relation to the target instruction and incoming labels (branches) 277 | Whether to set the `SearchTarget` and skip the target instruction with the next search function 278 | this 279 | 280 | 281 | 282 | Move the cursor after incoming labels (branches). If an instruction is emitted, all labels which currently point to Next, will point to the newly emitted instruction. 283 | 284 | this 285 | 286 | 287 | 288 | Move the cursor before incoming labels (branches). This is the default behaviour. Emitted instructions will not cause labels to change targets. 289 | 290 | this 291 | 292 | 293 | 294 | Move the cursor to a target index. Supports negative indexing. See 295 | 296 | this 297 | 298 | 299 | 300 | Overload for Goto(label.Target). defaults to MoveType.AfterLabel 301 | 302 | this 303 | 304 | 305 | 306 | Search forward and moves the cursor to the next sequence of instructions matching the corresponding predicates. See also 307 | 308 | this 309 | If no match is found 310 | 311 | 312 | 313 | Search forward and moves the cursor to the next sequence of instructions matching the corresponding predicates. 314 | 315 | True if a match was found 316 | 317 | 318 | 319 | Search backward and moves the cursor to the next sequence of instructions matching the corresponding predicates. See also 320 | 321 | this 322 | If no match is found 323 | 324 | 325 | 326 | Search backward and moves the cursor to the next sequence of instructions matching the corresponding predicates. 327 | 328 | True if a match was found 329 | 330 | 331 | 332 | Find the next occurences of a series of instructions matching the given set of predicates with gaps permitted. 333 | 334 | An array of cursors corresponding to each found instruction (MoveType.Before) 335 | If no match is found 336 | 337 | 338 | 339 | Find the next occurences of a series of instructions matching the given set of predicates with gaps permitted. 340 | 341 | An array of cursors corresponding to each found instruction (MoveType.Before) 342 | True if a match was found 343 | 344 | 345 | 346 | Search backwards for occurences of a series of instructions matching the given set of predicates with gaps permitted. 347 | 348 | An array of cursors corresponding to each found instruction (MoveType.Before) 349 | If no match is found 350 | 351 | 352 | 353 | Search backwards for occurences of a series of instructions matching the given set of predicates with gaps permitted. 354 | 355 | An array of cursors corresponding to each found instruction (MoveType.Before) 356 | True if a match was found 357 | 358 | 359 | 360 | Set the target of a label to the current position (label.Target = Next) and moves after it. 361 | 362 | The label to mark 363 | 364 | 365 | 366 | Create a new label targetting the current position (label.Target = Next) and moves after it. 367 | 368 | The newly created label 369 | 370 | 371 | 372 | Create a new label for use with 373 | 374 | A new label with no target 375 | 376 | 377 | 378 | Remove the Next instruction 379 | 380 | 381 | 382 | 383 | Remove several instructions 384 | 385 | 386 | 387 | 388 | Move the cursor and all labels the cursor is positioned after to a target instruction 389 | 390 | 391 | 392 | 393 | Emit a new instruction at this cursor's current position. 394 | 395 | The instruction opcode. 396 | The instruction operand. 397 | this 398 | 399 | 400 | 401 | Emit a new instruction at this cursor's current position. 402 | 403 | The instruction opcode. 404 | The instruction operand. 405 | this 406 | 407 | 408 | 409 | Emit a new instruction at this cursor's current position. 410 | 411 | The instruction opcode. 412 | The instruction operand. 413 | this 414 | 415 | 416 | 417 | Emit a new instruction at this cursor's current position. 418 | 419 | The instruction opcode. 420 | The instruction operand. 421 | this 422 | 423 | 424 | 425 | Emit a new instruction at this cursor's current position. 426 | 427 | The instruction opcode. 428 | The instruction operand. 429 | this 430 | 431 | 432 | 433 | Emit a new instruction at this cursor's current position. 434 | 435 | The instruction opcode. 436 | The instruction operand. 437 | this 438 | 439 | 440 | 441 | Emit a new instruction at this cursor's current position. 442 | 443 | The instruction opcode. 444 | The instruction operand. 445 | this 446 | 447 | 448 | 449 | Emit a new instruction at this cursor's current position. 450 | 451 | The instruction opcode. 452 | The instruction operand. 453 | this 454 | 455 | 456 | 457 | Emit a new instruction at this cursor's current position. 458 | 459 | The instruction opcode. 460 | The instruction operand. 461 | this 462 | 463 | 464 | 465 | Emit a new instruction at this cursor's current position. 466 | 467 | The instruction opcode. 468 | The instruction operand. 469 | this 470 | 471 | 472 | 473 | Emit a new instruction at this cursor's current position. 474 | 475 | The instruction opcode. 476 | The instruction operand. 477 | this 478 | 479 | 480 | 481 | Emit a new instruction at this cursor's current position. 482 | 483 | The instruction opcode. 484 | The instruction operand. 485 | this 486 | 487 | 488 | 489 | Emit a new instruction at this cursor's current position. 490 | 491 | The instruction opcode. 492 | The instruction operand. 493 | this 494 | 495 | 496 | 497 | Emit a new instruction at this cursor's current position. 498 | 499 | The instruction opcode. 500 | this 501 | 502 | 503 | 504 | Emit a new instruction at this cursor's current position. 505 | 506 | The instruction opcode. 507 | The instruction operand. 508 | this 509 | 510 | 511 | 512 | Emit a new instruction at this cursor's current position. 513 | 514 | The instruction opcode. 515 | The instruction operand. 516 | this 517 | 518 | 519 | 520 | Emit a new instruction at this cursor's current position. 521 | 522 | The instruction opcode. 523 | The instruction operand. 524 | this 525 | 526 | 527 | 528 | Emit a new instruction at this cursor's current position. 529 | 530 | The instruction opcode. 531 | The instruction operand. 532 | this 533 | 534 | 535 | 536 | Emit a new instruction at this cursor's current position. 537 | 538 | The instruction opcode. 539 | The instruction operand. 540 | this 541 | 542 | 543 | 544 | Emit a new instruction at this cursor's current position. 545 | 546 | The instruction opcode. 547 | The instruction operand. 548 | this 549 | 550 | 551 | 552 | Emit a new instruction at this cursor's current position, accessing a given member. 553 | 554 | The type in which the member is defined. 555 | The instruction opcode. 556 | The accessed member name. 557 | this 558 | 559 | 560 | 561 | Bind an arbitary object to an ILContext for static retrieval. See 562 | 563 | 564 | 565 | 566 | Emit the IL to retrieve a stored reference of type with the given and place it on the stack. 567 | 568 | 569 | 570 | 571 | Store an object in the reference store, and emit the IL to retrieve it and place it on the stack. 572 | 573 | 574 | 575 | 576 | Emit the IL to invoke a delegate as if it were a method. Stack behaviour matches OpCodes.Call 577 | 578 | 579 | 580 | 581 | A label to be used in ILContexts. 582 | 583 | 584 | 585 | 586 | The target instruction this label points at. 587 | 588 | 589 | 590 | 591 | All instructions using this label. 592 | 593 | 594 | 595 | 596 | An IL inline reference bag used for ILContexts. 597 | 598 | 599 | 600 | 601 | Get the object for the given ID. 602 | 603 | The object type. 604 | The object ID. 605 | The stored object. 606 | 607 | 608 | 609 | Get a MethodInfo for the getter. 610 | 611 | The object type. 612 | The getter method. 613 | 614 | 615 | 616 | Store a new object. 617 | 618 | The object type. 619 | The object to be stored. 620 | An ID to be used for all further operations. 621 | 622 | 623 | 624 | Remove the object with the given ID from the bag, essentially clearing the ID's slot. 625 | 626 | The object type. 627 | The object ID. 628 | 629 | 630 | 631 | Get a MethodInfo invoking a delegate of the given type, with the delegate at the top of the stack. Used by . 632 | 633 | The delegate type. 634 | A MethodInfo invoking a delegate of the given type. 635 | 636 | 637 | 638 | The default IL reference bag. Throws NotSupportedException for every operation. 639 | 640 | 641 | 642 | 643 | An IL reference bag implementation to be used for runtime-generated methods. 644 | 645 | 646 | 647 | 648 | Collection of extensions used by MonoMod and other projects. 649 | 650 | 651 | 652 | 653 | Create a hexadecimal string for the given bytes. 654 | 655 | The input bytes. 656 | The output hexadecimal string. 657 | 658 | 659 | 660 | Invokes all delegates in the invocation list, passing on the result to the next. 661 | 662 | Type of the result. 663 | The multicast delegate. 664 | The initial value and first parameter. 665 | Any other arguments that may be passed. 666 | The result of all delegates. 667 | 668 | 669 | 670 | Invokes all delegates in the invocation list, as long as the previously invoked delegate returns true. 671 | 672 | 673 | 674 | 675 | Invokes all delegates in the invocation list, as long as the previously invoked delegate returns false. 676 | 677 | 678 | 679 | 680 | Invokes all delegates in the invocation list, as long as the previously invoked delegate returns null. 681 | 682 | 683 | 684 | 685 | Split PascalCase words to become Pascal Case instead. 686 | 687 | PascalCaseString 688 | Pascal Case String 689 | 690 | 691 | 692 | Read the string from the BinaryReader BinaryWriter in a C-friendly format. 693 | 694 | The input which the method reads from. 695 | The output string. 696 | 697 | 698 | 699 | Write the string to the BinaryWriter in a C-friendly format. 700 | 701 | The output which the method writes to. 702 | The input string. 703 | 704 | 705 | 706 | Cast a delegate from one type to another. Compatible with delegates holding an invocation list (combined delegates). 707 | 708 | The input delegate. 709 | The output delegate. 710 | 711 | 712 | 713 | Cast a delegate from one type to another. Compatible with delegates holding an invocation list (combined delegates). 714 | 715 | The input delegate. 716 | The wanted output delegate type. 717 | The output delegate. 718 | 719 | 720 | 721 | Print the exception to the console, including extended loading / reflection data useful for mods. 722 | 723 | 724 | 725 | 726 | Get the method of interest for a given state machine method. 727 | 728 | The method creating the state machine. 729 | The "main" method in the state machine. 730 | 731 | 732 | 733 | Gets the actual generic method definition of a method, as defined on the fully open type. 734 | 735 | The potentially instantiated method to find the definition of. 736 | The original method definition, with no generic arguments filled in. 737 | 738 | 739 | 740 | Safely resolve a reference, silently discarding any exceptions. 741 | 742 | The reference to resolve. 743 | The resolved definition or null. 744 | 745 | 746 | 747 | Safely resolve a reference, silently discarding any exceptions. 748 | 749 | The reference to resolve. 750 | The resolved definition or null. 751 | 752 | 753 | 754 | Safely resolve a reference, silently discarding any exceptions. 755 | 756 | The reference to resolve. 757 | The resolved definition or null. 758 | 759 | 760 | 761 | Safely resolve a reference, silently discarding any exceptions. 762 | 763 | The reference to resolve. 764 | The resolved definition or null. 765 | 766 | 767 | 768 | Get a certain custom attribute from an attribute provider. 769 | 770 | The attribute provider. 771 | The custom attribute name. 772 | The first matching custom attribute, or null if no matching attribute has been found. 773 | 774 | 775 | 776 | Determine if an attribute provider has got a specific custom attribute. 777 | 778 | The attribute provider. 779 | The custom attribute name. 780 | true if the attribute provider contains the given custom attribute, false otherwise. 781 | 782 | 783 | 784 | Get the integer value pushed onto the stack with this instruction. 785 | 786 | The instruction to get the pushed integer value for. 787 | The pushed integer value. 788 | 789 | 790 | 791 | Get the integer value pushed onto the stack with this instruction. 792 | 793 | The instruction to get the pushed integer value for. 794 | The pushed integer value or null. 795 | 796 | 797 | 798 | Determine if the method call is a base method call. 799 | 800 | The caller method body. 801 | The called method. 802 | True if the called method is a base method of the caller method, false otherwise. 803 | 804 | 805 | 806 | Determine if the given method can be preferably called using callvirt. 807 | 808 | The called method. 809 | True if the called method can be called using callvirt, false otherwise. 810 | 811 | 812 | 813 | Determine if the given type is a struct (also known as "value type") or struct-alike (f.e. primitive). 814 | 815 | The type to check. 816 | True if the type is a struct, primitive or similar, false otherwise. 817 | 818 | 819 | 820 | Get the long form opcode for any short form opcode. 821 | 822 | The short form opcode. 823 | The long form opcode. 824 | 825 | 826 | 827 | Get the short form opcode for any long form opcode. 828 | 829 | The long form opcode. 830 | The short form opcode. 831 | 832 | 833 | 834 | Calculate updated instruction offsets. Required for certain manual fixes. 835 | 836 | The method to recalculate the IL instruction offsets for. 837 | 838 | 839 | 840 | Fix (and optimize) any instructions which should use the long / short form opcodes instead. 841 | 842 | The method to apply the fixes to. 843 | 844 | 845 | 846 | Check if the signatures of a given System.Reflection and Mono.Cecil member reference match. 847 | 848 | The System.Reflection member reference. 849 | The Mono.Cecil member reference. 850 | True if both references share the same signature, false otherwise. 851 | 852 | 853 | 854 | Check if the signatures of a given System.Reflection and Mono.Cecil member reference match. 855 | 856 | The Mono.Cecil member reference. 857 | The System.Reflection member reference. 858 | True if both references share the same signature, false otherwise. 859 | 860 | 861 | 862 | See 863 | 864 | 865 | 866 | 867 | See 868 | 869 | 870 | 871 | 872 | See 873 | 874 | 875 | 876 | 877 | See 878 | 879 | 880 | 881 | 882 | See 883 | 884 | 885 | 886 | 887 | Determine if two types are compatible with each other (f.e. object with string, or enums with their underlying integer type). 888 | 889 | The first type. 890 | The second type. 891 | True if both types are compatible with each other, false otherwise. 892 | 893 | 894 | 895 | Creates a delegate of the specified type from this method. 896 | 897 | The method to create the delegate from. 898 | The type of the delegate to create. 899 | The delegate for this method. 900 | 901 | 902 | 903 | Creates a delegate of the specified type with the specified target from this method. 904 | 905 | The method to create the delegate from. 906 | The type of the delegate to create. 907 | The object targeted by the delegate. 908 | The delegate for this method. 909 | 910 | 911 | 912 | Creates a delegate of the specified type from this method. 913 | 914 | The method to create the delegate from. 915 | The type of the delegate to create. 916 | The delegate for this method. 917 | 918 | 919 | 920 | Creates a delegate of the specified type with the specified target from this method. 921 | 922 | The method to create the delegate from. 923 | The type of the delegate to create. 924 | The object targeted by the delegate. 925 | The delegate for this method. 926 | 927 | 928 | 929 | Find a method for a given ID. 930 | 931 | The type to search in. 932 | The method ID. 933 | Whether to perform a simple search pass as well or not. 934 | The first matching method or null. 935 | 936 | 937 | 938 | Find a method for a given ID recursively (including the passed type's base types). 939 | 940 | The type to search in. 941 | The method ID. 942 | Whether to perform a simple search pass as well or not. 943 | The first matching method or null. 944 | 945 | 946 | 947 | Find a method for a given ID. 948 | 949 | The type to search in. 950 | The method ID. 951 | Whether to perform a simple search pass as well or not. 952 | The first matching method or null. 953 | 954 | 955 | 956 | Find a method for a given ID recursively (including the passed type's base types). 957 | 958 | The type to search in. 959 | The method ID. 960 | Whether to perform a simple search pass as well or not. 961 | The first matching method or null. 962 | 963 | 964 | 965 | Find a property for a given name. 966 | 967 | The type to search in. 968 | The property name. 969 | The first matching property or null. 970 | 971 | 972 | 973 | Find a property for a given name recursively (including the passed type's base types). 974 | 975 | The type to search in. 976 | The property name. 977 | The first matching property or null. 978 | 979 | 980 | 981 | Find a field for a given name. 982 | 983 | The type to search in. 984 | The field name. 985 | The first matching field or null. 986 | 987 | 988 | 989 | Find a field for a given name recursively (including the passed type's base types). 990 | 991 | The type to search in. 992 | The field name. 993 | The first matching field or null. 994 | 995 | 996 | 997 | Find an event for a given name. 998 | 999 | The type to search in. 1000 | The event name. 1001 | The first matching event or null. 1002 | 1003 | 1004 | 1005 | Find an event for a given name recursively (including the passed type's base types). 1006 | 1007 | The type to search in. 1008 | The event name. 1009 | The first matching event or null. 1010 | 1011 | 1012 | 1013 | Get a reference ID that is similar to the full name, but consistent between System.Reflection and Mono.Cecil. 1014 | 1015 | The method to get the ID for. 1016 | The name to use instead of the reference's own name. 1017 | The ID to use instead of the reference's declaring type ID. 1018 | Whether the type ID should be included or not. System.Reflection avoids it by default. 1019 | Whether the ID should be "simple" (name only). 1020 | The ID. 1021 | 1022 | 1023 | 1024 | Get a reference ID that is similar to the full name, but consistent between System.Reflection and Mono.Cecil. 1025 | 1026 | The call site to get the ID for. 1027 | The ID. 1028 | 1029 | 1030 | 1031 | Get a reference ID that is similar to the full name, but consistent between System.Reflection and Mono.Cecil. 1032 | 1033 | The method to get the ID for. 1034 | The name to use instead of the reference's own name. 1035 | The ID to use instead of the reference's declaring type ID. 1036 | Whether the type ID should be included or not. System.Reflection avoids it by default. 1037 | Whether the method is regarded as a proxy method or not. Setting this paramater to true will skip the first parameter. 1038 | Whether the ID should be "simple" (name only). 1039 | The ID. 1040 | 1041 | 1042 | 1043 | Get the "patch name" - the name of the target to patch - for the given member. 1044 | 1045 | The member to get the patch name for. 1046 | The patch name. 1047 | 1048 | 1049 | 1050 | Get the "patch name" - the name of the target to patch - for the given member. 1051 | 1052 | The member to get the patch name for. 1053 | The patch name. 1054 | 1055 | 1056 | 1057 | Clone the given method definition. 1058 | 1059 | The original method. 1060 | The method definition to apply the cloning process onto, or null to create a new method. 1061 | A clone of the original method. 1062 | 1063 | 1064 | 1065 | Clone the given method body. 1066 | 1067 | The original method body. 1068 | The method which will own the newly cloned method body. 1069 | A clone of the original method body. 1070 | 1071 | 1072 | 1073 | Force-update a generic parameter's position and type. 1074 | 1075 | The generic parameter to update. 1076 | The new position. 1077 | The new type. 1078 | The updated generic parameter. 1079 | 1080 | 1081 | 1082 | Resolve a given generic parameter in another context. 1083 | 1084 | The new context. 1085 | The original generic parameter. 1086 | A generic parameter provided by the given context which matches the original generic parameter. 1087 | 1088 | 1089 | 1090 | Relink the given member reference (metadata token provider). 1091 | 1092 | The reference to relink. 1093 | The relinker to use during the relinking process. 1094 | The generic context provided to relink generic references. 1095 | A relinked reference. 1096 | 1097 | 1098 | 1099 | Relink the given type reference. 1100 | 1101 | The reference to relink. 1102 | The relinker to use during the relinking process. 1103 | The generic context provided to relink generic references. 1104 | A relinked reference. 1105 | 1106 | 1107 | 1108 | Relink the given method reference. 1109 | 1110 | The reference to relink. 1111 | The relinker to use during the relinking process. 1112 | The generic context provided to relink generic references. 1113 | A relinked reference. 1114 | 1115 | 1116 | 1117 | Relink the given callsite. 1118 | 1119 | The reference to relink. 1120 | The relinker to use during the relinking process. 1121 | The generic context provided to relink generic references. 1122 | A relinked reference. 1123 | 1124 | 1125 | 1126 | Relink the given field reference. 1127 | 1128 | The reference to relink. 1129 | The relinker to use during the relinking process. 1130 | The generic context provided to relink generic references. 1131 | A relinked reference. 1132 | 1133 | 1134 | 1135 | Relink the given parameter definition. 1136 | 1137 | The reference to relink. 1138 | The relinker to use during the relinking process. 1139 | The generic context provided to relink generic references. 1140 | A relinked reference. 1141 | 1142 | 1143 | 1144 | Clone the given parameter definition. 1145 | 1146 | The original parameter definition. 1147 | A clone of the original parameter definition. 1148 | 1149 | 1150 | 1151 | Relink the given custom attribute. 1152 | 1153 | The reference to relink. 1154 | The relinker to use during the relinking process. 1155 | The generic context provided to relink generic references. 1156 | A relinked reference. 1157 | 1158 | 1159 | 1160 | Clone the given custom attribute. 1161 | 1162 | The original custom attribute. 1163 | A clone of the original custom attribute. 1164 | 1165 | 1166 | 1167 | Relink the given generic parameter reference. 1168 | 1169 | The reference to relink. 1170 | The relinker to use during the relinking process. 1171 | The generic context provided to relink generic references. 1172 | A relinked reference. 1173 | 1174 | 1175 | 1176 | Clone the given generic parameter. 1177 | 1178 | The original generic parameter. 1179 | A clone of the original generic parameter. 1180 | 1181 | 1182 | 1183 | Get the managed size of a given type. This matches an IL-level sizeof(t), even if it cannot be determined normally in C#. 1184 | Note that sizeof(t) != Marshal.SizeOf(t), f.e. when t is char. 1185 | 1186 | The type to get the size from. 1187 | The managed type size. 1188 | 1189 | 1190 | 1191 | Get a type which matches what the method should receive via ldarg.0 1192 | 1193 | The method to obtain the "this" parameter type from. 1194 | The "this" parameter type. 1195 | 1196 | 1197 | 1198 | Get a native function pointer for a given method. This matches an IL-level ldftn. 1199 | 1200 | 1201 | The result of ldftn doesn't always match that of MethodHandle.GetFunctionPointer(). 1202 | For example, ldftn doesn't JIT-compile the method on mono, which thus keeps the class constructor untouched. 1203 | And on .NET, struct overrides (f.e. ToString) have got multiple entry points pointing towards the same code. 1204 | 1205 | The method to get a native function pointer for. 1206 | The native function pointer. 1207 | 1208 | 1209 | 1210 | A variant of ILGenerator which uses Mono.Cecil under the hood. 1211 | 1212 | 1213 | 1214 | 1215 | The underlying Mono.Cecil.Cil.ILProcessor. 1216 | 1217 | 1218 | 1219 | 1220 | Abstract version of System.Reflection.Emit.ILGenerator. See for proper documentation. 1221 | 1222 | 1223 | 1224 | 1225 | Get a "real" ILGenerator for this ILGeneratorShim. 1226 | 1227 | A "real" ILGenerator. 1228 | 1229 | 1230 | 1231 | Get the proxy type for a given ILGeneratorShim type. The proxy type implements ILGenerator. 1232 | 1233 | The ILGeneratorShim type. 1234 | The "real" ILGenerator type. 1235 | 1236 | 1237 | 1238 | Get the proxy type for a given ILGeneratorShim type. The proxy type implements ILGenerator. 1239 | 1240 | The ILGeneratorShim type. 1241 | The "real" ILGenerator type. 1242 | 1243 | 1244 | 1245 | Get the non-generic proxy type implementing ILGenerator. 1246 | 1247 | The "real" ILGenerator type, non-generic. 1248 | 1249 | 1250 | 1251 | A DynamicMethodDefinition "generator", responsible for generating a runtime MethodInfo from a DMD MethodDefinition. 1252 | 1253 | 1254 | 1255 | 1256 | 1257 | A DMDGenerator implementation using Mono.Cecil to build an in-memory assembly. 1258 | 1259 | 1260 | 1261 | 1262 | Fill the DynamicMethod with a stub. 1263 | 1264 | 1265 | 1266 | 1267 | Fill the DynamicMethod with a stub. 1268 | 1269 | 1270 | 1271 | 1272 | Emit a reference to an arbitrary object. Note that the references "leak." 1273 | 1274 | 1275 | 1276 | 1277 | Emit a reference to an arbitrary object. Note that the references "leak." 1278 | 1279 | 1280 | 1281 | 1282 | Emit a reference to an arbitrary object. Note that the references "leak." 1283 | 1284 | 1285 | 1286 | 1287 | Emit a reference to an arbitrary object. Note that the references "leak." 1288 | 1289 | 1290 | 1291 | 1292 | Allows you to remap library paths / names and specify loading flags. Useful for cross-platform compatibility. Applies only to DynDll. 1293 | 1294 | 1295 | 1296 | 1297 | Open a given library and get its handle. 1298 | 1299 | The library name. 1300 | Whether to skip using the mapping or not. 1301 | Any optional platform-specific flags. 1302 | The library handle. 1303 | 1304 | 1305 | 1306 | Try to open a given library and get its handle. 1307 | 1308 | The library name. 1309 | The library handle, or null if it failed loading. 1310 | Whether to skip using the mapping or not. 1311 | Any optional platform-specific flags. 1312 | True if the handle was obtained, false otherwise. 1313 | 1314 | 1315 | 1316 | Release a library handle obtained via OpenLibrary. Don't release the result of OpenLibrary(null)! 1317 | 1318 | The library handle. 1319 | 1320 | 1321 | 1322 | Get a function pointer for a function in the given library. 1323 | 1324 | The library handle. 1325 | The function name. 1326 | The function pointer. 1327 | 1328 | 1329 | 1330 | Get a function pointer for a function in the given library. 1331 | 1332 | The library handle. 1333 | The function name. 1334 | The function pointer, or null if it wasn't found. 1335 | True if the function pointer was obtained, false otherwise. 1336 | 1337 | 1338 | 1339 | Extension method wrapping Marshal.GetDelegateForFunctionPointer 1340 | 1341 | 1342 | 1343 | 1344 | Fill all static delegate fields with the DynDllImport attribute. 1345 | Call this early on in the static constructor. 1346 | 1347 | The type containing the DynDllImport delegate fields. 1348 | Any optional mappings similar to the static mappings. 1349 | 1350 | 1351 | 1352 | Fill all instance delegate fields with the DynDllImport attribute. 1353 | Call this early on in the constructor. 1354 | 1355 | An instance of a type containing the DynDllImport delegate fields. 1356 | Any optional mappings similar to the static mappings. 1357 | 1358 | 1359 | 1360 | Similar to DllImport, but requires you to run typeof(DeclaringType).ResolveDynDllImports(); 1361 | 1362 | 1363 | 1364 | 1365 | The library or library alias to use. 1366 | 1367 | 1368 | 1369 | 1370 | A list of possible entrypoints that the function can be resolved to. Implicitly includes the field name and delegate name. 1371 | 1372 | 1373 | 1374 | The library or library alias to use. 1375 | A list of possible entrypoints that the function can be resolved to. Implicitly includes the field name and delegate name. 1376 | 1377 | 1378 | 1379 | A mapping entry, to be used by . 1380 | 1381 | 1382 | 1383 | 1384 | The name as which the library will be resolved as. Useful to remap libraries or to provide full paths. 1385 | 1386 | 1387 | 1388 | 1389 | Platform-dependent loading flags. 1390 | 1391 | 1392 | 1393 | The name as which the library will be resolved as. Useful to remap libraries or to provide full paths. 1394 | Platform-dependent loading flags. 1395 | 1396 | 1397 | 1398 | The relinker callback delegate type. 1399 | 1400 | The reference (metadata token provider) to relink. 1401 | The generic context provided to relink generic references. 1402 | A relinked reference. 1403 | 1404 | 1405 | 1406 | Generic platform enum. 1407 | 1408 | 1409 | 1410 | 1411 | Bit applied to all OSes (Unknown, Windows, MacOS, ...). 1412 | 1413 | 1414 | 1415 | 1416 | On demand 64-bit platform bit. 1417 | 1418 | 1419 | 1420 | 1421 | Applied to all NT and NT-oid platforms (Windows). 1422 | 1423 | 1424 | 1425 | 1426 | Applied to all Unix and Unix-oid platforms (macOS, Linux, ...). 1427 | 1428 | 1429 | 1430 | 1431 | On demand ARM platform bit. 1432 | 1433 | 1434 | 1435 | 1436 | Unknown OS. 1437 | 1438 | 1439 | 1440 | 1441 | Windows, using the NT kernel. 1442 | 1443 | 1444 | 1445 | 1446 | macOS, using the Darwin kernel. 1447 | 1448 | 1449 | 1450 | 1451 | Linux. 1452 | 1453 | 1454 | 1455 | 1456 | Android, using the Linux kernel. 1457 | 1458 | 1459 | 1460 | 1461 | iOS, sharing components with macOS. 1462 | 1463 | 1464 | 1465 | 1466 | -------------------------------------------------------------------------------- /lib/MonoMod.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dual-Iron/TestMod/e060cd1bdc11500545b10ba6e706b1568da9c865/lib/MonoMod.dll -------------------------------------------------------------------------------- /lib/PUBLIC-Assembly-CSharp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dual-Iron/TestMod/e060cd1bdc11500545b10ba6e706b1568da9c865/lib/PUBLIC-Assembly-CSharp.dll -------------------------------------------------------------------------------- /lib/UnityEngine.CoreModule.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dual-Iron/TestMod/e060cd1bdc11500545b10ba6e706b1568da9c865/lib/UnityEngine.CoreModule.dll -------------------------------------------------------------------------------- /lib/UnityEngine.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dual-Iron/TestMod/e060cd1bdc11500545b10ba6e706b1568da9c865/lib/UnityEngine.dll -------------------------------------------------------------------------------- /src/Plugin.cs: -------------------------------------------------------------------------------- 1 | using BepInEx; 2 | using System.Security.Permissions; 3 | 4 | // Allows access to private members 5 | #pragma warning disable CS0618 6 | [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] 7 | #pragma warning restore CS0618 8 | 9 | namespace TestMod; 10 | 11 | [BepInPlugin("com.author.testmod", "Test Mod", "0.1.0")] 12 | sealed class Plugin : BaseUnityPlugin 13 | { 14 | bool init; 15 | 16 | public void OnEnable() 17 | { 18 | // Add hooks here 19 | On.RainWorld.OnModsInit += OnModsInit; 20 | } 21 | 22 | private void OnModsInit(On.RainWorld.orig_OnModsInit orig, RainWorld self) 23 | { 24 | orig(self); 25 | 26 | if (init) return; 27 | 28 | init = true; 29 | 30 | // Initialize assets, your mod config, and anything that uses RainWorld here 31 | Logger.LogDebug("Hello world!"); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/TestMod.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net48 5 | 11 6 | 7 | 8 | 9 | 10 | false 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | --------------------------------------------------------------------------------