commit d731d65bb7ded17857cb64ac2e23d22259b87da1 Author: Jill "oatmealine" Monoids Date: Mon Mar 6 04:13:08 2023 +0300 JilloSlug Init!!!! diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..96d6fdc --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*.cs] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aa90ee4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,400 @@ +mod/plugins/ + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml diff --git a/JilloSlug.sln b/JilloSlug.sln new file mode 100644 index 0000000..b2458dd --- /dev/null +++ b/JilloSlug.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33205.214 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SlugTest", "src\JilloSlug.csproj", "{C8AF8B79-0A9F-435F-BC0C-FDA563ECCDB9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C8AF8B79-0A9F-435F-BC0C-FDA563ECCDB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C8AF8B79-0A9F-435F-BC0C-FDA563ECCDB9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C8AF8B79-0A9F-435F-BC0C-FDA563ECCDB9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C8AF8B79-0A9F-435F-BC0C-FDA563ECCDB9}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {5238A1CD-19BE-4617-BAF6-3143D8064838} + EndGlobalSection +EndGlobal diff --git a/lib/Assembly-CSharp-firstpass.dll b/lib/Assembly-CSharp-firstpass.dll new file mode 100644 index 0000000..67a2fef Binary files /dev/null and b/lib/Assembly-CSharp-firstpass.dll differ diff --git a/lib/BepInEx.dll b/lib/BepInEx.dll new file mode 100644 index 0000000..499c64a Binary files /dev/null and b/lib/BepInEx.dll differ diff --git a/lib/BepInEx.xml b/lib/BepInEx.xml new file mode 100644 index 0000000..1c3d1c4 --- /dev/null +++ b/lib/BepInEx.xml @@ -0,0 +1,1657 @@ + + + + BepInEx + + + + + Base type of all classes representing and enforcing acceptable values of config settings. + + + + Type of values that this class can Clamp. + + + + Change the value to be acceptable, if it's not already. + + + + + Check if the value is an acceptable value. + + + + + Type of the supported values. + + + + + Get the string for use in config files. + + + + + Specify the list of acceptable values for a setting. + + + + + List of values that a setting can take. + + + + + Specify the list of acceptable values for a setting. + If the setting does not equal any of the values, it will be set to the first one. + + + + + + + + + + + + + + Specify the range of acceptable values for a setting. + + + + Lowest acceptable value + Highest acceptable value + + + + Lowest acceptable value + + + + + Highest acceptable value + + + + + + + + + + + + + + Provides access to a single setting inside of a . + + Type of the setting. + + + + Fired when the setting is changed. Does not detect changes made outside from this object. + + + + + Value of this setting. + + + + + + + + Container for a single setting of a . + Each config entry is linked to one config file. + + + + + Types of defaultValue and definition.AcceptableValues have to be the same as settingType. + + + + + Config file this entry is a part of. + + + + + Category and name of this setting. Used as a unique key for identification within a . + + + + + Description / metadata of this setting. + + + + + Type of the that this setting holds. + + + + + Default value of this setting (set only if the setting was not changed before). + + + + + Get or set the value of the setting. + + + + + Get the serialized representation of the value. + + + + + Set the value by using its serialized form. + + + + + If necessary, clamp the value to acceptable value range. T has to be equal to settingType. + + + + + Trigger setting changed event. + + + + + Write a description of this setting using all available metadata. + + + + + Section and key of a setting. Used as a unique key for identification within a . + The same definition can be used in multiple config files, it will point to different settings then. + + + + + + Group of the setting. All settings within a config file are grouped by this. + + + + + Name of the setting. + + + + + Create a new definition. Definitions with same section and key are equal. + + Group of the setting, case sensitive. + Name of the setting, case sensitive. + + + + + + + Check if the definitions are the same. + + + + + + Check if the definitions are the same. + + + + + + + + Check if the definitions are the same. + + + + + Check if the definitions are the same. + + + + + + + + Metadata of a . + + + + + Create a new description. + + Text describing the function of the setting and any notes or warnings. + Range of values that this setting can take. The setting's value will be automatically clamped. + Objects that can be used by user-made classes to add functionality. + + + + Text describing the function of the setting and any notes or warnings. + + + + + Range of acceptable values for a setting. + + + + + Objects that can be used by user-made classes to add functionality. + + + + + An empty description. + + + + + A helper class to handle persistent data. All public methods are thread-safe. + + + + + All config entries inside + + + + + Create a list with all config entries inside of this config file. + + + + + Create an array with all config entries inside of this config file. Should be only used for metadata purposes. + If you want to access and modify an existing setting then use + instead with no description. + + + + + Full path to the config file. The file might not exist until a setting is added and changed, or is called. + + + + + If enabled, writes the config to disk every time a value is set. + If disabled, you have to manually use or the changes will be lost! + + + + + + + + Create a new config file at the specified config path. + + Full path to a file that contains settings. The file will be created as needed. + If the config file/directory doesn't exist, create it immediately. + Information about the plugin that owns this setting file. + + + + Reloads the config from disk. Unsaved changes are lost. + + + + + Writes the config to disk. + + + + + Access one of the existing settings. If the setting has not been added yet, null is returned. + If the setting exists but has a different type than T, an exception is thrown. + New settings should be added with . + + Type of the value contained in this setting. + Section and Key of the setting. + + + + Access one of the existing settings. If the setting has not been added yet, null is returned. + If the setting exists but has a different type than T, an exception is thrown. + New settings should be added with . + + Type of the value contained in this setting. + Section/category/group of the setting. Settings are grouped by this. + Name of the setting. + + + + Access one of the existing settings. If the setting has not been added yet, false is returned. Otherwise, true. + If the setting exists but has a different type than T, an exception is thrown. + New settings should be added with . + + Type of the value contained in this setting. + Section and Key of the setting. + The ConfigEntry value to return. + + + + Access one of the existing settings. If the setting has not been added yet, null is returned. + If the setting exists but has a different type than T, an exception is thrown. + New settings should be added with . + + Type of the value contained in this setting. + Section/category/group of the setting. Settings are grouped by this. + Name of the setting. + The ConfigEntry value to return. + + + + Create a new setting. The setting is saved to drive and loaded automatically. + Each definition can be used to add only one setting, trying to add a second setting will throw an exception. + + Type of the value contained in this setting. + Section and Key of the setting. + Value of the setting if the setting was not created yet. + Description of the setting shown to the user and other metadata. + + + + Create a new setting. The setting is saved to drive and loaded automatically. + Each section and key pair can be used to add only one setting, trying to add a second setting will throw an exception. + + Type of the value contained in this setting. + Section/category/group of the setting. Settings are grouped by this. + Name of the setting. + Value of the setting if the setting was not created yet. + Description of the setting shown to the user and other metadata. + + + + Create a new setting. The setting is saved to drive and loaded automatically. + Each section and key pair can be used to add only one setting, trying to add a second setting will throw an exception. + + Type of the value contained in this setting. + Section/category/group of the setting. Settings are grouped by this. + Name of the setting. + Value of the setting if the setting was not created yet. + Simple description of the setting shown to the user. + + + + Create a new setting. The setting is saved to drive and loaded automatically. + Each definition can be used to add only one setting, trying to add a second setting will throw an exception. + + Type of the value contained in this setting. + Section and Key of the setting. + Value of the setting if the setting was not created yet. + Description of the setting shown to the user and other metadata. + + + + Create a new setting. The setting is saved to drive and loaded automatically. + Each section and key pair can be used to add only one setting, trying to add a second setting will throw an exception. + + Type of the value contained in this setting. + Section/category/group of the setting. Settings are grouped by this. + Name of the setting. + Value of the setting if the setting was not created yet. + Description of the setting shown to the user and other metadata. + + + + Create a new setting. The setting is saved to drive and loaded automatically. + Each section and key pair can be used to add only one setting, trying to add a second setting will throw an exception. + + Type of the value contained in this setting. + Section/category/group of the setting. Settings are grouped by this. + Name of the setting. + Value of the setting if the setting was not created yet. + Simple description of the setting shown to the user. + + + + Access a setting. Use Bind instead. + + + + + Access a setting. Use Bind instead. + + + + + An event that is fired every time the config is reloaded. + + + + + Fired when one of the settings is changed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the ConfigDefinitions that the ConfigFile contains. + Creates a new array when the property is accessed. Thread-safe. + + + + + Returns the ConfigEntryBase values that the ConfigFile contains. + Creates a new array when the property is accessed. Thread-safe. + + + + + Provides access to a single setting inside of a . + + Type of the setting. + + + + Entry of this setting in the . + + + + + Unique definition of this setting. + + + + + Config file this setting is inside of. + + + + + Fired when the setting is changed. Does not detect changes made outside from this object. + + + + + Value of this setting. + + + + + A keyboard shortcut that can be used in Update method to check if user presses a key combo. The shortcut is only + triggered when the user presses the exact combination. For example, F + LeftCtrl will trigger only if user + presses and holds only LeftCtrl, and then presses F. If any other keys are pressed, the shortcut will not trigger. + + Can be used as a value of a setting in + to allow user to change this shortcut and have the changes saved. + + How to use: Use in this class instead of in the Update loop. + + + + + Shortcut that never triggers. + + + + + All KeyCode values that can be used in a keyboard shortcut. + + + + + Create a new keyboard shortcut. + + Main key to press + Keys that should be held down before main key is registered + + + + Main key of the key combination. It has to be pressed / let go last for the combination to be triggered. + If the combination is empty, is returned. + + + + + Modifiers of the key combination, if any. + + + + + Attempt to deserialize key combination from the string. + + + + + Serialize the key combination into a user readable string. + + + + + Check if the main key was just pressed (Input.GetKeyDown), and specified modifier keys are all pressed + + + + + Check if the main key is currently held down (Input.GetKey), and specified modifier keys are all pressed + + + + + Check if the main key was just lifted (Input.GetKeyUp), and specified modifier keys are all pressed. + + + + + + + + + + + + + + Arguments for events concerning a change of a setting. + + + + + + + + + Setting that was changed + + + + + Serializer/deserializer used by the config system. + + + + + Convert object of a given type to a string using available converters. + + + + + Convert string to an object of a given type using available converters. + + + + + Convert string to an object of a given type using available converters. + + + + + Get a converter for a given type if there is any. + + + + + Add a new type converter for a given type. + If a different converter is already added, this call is ignored and false is returned. + + + + + Check if a given type can be converted to and from string. + + + + + Give a list of types with registered converters. + + + + + For types that are in assemblies that can't get loaded before preloader runs (or it won't work on these assemblies) + + + + + A serializer/deserializer combo for some type(s). Used by the config system. + + + + + Used to serialize the type into a (hopefully) human-readable string. + Object is the instance to serialize, Type is the object's type. + + + + + Used to deserialize the type from a string. + String is the data to deserialize, Type is the object's type, should return instance to an object of Type. + + + + + True if an external console has been started, false otherwise. + + + + + The stream that writes to the standard out stream of the process. Should never be null. + + + + + The stream that writes to an external console. Null if no such console exists + + + + + Data class that represents information about a loadable BepInEx plugin. + Contains all metadata and additional info required for plugin loading by . + + + + + General metadata about a plugin. + + + + + Collection of attributes that describe what processes the plugin can run on. + + + + + Collection of attributes that describe what plugins this plugin depends on. + + + + + Collection of attributes that describe what plugins this plugin + is incompatible with. + + + + + File path to the plugin DLL + + + + + Instance of the plugin that represents this info. NULL if no plugin is instantiated from info (yet) + + + + + + + + This attribute denotes that a class is a plugin, and specifies the required metadata. + + + + + The unique identifier of the plugin. Should not change between plugin versions. + + + + + The user friendly name of the plugin. Is able to be changed between versions. + + + + + The specfic version of the plugin. + + + + The unique identifier of the plugin. Should not change between plugin versions. + The user friendly name of the plugin. Is able to be changed between versions. + The specfic version of the plugin. + + + + This attribute specifies any dependencies that this plugin has on other plugins. + + + + + Flags that are applied to a dependency + + + + + The plugin has a hard dependency on the referenced plugin, and will not run without it. + + + + + This plugin has a soft dependency on the referenced plugin, and is able to run without it. + + + + + The GUID of the referenced plugin. + + + + + The flags associated with this dependency definition. + + + + + The minimum version of the referenced plugin. + + + + + Marks this as depenant on another plugin. The other plugin will be loaded before this one. + If the other plugin doesn't exist, what happens depends on the parameter. + + The GUID of the referenced plugin. + The flags associated with this dependency definition. + + + + Marks this as depenant on another plugin. The other plugin will be loaded before this one. + 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. + + The GUID of the referenced plugin. + The minimum version of the referenced plugin. + When version is supplied the dependency is always treated as HardDependency + + + + This attribute specifies other plugins that are incompatible with this plugin. + + + + + The GUID of the referenced plugin. + + + + + Marks this as incompatible with another plugin. + If the other plugin exists, this plugin will not be loaded and a warning will be shown. + + The GUID of the referenced plugin. + + + + This attribute specifies which processes this plugin should be run for. Not specifying this attribute will load the plugin under every process. + + + + + The name of the process that this plugin will run under. + + + + The name of the process that this plugin will run under. + + + + Helper class to use for retrieving metadata about a plugin, defined as attributes. + + + + + Retrieves the BepInPlugin metadata from a plugin type. + + The plugin type. + The BepInPlugin metadata of the plugin type. + + + + Retrieves the BepInPlugin metadata from a plugin instance. + + The plugin instance. + The BepInPlugin metadata of the plugin instance. + + + + Gets the specified attributes of a type, if they exist. + + The attribute type to retrieve. + The plugin type. + The attributes of the type, if existing. + + + + Gets the specified attributes of an instance, if they exist. + + The attribute type to retrieve. + The plugin instance. + The attributes of the instance, if existing. + + + + Retrieves the dependencies of the specified plugin type. + + The plugin type. + A list of all plugin types that the specified plugin type depends upon. + + + + This class is appended to AssemblyInfo.cs when BepInEx is built via a CI pipeline. + 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. + + + + + The manager and loader for all plugins, and the entry point for BepInEx plugin system. + + + + + The loaded and initialized list of plugins. + + + + + List of all loaded via the chainloader. + + + + + Collection of error chainloader messages that occured during plugin loading. + Contains information about what certain plugins were not loaded. + + + + + The GameObject that all plugins are attached to as components. + + + + + Initializes BepInEx to be able to start the chainloader. + + + + + Analyzes the given type definition and attempts to convert it to a valid + + Type definition to analyze. + If the type represent a valid plugin, returns a instance. Otherwise, return null. + + + + The entrypoint for the BepInEx plugin system. + + + + + A cacheable metadata item. Can be used with and to cache plugin metadata. + + + + + Serialize the object into a binary format. + + + + + + Loads the object from binary format. + + + + + + A cached assembly. + + + + + + List of cached items inside the assembly. + + + + + Timestamp of the assembly. Used to check the age of the cache. + + + + + Provides methods for loading specified types from an assembly. + + + + + Default assembly resolved used by the + + + + + Default reader parameters used by + + + + + Event fired when fails to resolve a type during type loading. + + + + + Looks up assemblies in the given directory and locates all types that can be loaded and collects their metadata. + + The specific base type to search for. + The directory to search for assemblies. + A function to check if a type should be selected and to build the type metadata. + A filter function to quickly determine if the assembly can be loaded. + The name of the cache to get cached types from. + A dictionary of all assemblies in the directory and the list of type metadatas of types that match the selector. + + + + Loads an index of type metadatas from a cache. + + Name of the cache + Cacheable item + Cached type metadatas indexed by the path of the assembly that defines the type. If no cache is defined, return null. + + + + Saves indexed type metadata into a cache. + + Name of the cache + List of plugin metadatas indexed by the path to the assembly that contains the types + Cacheable item + + + + Converts TypeLoadException to a readable string. + + TypeLoadException + Readable representation of the exception + + + + The base plugin type that is used by the BepInEx plugin loader. + + + + + Information about this plugin as it was loaded. + + + + + Logger instance tied to this plugin. + + + + + Default config file tied to this plugin. The config file will not be created until + any settings are added and changed, or is called. + + + + + Create a new instance of a plugin and all of its tied in objects. + + BepInPlugin attribute is missing. + + + + Logs entries using Unity specific outputs. + + + + + Log levels to display. + + + + + Writer for the disk log. + + + + + Timer for flushing the logs to a file. + + + + + Whether to write Unity log messages to disk log. + + + + + Creates a new disk log listener. + + Path to the log. + Log levels to display. + Whether to append logs to an already existing log file. + Whether to include Unity log into the disk log. + + + + + + + + + + Disposes of Disk logger + + + + + Log event arguments. Contains info about the log message. + + + + + Logged data. + + + + + Log levels for the data. + + + + + Log source that emitted the log event. + + + + + Creates the log event args- + + Logged data. + Log level of the data. + Log source that emits these args. + + + + + + + Like but appends newline at the end. + + Same output as but with new line. + + + + A static Logger instance. + + + + + Collection of all log listeners that receive log events. + + + + + Collection of all log source that output log events. + + + + + Logs an entry to the current logger instance. + + The level of the entry. + The textual value of the entry. + + + + Creates a new log source with a name and attaches it to log sources. + + Name of the log source to create. + An instance of that allows to write logs. + + + + The level, or severity of a log entry. + + + + + No level selected. + + + + + A fatal error has occurred, which cannot be recovered from. + + + + + An error has occured, but can be recovered from. + + + + + A warning has been produced, but does not necessarily mean that something wrong has happened. + + + + + An important message that should be displayed to the user. + + + + + A message of low importance. + + + + + A message that would likely only interest a developer. + + + + + All log levels. + + + + + Helper methods for log level handling. + + + + + Gets the highest log level when there could potentially be multiple levels provided. + + The log level(s). + The highest log level supplied. + + + + Returns a translation of a log level to it's associated console colour. + + The log level(s). + A console color associated with the highest log level supplied. + + + + A generic log listener that receives log events and can route them to some output (e.g. file, console, socket). + + + + + Handle an incoming log event. + + Log source that sent the event. Don't use; instead use + Information about the log message. + + + + Log source that can output log messages. + + + + + Name of the log source. + + + + + Event that sends the log message. Call to send a log message. + + + + + A generic, multi-purpose log source. Exposes simple API to manually emit logs. + + + + + + + + + + + Creates a manual log source. + + Name of the log source. + + + + Logs a message with the specified log level. + + Log levels to attach to the message. Multiple can be used with bitwise ORing. + Data to log. + + + + Logs a message with level. + + Data to log. + + + + Logs a message with level. + + Data to log. + + + + Logs a message with level. + + Data to log. + + + + Logs a message with level. + + Data to log. + + + + Logs a message with level. + + Data to log. + + + + Logs a message with level. + + Data to log. + + + + + + + A source that routes all logs from API to BepInEx logger. + + + + + + Whether Trace logs are rerouted. + + + + + Creates a new trace log source. + + New log source (or already existing one). + + + + Internal log source. + + + + + Creates a new trace log source. + + + + + Writes a message to the underlying instance. + + The message to write. + + + + Writes a message and a newline to the underlying instance. + + The message to write. + + + + + + + + + + Logs entries using Unity specific outputs. + + + + + + + + + + + Logs entries using Unity specific outputs. + + + + + + + + + + + Logs entries using Unity specific outputs. + + + + + + + + + + + Creates a new Unity log source. + + + + + + + + Paths used by BepInEx + + + + + List of directories from where Mono will search assemblies before assembly resolving is invoked. + + + + + The directory that the core BepInEx DLLs reside in. + + + + + The path to the core BepInEx DLL. + + + + + The path to the main BepInEx folder. + + + + + The path of the currently executing program BepInEx is encapsulated in. + + + + + The directory that the currently executing process resides in. + On OSX however, this is the parent directory of the game.app folder. + + + + + The path to the Managed folder of the currently running Unity game. + + + + + The path to the config directory. + + + + + The path to the global BepInEx configuration file. + + + + + The path to temporary cache files. + + + + + The path to the patcher plugin folder which resides in the BepInEx folder. + + + + + The path to the plugin folder which resides in the BepInEx folder. + + This is ONLY guaranteed to be set correctly when Chainloader has been initialized. + + + + + + The name of the currently executing process. + + + + + Provides methods for running code on other threads and synchronizing with the main thread. + + + + + Current instance of the helper. + + + + + Gives methods for invoking delegates on the main unity thread, both synchronously and asynchronously. + Can be used in many built-in framework types, for example + and to make their events fire on the main unity thread. + + + + + Queue the delegate to be invoked on the main unity thread. Use to synchronize your threads. + + + + + Queue the delegate to be invoked on a background thread. Use this to run slow tasks without affecting the game. + NOTE: Most of Unity API can not be accessed while running on another thread! + + + Task to be executed on another thread. Can optionally return an Action that will be executed on the main thread. + You can use this action to return results of your work safely. Return null if this is not needed. + + + + + False if current code is executing on the main unity thread, otherwise True. + Warning: Will return true before the first frame finishes (i.e. inside plugin Awake and Start methods). + + + + + + Convenience extensions for utilizing multiple threads and using the . + + + + + + + + Apply a function to a collection of data by spreading the work on multiple threads. + Outputs of the functions are returned to the current thread and yielded one by one. + + Type of the input values. + Type of the output values. + Input values for the work function. + Function to apply to the data on multiple threads at once. + Number of worker threads. By default SystemInfo.processorCount is used. + An exception was thrown inside one of the threads, and the operation was aborted. + Need at least 1 workerCount. + + + + Generic helper properties and methods. + + + + + Whether current Common Language Runtime supports dynamic method generation using namespace. + + + + + An encoding for UTF-8 which does not emit a byte order mark (BOM). + + + + + Try to perform an action. + + Action to perform. + Possible exception that gets returned. + True, if action succeeded, false if an exception occured. + + + + Combines multiple paths together, as the specific method is not available in .NET 3.5. + + The multiple paths to combine together. + A combined path. + + + + Returns the parent directory of a path, optionally specifying the amount of levels. + + The path to get the parent directory of. + The amount of levels to traverse. Defaults to 1 + The parent directory. + + + + Tries to parse a bool, with a default value if unable to parse. + + The string to parse + The value to return if parsing is unsuccessful. + Boolean value of input if able to be parsed, otherwise default value. + + + + Converts a file path into a UnityEngine.WWW format. + + The file path to convert. + A converted file path. + + + + Indicates whether a specified string is null, empty, or consists only of white-space characters. + + The string to test. + True if the value parameter is null or empty, or if value consists exclusively of white-space characters. + + + + Sorts a given dependency graph using a direct toposort, reporting possible cyclic dependencies. + + Nodes to sort + Function that maps a node to a collection of its dependencies. + Type of the node in a dependency graph. + Collection of nodes sorted in the order of least dependencies to the most. + Thrown when a cyclic dependency occurs. + + + + Checks whether a given cecil type definition is a subtype of a provided type. + + Cecil type definition + Type to check against + Whether the given cecil type is a subtype of the type. + + + + Try to resolve and load the given assembly DLL. + + Name of the assembly, of the type . + Directory to search the assembly from. + The loaded assembly. + True, if the assembly was found and loaded. Otherwise, false. + + + + Try to resolve and load the given assembly DLL. + + Name of the assembly, of the type . + Directory to search the assembly from. + Reader parameters that contain possible custom assembly resolver. + The loaded assembly. + True, if the assembly was found and loaded. Otherwise, false. + + + + Tries to create a file with the given name + + Path of the file to create + File open mode + Resulting filestream + File access options + File share options + + + + + Try to parse given string as an assembly name + + Fully qualified assembly name + Resulting instance + true, if parsing was successful, otherwise false + + On some versions of mono, using fails because it runs on unmanaged side + which has problems with encoding. + Using solves this by doing parsing on managed side instead. + + + + + Gets unique files in all given directories. If the file with the same name exists in multiple directories, + only the first occurrence is returned. + + Directories to search from. + File pattern to search. + Collection of all files in the directories. + + + + Console class with safe handlers for Unity 4.x, which does not have a proper Console implementation + + + + diff --git a/lib/HOOKS-Assembly-CSharp.dll b/lib/HOOKS-Assembly-CSharp.dll new file mode 100644 index 0000000..eb8aeca Binary files /dev/null and b/lib/HOOKS-Assembly-CSharp.dll differ diff --git a/lib/Mono.Cecil.Rocks.dll b/lib/Mono.Cecil.Rocks.dll new file mode 100644 index 0000000..a77ac87 Binary files /dev/null and b/lib/Mono.Cecil.Rocks.dll differ diff --git a/lib/Mono.Cecil.dll b/lib/Mono.Cecil.dll new file mode 100644 index 0000000..18735f9 Binary files /dev/null and b/lib/Mono.Cecil.dll differ diff --git a/lib/MonoMod.RuntimeDetour.dll b/lib/MonoMod.RuntimeDetour.dll new file mode 100644 index 0000000..a5f47d1 Binary files /dev/null and b/lib/MonoMod.RuntimeDetour.dll differ diff --git a/lib/MonoMod.RuntimeDetour.xml b/lib/MonoMod.RuntimeDetour.xml new file mode 100644 index 0000000..45e9d3b --- /dev/null +++ b/lib/MonoMod.RuntimeDetour.xml @@ -0,0 +1,178 @@ + + + + MonoMod.RuntimeDetour + + + + + A fully managed detour. + Multiple Detours for a method to detour from can exist at any given time. Detours can be layered. + If you're writing your own detour manager or need to detour native functions, it's better to create instances of NativeDetour instead. + + + + + Mark the detour as applied in the detour chain. This can be done automatically when creating an instance. + + + + + Undo the detour without freeing it, allowing you to reapply it later. + + + + + Free the detour, while also permanently undoing it. This makes any further operations on this detour invalid. + + + + + Undo and free this temporary detour. + + + + + Generate a new DynamicMethod with which you can invoke the previous state. + + + + + Generate a new DynamicMethod with which you can invoke the previous state. + + + + + Generate a new DynamicMethod with which you can invoke the previous state. + + + + + A "raw" native detour, acting as a wrapper around NativeDetourData with a few helpers. + Only one NativeDetour for a method to detour from can exist at any given time. NativeDetours cannot be layered. + If you don't need the trampoline generator or any of the management helpers, use DetourManager.Native directly. + Unless you're writing your own detour manager or need to detour native functions, it's better to create instances of Detour instead. + + + + + Apply the native detour. This can be done automatically when creating an instance. + + + + + Undo the native detour without freeing the detour native data, allowing you to reapply it later. + + + + + Changes the source of this native detour to a new source address. This does not repair the old source location. + This also assumes that is simply a new address for the same method as this was constructed with. + + The new source location. + + + + Changed the target of this native detour to a new target. + + The new target address. + + + + Free the detour's data without undoing it. This makes any further operations on this detour invalid. + + + + + Undo and free this temporary detour. + + + + + Generate a new DynamicMethod with which you can invoke the previous state. + If the NativeDetour holds a reference to a managed method, a copy of the original method is returned. + If the NativeDetour holds a reference to a native function, an "undo-call-redo" trampoline with a matching signature is returned. + + + + + Generate a new delegate with which you can invoke the previous state. + If the NativeDetour holds a reference to a managed method, a copy of the original method is returned. + If the NativeDetour holds a reference to a native function, an "undo-call-redo" trampoline with a matching signature is returned. + + + + + Write the given value at the address to + offs, afterwards advancing offs by sizeof(byte). + + + + + Write the given value at the address to + offs, afterwards advancing offs by sizeof(ushort). + + + + + Write the given value at the address to + offs, afterwards advancing offs by sizeof(ushort). + + + + + Write the given value at the address to + offs, afterwards advancing offs by sizeof(ulong). + + + + + Generate a DynamicMethod to easily call the given native function from another DynamicMethod. + + The pointer to the native function to call. + A MethodBase with the target function's signature. + The detoured DynamicMethod. + + + + Fill the DynamicMethodDefinition with a throw. + + + + + Emit a call to DetourManager.Native.Copy using the given parameters. + + + + + Emit a call to DetourManager.Native.Apply using a copy of the given data. + + + + + The data forming a "raw" native detour, created and consumed by DetourManager.Native. + + + + + The method to detour from. Set when the structure is created by the IDetourNativePlatform. + + + + + The target method to be called instead. Set when the structure is created by the IDetourNativePlatform. + + + + + The type of the detour. Determined when the structure is created by the IDetourNativePlatform. + + + + + The size of the detour. Calculated when the structure is created by the IDetourNativePlatform. + + + + + DetourManager.Native-specific data. + + + + diff --git a/lib/MonoMod.Utils.dll b/lib/MonoMod.Utils.dll new file mode 100644 index 0000000..8fd1161 Binary files /dev/null and b/lib/MonoMod.Utils.dll differ diff --git a/lib/MonoMod.Utils.xml b/lib/MonoMod.Utils.xml new file mode 100644 index 0000000..98b3a7d --- /dev/null +++ b/lib/MonoMod.Utils.xml @@ -0,0 +1,1465 @@ + + + + MonoMod.Utils + + + + + An IL manipulation "context" with various helpers and direct access to the MethodBody. + + + + + The manipulator callback, accepted by the Invoke method. + + + + + + The manipulated method. + + + + + The manipulated method's IL processor. + + + + + The manipulated method body. + + + + + The manipulated method's module. + + + + + The manipulated method instructions. + + + + + A readonly list of all defined labels. + + + + + Has the context been made read-only? No further method access is possible, but the context has not yet been disposed. + + + + + Events which run when the context will be disposed. + + + + + The current reference bag. Used for methods such as EmitReference and EmitDelegate. + + + + + Invoke a given manipulator callback. + + The manipulator to run in this context. + + + + Mark this ILContext as read-only and prevent this context from further accessing the originally passed method. + + + If the method is altered prior to calling MakeReadOnly or afterwards by accessing the method directly, the results are undefined. + + + + + See + + + + + See + + + + + See + + + + + Define a new label to be marked with a cursor. + + A label without a target instruction. + + + + Define a new label pointing at a given instruction. + + The instruction the label will point at. + A label pointing at the given instruction. + + + + Determine the index of a given instruction. + + The instruction to get the index of. + The instruction index, or the end of the method body if it hasn't been found. + + + + Obtain all labels pointing at the given instruction. + + The instruction to get all labels for. + All labels targeting the given instruction. + + + + Bind an arbitary object to an ILContext for static retrieval. + + The type of the object. The combination of typeparam and id provides the unique static reference. + The object to store. + The id to use in combination with the typeparam for object retrieval. + + + + Dispose this context, making it read-only and invoking all OnDispose event listeners. + + + + + Obtain a string representation of this context (method ID and body). + + A string representation of this context. + + + + Specifies where a ILCursor should be positioned in relation to the target of a search function + + + + + Move the cursor before the first instruction in the match + + + + + Equivalent to Before with `cursor.MoveAfterLabels()` causing emitted instructions to become the target of incoming labels + + + + + Move the cursor after the last instruction in the match + + + + + Indicates whether the position of a ILCursor is the result of a search function and + if the next search should ignore the instruction preceeding or following this cursor. + + SearchTarget.Next is the result of searching with MoveType.Before, and SearchTarget.Prev from MoveType.After + + + + + A foward searching function cannot match the Next instruction and must move the cursor forward + + + + + A reverse searching function cannot match the Next instruction and must move the cursor backward + + + + + A cursor used to manipulate a method body in an ILContext. + + + + + The context to which this cursor belongs to. + + + + + The instruction immediately following the cursor position or null if the cursor is at the end of the instruction list. + + + + + The instruction immediately preceding the cursor position or null if the cursor is at the start of the instruction list. + + + + + The instruction immediately preceding the cursor position or null if the cursor is at the start of the instruction list. + + + + + The index of the instruction immediately following the cursor position. Range: 0 to Instrs.Count + Setter accepts negative indexing by adding Instrs.Count to the operand + + + + + Indicates whether the position of a MMILCursor is the result of a search function and + if the next search should ignore the instruction preceeding or following this cursor. + + See + + + + + Enumerates all labels which point to the current instruction (label.Target == Next) + + + + + See + + + + + See + + + + + See + + + + + See + + + + + See + + + + + Create a clone of this cursor. + + The cloned cursor. + + + + Is this cursor before the given instruction? + + The instruction to check. + True if this cursor is before the given instruction, false otherwise. + + + + Is this cursor after the given instruction? + + The instruction to check. + True if this cursor is after the given instruction, false otherwise. + + + + Obtain a string representation of this cursor (method ID, index, search target, surrounding instructions). + + A string representation of this cursor. + + + + Move the cursor to a target instruction. All other movements go through this. + + The target instruction + Where to move in relation to the target instruction and incoming labels (branches) + Whether to set the `SearchTarget` and skip the target instruction with the next search function + this + + + + 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. + + this + + + + Move the cursor before incoming labels (branches). This is the default behaviour. Emitted instructions will not cause labels to change targets. + + this + + + + Move the cursor to a target index. Supports negative indexing. See + + this + + + + Overload for Goto(label.Target). defaults to MoveType.AfterLabel + + this + + + + Search forward and moves the cursor to the next sequence of instructions matching the corresponding predicates. See also + + this + If no match is found + + + + Search forward and moves the cursor to the next sequence of instructions matching the corresponding predicates. + + True if a match was found + + + + Search backward and moves the cursor to the next sequence of instructions matching the corresponding predicates. See also + + this + If no match is found + + + + Search backward and moves the cursor to the next sequence of instructions matching the corresponding predicates. + + True if a match was found + + + + Find the next occurences of a series of instructions matching the given set of predicates with gaps permitted. + + An array of cursors corresponding to each found instruction (MoveType.Before) + If no match is found + + + + Find the next occurences of a series of instructions matching the given set of predicates with gaps permitted. + + An array of cursors corresponding to each found instruction (MoveType.Before) + True if a match was found + + + + Search backwards for occurences of a series of instructions matching the given set of predicates with gaps permitted. + + An array of cursors corresponding to each found instruction (MoveType.Before) + If no match is found + + + + Search backwards for occurences of a series of instructions matching the given set of predicates with gaps permitted. + + An array of cursors corresponding to each found instruction (MoveType.Before) + True if a match was found + + + + Set the target of a label to the current position (label.Target = Next) and moves after it. + + The label to mark + + + + Create a new label targetting the current position (label.Target = Next) and moves after it. + + The newly created label + + + + Create a new label for use with + + A new label with no target + + + + Remove the Next instruction + + + + + Remove several instructions + + + + + Move the cursor and all labels the cursor is positioned after to a target instruction + + + + + Emit a new instruction at this cursor's current position. + + The instruction opcode. + The instruction operand. + this + + + + Emit a new instruction at this cursor's current position. + + The instruction opcode. + The instruction operand. + this + + + + Emit a new instruction at this cursor's current position. + + The instruction opcode. + The instruction operand. + this + + + + Emit a new instruction at this cursor's current position. + + The instruction opcode. + The instruction operand. + this + + + + Emit a new instruction at this cursor's current position. + + The instruction opcode. + The instruction operand. + this + + + + Emit a new instruction at this cursor's current position. + + The instruction opcode. + The instruction operand. + this + + + + Emit a new instruction at this cursor's current position. + + The instruction opcode. + The instruction operand. + this + + + + Emit a new instruction at this cursor's current position. + + The instruction opcode. + The instruction operand. + this + + + + Emit a new instruction at this cursor's current position. + + The instruction opcode. + The instruction operand. + this + + + + Emit a new instruction at this cursor's current position. + + The instruction opcode. + The instruction operand. + this + + + + Emit a new instruction at this cursor's current position. + + The instruction opcode. + The instruction operand. + this + + + + Emit a new instruction at this cursor's current position. + + The instruction opcode. + The instruction operand. + this + + + + Emit a new instruction at this cursor's current position. + + The instruction opcode. + The instruction operand. + this + + + + Emit a new instruction at this cursor's current position. + + The instruction opcode. + this + + + + Emit a new instruction at this cursor's current position. + + The instruction opcode. + The instruction operand. + this + + + + Emit a new instruction at this cursor's current position. + + The instruction opcode. + The instruction operand. + this + + + + Emit a new instruction at this cursor's current position. + + The instruction opcode. + The instruction operand. + this + + + + Emit a new instruction at this cursor's current position. + + The instruction opcode. + The instruction operand. + this + + + + Emit a new instruction at this cursor's current position. + + The instruction opcode. + The instruction operand. + this + + + + Emit a new instruction at this cursor's current position. + + The instruction opcode. + The instruction operand. + this + + + + Emit a new instruction at this cursor's current position, accessing a given member. + + The type in which the member is defined. + The instruction opcode. + The accessed member name. + this + + + + Bind an arbitary object to an ILContext for static retrieval. See + + + + + Emit the IL to retrieve a stored reference of type with the given and place it on the stack. + + + + + Store an object in the reference store, and emit the IL to retrieve it and place it on the stack. + + + + + Emit the IL to invoke a delegate as if it were a method. Stack behaviour matches OpCodes.Call + + + + + A label to be used in ILContexts. + + + + + The target instruction this label points at. + + + + + All instructions using this label. + + + + + An IL inline reference bag used for ILContexts. + + + + + Get the object for the given ID. + + The object type. + The object ID. + The stored object. + + + + Get a MethodInfo for the getter. + + The object type. + The getter method. + + + + Store a new object. + + The object type. + The object to be stored. + An ID to be used for all further operations. + + + + Remove the object with the given ID from the bag, essentially clearing the ID's slot. + + The object type. + The object ID. + + + + Get a MethodInfo invoking a delegate of the given type, with the delegate at the top of the stack. Used by . + + The delegate type. + A MethodInfo invoking a delegate of the given type. + + + + The default IL reference bag. Throws NotSupportedException for every operation. + + + + + An IL reference bag implementation to be used for runtime-generated methods. + + + + + Collection of extensions used by MonoMod and other projects. + + + + + Create a hexadecimal string for the given bytes. + + The input bytes. + The output hexadecimal string. + + + + Invokes all delegates in the invocation list, passing on the result to the next. + + Type of the result. + The multicast delegate. + The initial value and first parameter. + Any other arguments that may be passed. + The result of all delegates. + + + + Invokes all delegates in the invocation list, as long as the previously invoked delegate returns true. + + + + + Invokes all delegates in the invocation list, as long as the previously invoked delegate returns false. + + + + + Invokes all delegates in the invocation list, as long as the previously invoked delegate returns null. + + + + + Split PascalCase words to become Pascal Case instead. + + PascalCaseString + Pascal Case String + + + + Read the string from the BinaryReader BinaryWriter in a C-friendly format. + + The input which the method reads from. + The output string. + + + + Write the string to the BinaryWriter in a C-friendly format. + + The output which the method writes to. + The input string. + + + + Cast a delegate from one type to another. Compatible with delegates holding an invocation list (combined delegates). + + The input delegate. + The output delegate. + + + + Cast a delegate from one type to another. Compatible with delegates holding an invocation list (combined delegates). + + The input delegate. + The wanted output delegate type. + The output delegate. + + + + Print the exception to the console, including extended loading / reflection data useful for mods. + + + + + Get the method of interest for a given state machine method. + + The method creating the state machine. + The "main" method in the state machine. + + + + Gets the actual generic method definition of a method, as defined on the fully open type. + + The potentially instantiated method to find the definition of. + The original method definition, with no generic arguments filled in. + + + + Safely resolve a reference, silently discarding any exceptions. + + The reference to resolve. + The resolved definition or null. + + + + Safely resolve a reference, silently discarding any exceptions. + + The reference to resolve. + The resolved definition or null. + + + + Safely resolve a reference, silently discarding any exceptions. + + The reference to resolve. + The resolved definition or null. + + + + Safely resolve a reference, silently discarding any exceptions. + + The reference to resolve. + The resolved definition or null. + + + + Get a certain custom attribute from an attribute provider. + + The attribute provider. + The custom attribute name. + The first matching custom attribute, or null if no matching attribute has been found. + + + + Determine if an attribute provider has got a specific custom attribute. + + The attribute provider. + The custom attribute name. + true if the attribute provider contains the given custom attribute, false otherwise. + + + + Get the integer value pushed onto the stack with this instruction. + + The instruction to get the pushed integer value for. + The pushed integer value. + + + + Get the integer value pushed onto the stack with this instruction. + + The instruction to get the pushed integer value for. + The pushed integer value or null. + + + + Determine if the method call is a base method call. + + The caller method body. + The called method. + True if the called method is a base method of the caller method, false otherwise. + + + + Determine if the given method can be preferably called using callvirt. + + The called method. + True if the called method can be called using callvirt, false otherwise. + + + + Determine if the given type is a struct (also known as "value type") or struct-alike (f.e. primitive). + + The type to check. + True if the type is a struct, primitive or similar, false otherwise. + + + + Get the long form opcode for any short form opcode. + + The short form opcode. + The long form opcode. + + + + Get the short form opcode for any long form opcode. + + The long form opcode. + The short form opcode. + + + + Calculate updated instruction offsets. Required for certain manual fixes. + + The method to recalculate the IL instruction offsets for. + + + + Fix (and optimize) any instructions which should use the long / short form opcodes instead. + + The method to apply the fixes to. + + + + Check if the signatures of a given System.Reflection and Mono.Cecil member reference match. + + The System.Reflection member reference. + The Mono.Cecil member reference. + True if both references share the same signature, false otherwise. + + + + Check if the signatures of a given System.Reflection and Mono.Cecil member reference match. + + The Mono.Cecil member reference. + The System.Reflection member reference. + True if both references share the same signature, false otherwise. + + + + See + + + + + See + + + + + See + + + + + See + + + + + See + + + + + Determine if two types are compatible with each other (f.e. object with string, or enums with their underlying integer type). + + The first type. + The second type. + True if both types are compatible with each other, false otherwise. + + + + Creates a delegate of the specified type from this method. + + The method to create the delegate from. + The type of the delegate to create. + The delegate for this method. + + + + Creates a delegate of the specified type with the specified target from this method. + + The method to create the delegate from. + The type of the delegate to create. + The object targeted by the delegate. + The delegate for this method. + + + + Creates a delegate of the specified type from this method. + + The method to create the delegate from. + The type of the delegate to create. + The delegate for this method. + + + + Creates a delegate of the specified type with the specified target from this method. + + The method to create the delegate from. + The type of the delegate to create. + The object targeted by the delegate. + The delegate for this method. + + + + Find a method for a given ID. + + The type to search in. + The method ID. + Whether to perform a simple search pass as well or not. + The first matching method or null. + + + + Find a method for a given ID recursively (including the passed type's base types). + + The type to search in. + The method ID. + Whether to perform a simple search pass as well or not. + The first matching method or null. + + + + Find a method for a given ID. + + The type to search in. + The method ID. + Whether to perform a simple search pass as well or not. + The first matching method or null. + + + + Find a method for a given ID recursively (including the passed type's base types). + + The type to search in. + The method ID. + Whether to perform a simple search pass as well or not. + The first matching method or null. + + + + Find a property for a given name. + + The type to search in. + The property name. + The first matching property or null. + + + + Find a property for a given name recursively (including the passed type's base types). + + The type to search in. + The property name. + The first matching property or null. + + + + Find a field for a given name. + + The type to search in. + The field name. + The first matching field or null. + + + + Find a field for a given name recursively (including the passed type's base types). + + The type to search in. + The field name. + The first matching field or null. + + + + Find an event for a given name. + + The type to search in. + The event name. + The first matching event or null. + + + + Find an event for a given name recursively (including the passed type's base types). + + The type to search in. + The event name. + The first matching event or null. + + + + Get a reference ID that is similar to the full name, but consistent between System.Reflection and Mono.Cecil. + + The method to get the ID for. + The name to use instead of the reference's own name. + The ID to use instead of the reference's declaring type ID. + Whether the type ID should be included or not. System.Reflection avoids it by default. + Whether the ID should be "simple" (name only). + The ID. + + + + Get a reference ID that is similar to the full name, but consistent between System.Reflection and Mono.Cecil. + + The call site to get the ID for. + The ID. + + + + Get a reference ID that is similar to the full name, but consistent between System.Reflection and Mono.Cecil. + + The method to get the ID for. + The name to use instead of the reference's own name. + The ID to use instead of the reference's declaring type ID. + Whether the type ID should be included or not. System.Reflection avoids it by default. + Whether the method is regarded as a proxy method or not. Setting this paramater to true will skip the first parameter. + Whether the ID should be "simple" (name only). + The ID. + + + + Get the "patch name" - the name of the target to patch - for the given member. + + The member to get the patch name for. + The patch name. + + + + Get the "patch name" - the name of the target to patch - for the given member. + + The member to get the patch name for. + The patch name. + + + + Clone the given method definition. + + The original method. + The method definition to apply the cloning process onto, or null to create a new method. + A clone of the original method. + + + + Clone the given method body. + + The original method body. + The method which will own the newly cloned method body. + A clone of the original method body. + + + + Force-update a generic parameter's position and type. + + The generic parameter to update. + The new position. + The new type. + The updated generic parameter. + + + + Resolve a given generic parameter in another context. + + The new context. + The original generic parameter. + A generic parameter provided by the given context which matches the original generic parameter. + + + + Relink the given member reference (metadata token provider). + + The reference to relink. + The relinker to use during the relinking process. + The generic context provided to relink generic references. + A relinked reference. + + + + Relink the given type reference. + + The reference to relink. + The relinker to use during the relinking process. + The generic context provided to relink generic references. + A relinked reference. + + + + Relink the given method reference. + + The reference to relink. + The relinker to use during the relinking process. + The generic context provided to relink generic references. + A relinked reference. + + + + Relink the given callsite. + + The reference to relink. + The relinker to use during the relinking process. + The generic context provided to relink generic references. + A relinked reference. + + + + Relink the given field reference. + + The reference to relink. + The relinker to use during the relinking process. + The generic context provided to relink generic references. + A relinked reference. + + + + Relink the given parameter definition. + + The reference to relink. + The relinker to use during the relinking process. + The generic context provided to relink generic references. + A relinked reference. + + + + Clone the given parameter definition. + + The original parameter definition. + A clone of the original parameter definition. + + + + Relink the given custom attribute. + + The reference to relink. + The relinker to use during the relinking process. + The generic context provided to relink generic references. + A relinked reference. + + + + Clone the given custom attribute. + + The original custom attribute. + A clone of the original custom attribute. + + + + Relink the given generic parameter reference. + + The reference to relink. + The relinker to use during the relinking process. + The generic context provided to relink generic references. + A relinked reference. + + + + Clone the given generic parameter. + + The original generic parameter. + A clone of the original generic parameter. + + + + Get the managed size of a given type. This matches an IL-level sizeof(t), even if it cannot be determined normally in C#. + Note that sizeof(t) != Marshal.SizeOf(t), f.e. when t is char. + + The type to get the size from. + The managed type size. + + + + Get a type which matches what the method should receive via ldarg.0 + + The method to obtain the "this" parameter type from. + The "this" parameter type. + + + + Get a native function pointer for a given method. This matches an IL-level ldftn. + + + The result of ldftn doesn't always match that of MethodHandle.GetFunctionPointer(). + For example, ldftn doesn't JIT-compile the method on mono, which thus keeps the class constructor untouched. + And on .NET, struct overrides (f.e. ToString) have got multiple entry points pointing towards the same code. + + The method to get a native function pointer for. + The native function pointer. + + + + A variant of ILGenerator which uses Mono.Cecil under the hood. + + + + + The underlying Mono.Cecil.Cil.ILProcessor. + + + + + Abstract version of System.Reflection.Emit.ILGenerator. See for proper documentation. + + + + + Get a "real" ILGenerator for this ILGeneratorShim. + + A "real" ILGenerator. + + + + Get the proxy type for a given ILGeneratorShim type. The proxy type implements ILGenerator. + + The ILGeneratorShim type. + The "real" ILGenerator type. + + + + Get the proxy type for a given ILGeneratorShim type. The proxy type implements ILGenerator. + + The ILGeneratorShim type. + The "real" ILGenerator type. + + + + Get the non-generic proxy type implementing ILGenerator. + + The "real" ILGenerator type, non-generic. + + + + A DynamicMethodDefinition "generator", responsible for generating a runtime MethodInfo from a DMD MethodDefinition. + + + + + + A DMDGenerator implementation using Mono.Cecil to build an in-memory assembly. + + + + + Fill the DynamicMethod with a stub. + + + + + Fill the DynamicMethod with a stub. + + + + + Emit a reference to an arbitrary object. Note that the references "leak." + + + + + Emit a reference to an arbitrary object. Note that the references "leak." + + + + + Emit a reference to an arbitrary object. Note that the references "leak." + + + + + Emit a reference to an arbitrary object. Note that the references "leak." + + + + + Allows you to remap library paths / names and specify loading flags. Useful for cross-platform compatibility. Applies only to DynDll. + + + + + Open a given library and get its handle. + + The library name. + Whether to skip using the mapping or not. + Any optional platform-specific flags. + The library handle. + + + + Try to open a given library and get its handle. + + The library name. + The library handle, or null if it failed loading. + Whether to skip using the mapping or not. + Any optional platform-specific flags. + True if the handle was obtained, false otherwise. + + + + Release a library handle obtained via OpenLibrary. Don't release the result of OpenLibrary(null)! + + The library handle. + + + + Get a function pointer for a function in the given library. + + The library handle. + The function name. + The function pointer. + + + + Get a function pointer for a function in the given library. + + The library handle. + The function name. + The function pointer, or null if it wasn't found. + True if the function pointer was obtained, false otherwise. + + + + Extension method wrapping Marshal.GetDelegateForFunctionPointer + + + + + Fill all static delegate fields with the DynDllImport attribute. + Call this early on in the static constructor. + + The type containing the DynDllImport delegate fields. + Any optional mappings similar to the static mappings. + + + + Fill all instance delegate fields with the DynDllImport attribute. + Call this early on in the constructor. + + An instance of a type containing the DynDllImport delegate fields. + Any optional mappings similar to the static mappings. + + + + Similar to DllImport, but requires you to run typeof(DeclaringType).ResolveDynDllImports(); + + + + + The library or library alias to use. + + + + + A list of possible entrypoints that the function can be resolved to. Implicitly includes the field name and delegate name. + + + + The library or library alias to use. + A list of possible entrypoints that the function can be resolved to. Implicitly includes the field name and delegate name. + + + + A mapping entry, to be used by . + + + + + The name as which the library will be resolved as. Useful to remap libraries or to provide full paths. + + + + + Platform-dependent loading flags. + + + + The name as which the library will be resolved as. Useful to remap libraries or to provide full paths. + Platform-dependent loading flags. + + + + The relinker callback delegate type. + + The reference (metadata token provider) to relink. + The generic context provided to relink generic references. + A relinked reference. + + + + Generic platform enum. + + + + + Bit applied to all OSes (Unknown, Windows, MacOS, ...). + + + + + On demand 64-bit platform bit. + + + + + Applied to all NT and NT-oid platforms (Windows). + + + + + Applied to all Unix and Unix-oid platforms (macOS, Linux, ...). + + + + + On demand ARM platform bit. + + + + + Unknown OS. + + + + + Windows, using the NT kernel. + + + + + macOS, using the Darwin kernel. + + + + + Linux. + + + + + Android, using the Linux kernel. + + + + + iOS, sharing components with macOS. + + + + diff --git a/lib/MonoMod.dll b/lib/MonoMod.dll new file mode 100644 index 0000000..facf3c1 Binary files /dev/null and b/lib/MonoMod.dll differ diff --git a/lib/PUBLIC-Assembly-CSharp.dll b/lib/PUBLIC-Assembly-CSharp.dll new file mode 100644 index 0000000..dd1fb5e Binary files /dev/null and b/lib/PUBLIC-Assembly-CSharp.dll differ diff --git a/lib/SlugBase.dll b/lib/SlugBase.dll new file mode 100644 index 0000000..c407a52 Binary files /dev/null and b/lib/SlugBase.dll differ diff --git a/lib/SlugBase.xml b/lib/SlugBase.xml new file mode 100644 index 0000000..2b1d71c --- /dev/null +++ b/lib/SlugBase.xml @@ -0,0 +1,1344 @@ + + + + SlugBase + + + + + A scene added by SlugBase. + + + + + Stores all registered s. + + + + + This scene's unique ID. + + + + + An array of images in this scene. + + + + + An array of depths that the camera may focus on. + + + + + A path relative to StreamingAssets to load images from. + + + + + The position of the glow's center. + Only effective when used on the slugcat select screen. + + + + + The position of the mark's center. + Only effective when used on the slugcat select screen. + + + + + The pixel offset for this scene in the select menu. + Only effective when used on the slugcat select screen. + + + + + The depth of the slugcat image in this scene. + Only effective when used on the slugcat select screen. + + + + + An image from a . + + + + + The file name of the image to load. This is combined with . + + + + + The pixel position of this image's bottom left corner in the scene. + + + + + The depth of this image in the scene. + + + + + The shader to use when rendering. Defaults to . + + + + + If true, this image will display when in flat mode and will be hidden otherwise. + + + + + Creates a new image. + + The file name. + The pixel position of the bottom left corner. + + + + + Creates a new image from JSON. + + The JSON data to load from. + + + + Represents a color that may be configured by the user. + + + + + The index of this color slot in . + + + + + This color's name for use with . + + + + + The default color. + + + + + The preset colors to use in multiplayer. + + + + + Create an empty . + + The index for use with . + The name of the body part this colors. + + + + Create a from JSON. + + The index for use with . + The JSON to load. + + + + Gets a color variant from by index. + + The index. + The color for from , or if the index was out of range. + + + + Gets the color of this slot for a given player. + + The player graphics to get the color from. + The color of this body part after modifications are applied. + + + + Represents the nourishment and edibility of foods for a . + + + + + The food value multiplier of dead creatures. + If the creature is consumed in its entirety, such as , is used instead. + + + + + The food value multiplier of small creatures or living objects like . + + + + + The food value multiplier of non-living foods. + + + + + The food value multipliers of individual object types. + + + + + The food value multipliers of individual creature types. + + + + + Creates a new from JSON. + + The JSON to load. + + + + Gets the food value multiplier for an object that was consumed in its entirety. + + The object that was eaten. + A multiplier for the nourishment of this object. + + + + Gets the food value multiplier for a creature + + The player to pass to . + The creature that is being eaten. + A multiplier for the nourishment of this creature. + + + + Represents a color that may copy from . + + + + + The body color of s. + + + + + The eye color of s. + + + + + Creates a new from JSON. + + The JSON to load. + + + + Creates a new . + + The name of the custom color to copy. + + + + Creates a new . + + The color to return. + + + + Gets the value of this color for a player. + + The player to get the color from. + The custom color, or null if it was not overridden via . + + + + Represents the initial reputation of the player with a community. + + + + + The target like value of the player. + + + + + The amount to lerp reputation towards when loaded. + + + + + If true, the like of the player will be locked to after it is set. + + + + + Creates a new . + + The target like value of the player. + The amount to lerp reputation towards when loaded. + If true, the like of the player will be locked to after it is set. + + + + Creates a new from JSON. + + The JSON to load. + + + + Stores per-player variables. + + The type of data stored. + + + + Creates a new per-player variable that depends on . + + The required , or null if data access should not be locked behind a feature. + + + + Gets the instance assocated with , constructing it if it does not exist. + If the game's does not have , then null is returned. + + The player state the variable is associated with. + + + + Gets the instance assocated with , constructing it if it does not exist. + If the game's does not have , then null is returned. + + The player the variable is associated with. + + + + Gets the instance assocated with , constructing it if it does not exist. + + The player state the variable is associated with. + The stored value, or 's default value if the required feature wasn't found. + true if the player's had , false otherwise. + + + + Gets the instance assocated with , constructing it if it does not exist. + + The player the variable is associated with. + The stored value, or 's default value if the required feature wasn't found. + true if the player's had , false otherwise. + + + + Stores per-game variables. + + The type of data stored. + + + + Create a new per-game variable that depends on . + + The required , or null if data access should not be locked behind a feature. + + + + Gets the instance assocated with , constructing it if it does not exist. + If the game's does not have , then null is returned. + + The current game. + + + + Gets the instance assocated with , constructing it if it does not exist. + + The current game. + The stored value, or 's default value if the required feature wasn't found. + true if had , false otherwise. + + + + Stores s associated with s. + + + and should be used when possible. + Otherwise, consider making a child class with Get and TryGet methods that find the most + appropriate to pass to . + + The key type that values are associated with. + The type of data stored. + + + + Creates a new instance of that depends on . + + The required , or null if data access should not be locked behind a feature. + + + + Gets the instance assocated with , constructing it if it does not exist. + If does not have , then null is returned. + + The that may own . + The key the data is attached to. + + + + Represents variable information of a that depends on a . + + + + + The feature this data depends upon. + + + + + Create a new instance that requires a given feature. + + The feature that this requires, or null to not require a feature. + + + + Gets the value of a . + + The stored value's type. + The holding the value or null. + The stored value, or default if is null. + false if was null, true otherwise. + + + + A constant setting of a 's player. + + The type that stores this setting's information + + + + Creates a new with the given . + + The JSON key. + A delegate that parses into . An exception should be thrown on failure. + + + + Gets the instance assocated with . + + A instance that may be a with this . + The stored setting, or 's default value if the feature wasn't found. + true if the 's had this feature, false otherwise. + + + + A constant setting of a 's save slot. + + The type that stores this setting's information. + + + + Creates a new with the given . + + The JSON key. + A delegate that parses into . An exception should be thrown on failure. + + + + Gets the instance assocated with . + + A instance that may belong to a with this . + The stored setting, or 's default value if the feature wasn't found. + true if the 's had this feature, false otherwise. + + + + A strongly-typed constant setting of a . + + + and should be used when possible. + Otherwise, consider making a child class with a TryGet method that finds the most + appropriate to pass to . + + The type that stores this setting's information. + + + + Creates a new with the given . + + The JSON key. + A delegate that parses into . An exception should be thrown on failure. + is null. + is null. + A with the given already exists. + + + + Gets the instance assocated with . + + The that may have this . + The stored setting, or 's default value if the feature wasn't found. + true if had this feature, false otherwise. + + + + Represents a constant setting of a . + + + + + This 's JSON key. + + + + + Creates a new with the given . + + The JSON key. + is null. + A with the given already exists. + + + CustomColors: Apply body color override + + + + Built-in s describing the player. + + + + "color": Player body and UI color. + + + "auto_grab_batflies": Grab batflies on collision. + + + "weight": Weight multiplier. + + + "tunnel_speed": Move speed in tunnels. + + + "climb_speed": Move speed on poles. + + + "walk_speed": Standing move speed. + + + "crouch_stealth": Visual stealth while crouched. + + + "throw_skill": Spear damage and speed. + + + "lung_capacity": Time underwater before drowning. + + + "loudness": Sound alert multiplier. + + + "back_spear": Store a spear on back. + + + "alignments": Initial community reputation. + + + "diet": Edibility and nourishment of foods. + + + "custom_colors": Configurable player colors. + + + "can_maul": Ability to maul creatures. + + + "maul_damage": Damage of maul attack. + + + "maul_blacklist": Creatures that cannot be mauled. + + + + Built-in s describing the game. + + + + "karma": Initial karma. + + + "karma_cap": Initial karma cap. + + + "start_room": Initial room, plus backups from highest to lowest priority. + + + "guide_overseer": Player guide overseer color index. + + + "has_dreams": Whether or not to track dream state. + + + "cycle_length_min": Minimum cycle length in minutes. + + + "cycle_length_max": Maximum cycle length in minutes. + + + "perma_unlock_gates": Maximum cycle length in minutes. + + + "food_min": Food needed to sleep. + + + "food_max": Maximum food stored during a cycle. + + + "select_menu_scene": The scene for this slugcat on the select menu. + + + "select_menu_scene_ascended": The scene for this slugcat on the select menu when ascended. + + + "sleep_scene": The scene for this slugcat when hibernating. + + + "starve_scene": The scene for this slugcat when losing from starvation. + + + "death_scene": The scene for this slugcat when losing from a non-starvation death. + + + "world_state": The character to use for creature spawns and room connections. + + + + Helper methods to construct s with simple parsing rules. + + + + Create a player feature that takes one integer. + + + Create a player feature that takes one integer. + + + Create a player feature that takes one number. + + + Create a player feature that takes one number. + + + Create a player feature that takes one string. + + + Create a player feature that takes an array of integers. + + + Create a player feature that takes an array of integers. + + + Create a player feature that takes an array of numbers. + + + Create a player feature that takes an array of numbers. + + + Create a player feature that takes an array of strings. + + + Create a player feature that takes a color. + + + Create a player feature that takes a palette-modified color. + + + Create a player feature that takes one boolean. + + + Create a player feature that takes one enum value. + + + Create a player feature that takes one enum value. + + + Create a game feature that takes one integer. + + + Create a game feature that takes one integer. + + + Create a game feature that takes one number. + + + Create a game feature that takes one number. + + + Create a game feature that takes one string. + + + Create a game feature that takes an array of integers. + + + Create a game feature that takes an array of integers. + + + Create a game feature that takes an array of numbers. + + + Create a game feature that takes an array of numbers. + + + Create a game feature that takes an array of strings. + + + Create a game feature that takes a color. + + + Create a game feature that takes a palette-modified color. + + + Create a game feature that takes one boolean. + + + Create a game feature that takes one enum value. + + + Create a game feature that takes one enum value. + + + + A JSON object, list, number, or string. + + + + Cast to . + This isn't a JSON object. + + + Cast to . + This isn't a JSON list. + + + Cast to . + This isn't a number. + + + Cast to . + This isn't a number. + + + Cast to . + This isn't a string. + + + Cast to . + This isn't a number. + + + Cast to . + This isn't a number. + + + Cast to . + This isn't a boolean. + + + Try casting to , returning null on failure. + + + Try casting to , returning null on failure. + + + Try casting to , returning null on failure. + + + Try casting to , returning null on failure. + + + Try casting to , returning null on failure. + + + Try casting to , returning null on failure. + + + Try casting to , returning null on failure. + + + Try casting to , returning null on failure. + + + Cast to . + isn't a JSON object. + + + Cast to . + isn't a JSON list. + + + Cast to . + isn't a number. + + + Cast to . + isn't a number. + + + Cast to . + isn't a number. + + + Cast to . + isn't a number. + + + Cast to . + isn't a string. + + + Cast to . + isn't a boolean. + + + + Parse JSON text as a . + + The JSON text. + A representing the root element. + The root element could not be parsed. + + + + The type of this element. This may not be . + + + + + Represents the type of a JSON element. + + + + + Values associated with string keys. + + + + + Values associated with integer keys. + + + + + A number. + + + + + A string. + + + + + A boolean. + + + + + A value that couldn't be parsed. + + + + + A JSON object. + + + + + Get an element from this object. + + The JSON property to search for. + The found value. + The specified property doesn't exist. + + + + Get an element from this object. + + The JSON property to search for. + The found value, or null if the property doesn't exist. + + + Get a from this object. + The JSON property to search for. + The specified property doesn't exist. + + + Get a from this object. + The JSON property to search for. + The specified property doesn't exist or was the wrong type. + + + Get a from this object. + The JSON property to search for. + The specified property doesn't exist or was the wrong type. + + + Get a from this object. + The JSON property to search for. + The specified property doesn't exist or was the wrong type. + + + Get a from this object. + The JSON property to search for. + The specified property doesn't exist or was the wrong type. + + + Get an from this object. + The JSON property to search for. + The specified property doesn't exist or was the wrong type. + + + Get a from this object. + The JSON property to search for. + The specified property doesn't exist or was the wrong type. + + + Get a from this object. + The JSON property to search for. + The specified property doesn't exist or was the wrong type. + + + + Get an element from this object. + + The JSON property to search for. + The found value. + The specified property doesn't exist. + + + + Get as a . + + + + + Get an enumerator for all properties and values of this object. + + + + + A JSON list. + + + + + Get an element from this list. + + The index. + The found value. + is out of range. + + + + Get an element from this list. + + The index. + The found value, or null if is out of range. + + + Get a from this list. + The index. + is out of range or is not the right type. + + + Get a from this list. + The index. + is out of range or is not the right type. + + + Get a from this list. + The index. + is out of range or is not the right type. + + + Get a from this list. + The index. + is out of range or is not the right type. + + + Get a from this list. + The index. + is out of range or is not the right type. + + + Get an from this list. + The index. + is out of range or is not the right type. + + + Get a from this list. + The index. + is out of range or is not the right type. + + + Get a from this list. + The index. + is out of range or is not the right type. + + + + Get the number of elements in this list. + + + + + Get an element from this list. + + The index. + The found value. + is out of range. + + + + Get as a . + + + + + Gets an enumerator for all elements of this list. + + + + + Represents errors that occur when accessing JSON data. + + + + + The path to the element that failed to parse, starting from the root object. + + + + Initializes a new instance of the class with a path to the invalid element. + + + Initializes a new instance of the class with a specified error message + and a path to the invalid element. + + + Initializes a new instance of the class with a specified error message, + a reference to the inner exception that is the cause of this exception, and a path to the invalid element. + + + + Represents errors that occur when parsing JSON data. + + + + + The offset in the input string that the error occurred at. + + + + + The line in the input string that the error occurred at. + + + + + Represents a collection of values with unique IDs that can be loaded from JSON. + + The type of the keys. + The type of the values. + + + + Occurs when a loaded JSON file is modified while is set. + + + + + Occurs when a JSON file fails to load or reload. + + + + + Whether this registry should track files to reload. + Call to apply changes. + + + + + A collection of all keys used by this registry. + + + + + A collection of all values registered. + + + + + Create a new registry. + + The factory that creates values from JSON. + + + + Register all JSON files in a directory using . + + The directory to search. + + + + Parse a file as JSON and link it to a new ID. + + The file path to the json. + The registered key and value. + + + + Parse a file as JSON and link it to a new ID. + Load errors can be monitored with . + + The file path to the json. + The registered key and value, or null if loading failed. + + + + Load a from JSON and link it to a new ID. + + The json data for the new object. + The registered key and value. + + + + Unregister a value. + + + + + + + + Get a registered value by key. + + The unique ID of the value. + The registered value with the unique ID. + true if the value was found, false otherwise. + + + + Get a registered value by key. + + The unique ID of the value. + The registered value with the unique ID. + + + + Gets the path to a registered value by key. + + The unique ID of the value. + The path to the value's JSON file. + true if the value was found and has a path, false otherwise. + + + + Reload all JSON files that have been modified. + + + + + Provides data for the event. + + + + + The unique key of the reloaded entry. + + + + + The reloaded entry. + + + + + Provides data for the event. + + + + + The exception that caused this event, or null if it was not from an exception. + + + + + An error message that may be shown to the user. + + + + + The path to the file that errored, or null if it was not loaded from a file. + + + + + Converts to other types. + + + + Convert to . + + + Convert to . + + + Convert to . + + + Convert to . + + + Convert to . + + + Convert to . + + + + Convert to . + + + This may be a hex string or equivalent integer; list of components; or object with "r", "g", "b", and possibly "a" properties. + + + + Convert to via . + + + Convert list to []. + + + Convert list to []. + + + Convert list to []. + + + Convert list to []. + + + Convert list to []. + + + Convert to value. + + + + Convert to value. + + + will be -1 for values that could not be parsed. + + + + + Convert to + + + This may be a list of components or an object with "x" and "y" properties. + + + + + A character added by SlugBase. + + + + + Stores all registered s. + + + + + Occurs when any 's JSON file is modified, after all features have been loaded. + + + This event is only raised when in-game. + + + + + Gets a by . + + The to search for. + The with the given , or null if it was not found. + true if the was found, false otherwise. + + + + Gets a by . + + The to search for. + The , or null if it was not found. + + + + This character's unique name. + + + + + The displayed name of this character, such as "The Survivor", "The Monk", or "The Hunter". + + + + + A description of this character that appears on the select menu. + + + + + Settings, abilities, or other s of this character. + + + + + Stores the s of a . + + + + + Get the value of a . + + The 's data type. + The feature to get data from. + The feature's data, or 's default value if it was not found. + true if the feature was found, false otherwise. + + + + Check this list for a . + + The to check for. + true if was found, false otherwise. + + + + Returns an enumerator that iterates through all features in this collection. + + + + + Provides data for the event. + + + + + The current . + + + + + The ID of the reloaded . + + + + + The reloaded . + + + + diff --git a/lib/UnityEngine.CoreModule.dll b/lib/UnityEngine.CoreModule.dll new file mode 100644 index 0000000..f98502a Binary files /dev/null and b/lib/UnityEngine.CoreModule.dll differ diff --git a/lib/UnityEngine.dll b/lib/UnityEngine.dll new file mode 100644 index 0000000..16ab5f1 Binary files /dev/null and b/lib/UnityEngine.dll differ diff --git a/mod/illustrations/multiplayerportrait00-jillo.png b/mod/illustrations/multiplayerportrait00-jillo.png new file mode 100644 index 0000000..eaaca8e Binary files /dev/null and b/mod/illustrations/multiplayerportrait00-jillo.png differ diff --git a/mod/illustrations/multiplayerportrait01-jillo.png b/mod/illustrations/multiplayerportrait01-jillo.png new file mode 100644 index 0000000..e9b9d75 Binary files /dev/null and b/mod/illustrations/multiplayerportrait01-jillo.png differ diff --git a/mod/illustrations/multiplayerportrait10-jillo.png b/mod/illustrations/multiplayerportrait10-jillo.png new file mode 100644 index 0000000..037d8c2 Binary files /dev/null and b/mod/illustrations/multiplayerportrait10-jillo.png differ diff --git a/mod/illustrations/multiplayerportrait11-jillo.png b/mod/illustrations/multiplayerportrait11-jillo.png new file mode 100644 index 0000000..962b4a4 Binary files /dev/null and b/mod/illustrations/multiplayerportrait11-jillo.png differ diff --git a/mod/illustrations/multiplayerportrait20-jillo.png b/mod/illustrations/multiplayerportrait20-jillo.png new file mode 100644 index 0000000..46b932d Binary files /dev/null and b/mod/illustrations/multiplayerportrait20-jillo.png differ diff --git a/mod/illustrations/multiplayerportrait21-jillo.png b/mod/illustrations/multiplayerportrait21-jillo.png new file mode 100644 index 0000000..810b18d Binary files /dev/null and b/mod/illustrations/multiplayerportrait21-jillo.png differ diff --git a/mod/illustrations/multiplayerportrait30-jillo.png b/mod/illustrations/multiplayerportrait30-jillo.png new file mode 100644 index 0000000..d5ff68a Binary files /dev/null and b/mod/illustrations/multiplayerportrait30-jillo.png differ diff --git a/mod/illustrations/multiplayerportrait31-jillo.png b/mod/illustrations/multiplayerportrait31-jillo.png new file mode 100644 index 0000000..77e889d Binary files /dev/null and b/mod/illustrations/multiplayerportrait31-jillo.png differ diff --git a/mod/modinfo.json b/mod/modinfo.json new file mode 100644 index 0000000..410552f --- /dev/null +++ b/mod/modinfo.json @@ -0,0 +1,9 @@ +{ + "id": "zone.oat.jilloslug", + "name": "Jillo", + "version": "0.1.0", + "authors": "oatmealine", + "description": "gelatin...", + "requirements": [ "slime-cubed.slugbase" ], + "requirements_names": [ "SlugBase" ] +} diff --git a/mod/scenes/slugcat - jillo/Background.png b/mod/scenes/slugcat - jillo/Background.png new file mode 100644 index 0000000..73a543f Binary files /dev/null and b/mod/scenes/slugcat - jillo/Background.png differ diff --git a/mod/scenes/slugcat - jillo/Grass 1.png b/mod/scenes/slugcat - jillo/Grass 1.png new file mode 100644 index 0000000..b315619 Binary files /dev/null and b/mod/scenes/slugcat - jillo/Grass 1.png differ diff --git a/mod/scenes/slugcat - jillo/Grass 2.png b/mod/scenes/slugcat - jillo/Grass 2.png new file mode 100644 index 0000000..a960890 Binary files /dev/null and b/mod/scenes/slugcat - jillo/Grass 2.png differ diff --git a/mod/scenes/slugcat - jillo/Grass 3.png b/mod/scenes/slugcat - jillo/Grass 3.png new file mode 100644 index 0000000..f3e4d27 Binary files /dev/null and b/mod/scenes/slugcat - jillo/Grass 3.png differ diff --git a/mod/scenes/slugcat - jillo/Slugcat.png b/mod/scenes/slugcat - jillo/Slugcat.png new file mode 100644 index 0000000..a45c189 Binary files /dev/null and b/mod/scenes/slugcat - jillo/Slugcat.png differ diff --git a/mod/slugbase/jillo.json b/mod/slugbase/jillo.json new file mode 100644 index 0000000..2fca346 --- /dev/null +++ b/mod/slugbase/jillo.json @@ -0,0 +1,42 @@ +{ + "id": "Jillo", + "name": "Jillo", + "description": "jillo :)", + "features": { + "color": "f9b08f", + + "weight": 0.86, + "loudness": 1.4, + + "alignments": { + "Scavengers": { "like": 1, "strength": 0.1, "locked": false } + }, + + "diet": { + "corpses": 0, + "meat": 0.5, + "plants": 1, + "overrides": { + + } + }, + + "custom_colors": [ + { "name": "Body", "story": { "r": 0.9764705882, "g": 0.6901960784, "b": 0.5607843137, "a": 0.5 } }, + { "name": "Eyes", "story": "ffffff" } + ], + + "start_room": "SI_A07", + + "food_min": 3, + "food_max": 7, + + "select_menu_scene": "Slugcat_Jillo", + "select_menu_scene_ascended": "Ghost_Jillo", + + "world_state": "Spear", + + "jillo/bounce": 0.6, + "jillo/immune_to_dart_maggots": true + } +} \ No newline at end of file diff --git a/mod/slugbase/scenes/ghost_jillo.json b/mod/slugbase/scenes/ghost_jillo.json new file mode 100644 index 0000000..2ed109a --- /dev/null +++ b/mod/slugbase/scenes/ghost_jillo.json @@ -0,0 +1,15 @@ +{ + "id": "Ghost_Jillo", + "scene_folder": "scenes/slugcat - jillo", + "images": [ + { "name": "Background", "pos": [492, 297], "depth": 3.7, "shader": "Basic" }, + { "name": "Grass 3", "pos": [602, 264], "depth": 2.2, "shader": "Basic" }, + { "name": "Grass 2", "pos": [446, 283], "depth": 2.0, "shader": "Basic" }, + { "name": "Grass 1", "pos": [515, 265], "depth": 1.8, "shader": "Basic" } + ], + "idle_depths": [ 2.8 ], + "glow_pos": [688, 484], + "mark_pos": [689, 583], + "select_menu_pos": [0, 0], + "slugcat_depth": 2.8 +} \ No newline at end of file diff --git a/mod/slugbase/scenes/slugcat_jillo.json b/mod/slugbase/scenes/slugcat_jillo.json new file mode 100644 index 0000000..43cc8ee --- /dev/null +++ b/mod/slugbase/scenes/slugcat_jillo.json @@ -0,0 +1,16 @@ +{ + "id": "Slugcat_Jillo", + "scene_folder": "scenes/slugcat - jillo", + "images": [ + { "name": "Background", "pos": [492, 297], "depth": 3.7, "shader": "Basic" }, + { "name": "Slugcat", "pos": [605, 427], "depth": 2.8, "shader": "Basic" }, + { "name": "Grass 3", "pos": [602, 264], "depth": 2.2, "shader": "Basic" }, + { "name": "Grass 2", "pos": [446, 283], "depth": 2.0, "shader": "Basic" }, + { "name": "Grass 1", "pos": [515, 265], "depth": 1.8, "shader": "Basic" } + ], + "idle_depths": [ 2.8 ], + "glow_pos": [688, 484], + "mark_pos": [689, 583], + "select_menu_pos": [0, 0], + "slugcat_depth": 2.8 +} \ No newline at end of file diff --git a/mod/thumbnail.png b/mod/thumbnail.png new file mode 100644 index 0000000..42dfcff Binary files /dev/null and b/mod/thumbnail.png differ diff --git a/src/Extras.cs b/src/Extras.cs new file mode 100644 index 0000000..a1ffac7 --- /dev/null +++ b/src/Extras.cs @@ -0,0 +1,41 @@ +using System; +using System.Security.Permissions; +using UnityEngine; + +/* + * This file contains fixes to some common problems when modding Rain World. + * Unless you know what you're doing, you shouldn't modify anything here. + */ + +// Allows access to private members +#pragma warning disable CS0618 +[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] +#pragma warning restore CS0618 + + +internal static class Extras +{ + private static bool _initialized; + + // Ensure resources are only loaded once and that failing to load them will not break other mods + public static On.RainWorld.hook_OnModsInit WrapInit(Action loadResources) + { + return (orig, self) => + { + orig(self); + + try + { + if (!_initialized) + { + _initialized = true; + loadResources(self); + } + } + catch (Exception e) + { + Debug.LogException(e); + } + }; + } +} \ No newline at end of file diff --git a/src/JilloSlug.csproj b/src/JilloSlug.csproj new file mode 100644 index 0000000..dcf42ac --- /dev/null +++ b/src/JilloSlug.csproj @@ -0,0 +1,26 @@ + + + + net48 + 11 + + + + + false + + + + + + + + + + + + + + + + diff --git a/src/Plugin.cs b/src/Plugin.cs new file mode 100644 index 0000000..460c668 --- /dev/null +++ b/src/Plugin.cs @@ -0,0 +1,31 @@ +using System; +using BepInEx; +using BepInEx.Logging; + +namespace JilloSlug; + +[BepInPlugin(MOD_ID, "Jillo", "0.1.0")] +class Plugin : BaseUnityPlugin { + private const string MOD_ID = "zone.oat.jilloslug"; + internal static ManualLogSource Log; + + // Add hooks + public void OnEnable() { + Plugin.Log = base.Logger; + + try { + On.RainWorld.OnModsInit += Extras.WrapInit(LoadResources); + + BounceFeature.AddHooks(); + ImmuneToDartMaggotsFeature.AddHooks(); + } catch (Exception err) { + Logger.LogError($"error initializing: {err}"); + } + + Logger.LogInfo("initialized!"); + } + + // Load any resources, such as sprites or sounds + private void LoadResources(RainWorld rainWorld) { + } +} diff --git a/src/features/BounceFeature.cs b/src/features/BounceFeature.cs new file mode 100644 index 0000000..de2eba9 --- /dev/null +++ b/src/features/BounceFeature.cs @@ -0,0 +1,133 @@ +using System; +using UnityEngine; +using SlugBase.Features; +using static SlugBase.Features.FeatureTypes; +using MonoMod.Cil; +using Mono.Cecil.Cil; +using RWCustom; + +namespace JilloSlug; + +internal static class BounceFeature { + // 0 = no bounce + // 1 = preserve all velocity upon bouncing + public static readonly PlayerFeature Bounce = PlayerFloat("jillo/bounce"); + + public static void AddHooks() { + IL.Player.TerrainImpact += Player_TerrainImpact; + } + + private static bool PlayerHandleBounce(Player player, IntVector2 direction, float speed) { + float bounce; + Bounce.TryGet(player, out bounce); + bool shouldBounce = !player.dead && bounce >= 0; + if (!shouldBounce) return true; + + if (speed > 0.5f) { + player.room.PlaySound(SoundID.Slime_Mold_Terrain_Impact, player.mainBodyChunk, false, 0.7f + Mathf.Clamp(speed / 60f, 0f, 1f), 1f); + } + + if (speed > 8f) { + // handle bouncing + foreach (var chunk in player.bodyChunks) { + chunk.vel.x = Mathf.Lerp(chunk.vel.x, -chunk.vel.x * bounce, Mathf.Abs((float) direction.x)); + chunk.vel.y = Mathf.Lerp(chunk.vel.y, -chunk.vel.y * bounce, Mathf.Abs((float) direction.y)); + } + } + + return false; // skip everything + } + + private static void ILInsertHandleBounce(ILCursor c, ILLabel skipLabel) { + c.Emit(OpCodes.Ldarg_0); + c.Emit(OpCodes.Ldarg_2); // direction + c.Emit(OpCodes.Ldarg_3); // speed + c.EmitDelegate>((player, direction, speed) => { + return PlayerHandleBounce(player, direction, speed); + }); + c.Emit(OpCodes.Brfalse, skipLabel); + } + + private static void Player_TerrainImpact(ILContext il) { + ILCursor c = new ILCursor(il); + + // patch high speed impact (death condition) + + // matching for `speed > num && direction.y < 0` + c.GotoNext(MoveType.After, + // speed > num + i => i.MatchLdarg(3), + i => i.MatchLdloc(0), + i => i.Match(OpCodes.Ble_Un_S), + + // direction.y < 0 + i => i.MatchLdarg(2), + i => i.MatchLdfld("y"), + i => i.Match(OpCodes.Ldc_I4_0), + i => i.Match(OpCodes.Bge_S) + ); + + // retrieve the label the end of the if would skip to + // (illegal bytecode crimes) + ILCursor endC = c.Clone(); + endC.GotoNext(MoveType.After, i => i.MatchCallOrCallvirt("Die")); + ILLabel skipLabel = endC.Next.Operand as ILLabel; + + ILInsertHandleBounce(c, skipLabel); + + // patch mid speed impact (stun condition) + + // matching for `speed > num2` + c.GotoNext(MoveType.After, + // speed > num2 + i => i.MatchLdarg(3), + i => i.MatchLdloc(1), + i => i.Match(OpCodes.Ble_Un) + ); + + ILInsertHandleBounce(c, skipLabel); + + // patch low speed impacts + + // matching for `direction.y < 0 && base.Consious` + c.GotoNext(MoveType.After, + i => i.MatchLdarg(2), + i => i.MatchLdfld("y"), + i => i.Match(OpCodes.Ldc_I4_0), + i => i.Match(OpCodes.Bge_S), + + i => i.MatchLdarg(0), + i => i.MatchCallOrCallvirt("get_Consious"), + i => i.Match(OpCodes.Brfalse_S) + ); + + ILInsertHandleBounce(c, skipLabel); + + // matching for `this.room.PlaySound(SoundID.Slugcat_Terrain_Impact_Light, ...);` + c.GotoNext(MoveType.Before, + i => i.MatchLdarg(0), + i => i.MatchLdfld("room"), + i => i.MatchLdsfld("Slugcat_Terrain_Impact_Light") + ); + + ILInsertHandleBounce(c, skipLabel); + + // matching for `this.room.PlaySound(SoundID.Slugcat_Terrain_Impact_Medium, ...);` + c.GotoNext(MoveType.Before, + i => i.MatchLdarg(0), + i => i.MatchLdfld("room"), + i => i.MatchLdsfld("Slugcat_Terrain_Impact_Medium") + ); + + ILInsertHandleBounce(c, skipLabel); + + // matching for `this.room.PlaySound(SoundID.Slugcat_Terrain_Impact_Hard, ...;` + c.GotoNext(MoveType.Before, + i => i.MatchLdarg(0), + i => i.MatchLdfld("room"), + i => i.MatchLdsfld("Slugcat_Terrain_Impact_Hard") + ); + + ILInsertHandleBounce(c, skipLabel); + } +} diff --git a/src/features/ImmuneToDartMaggotsFeature.cs b/src/features/ImmuneToDartMaggotsFeature.cs new file mode 100644 index 0000000..9c4dac4 --- /dev/null +++ b/src/features/ImmuneToDartMaggotsFeature.cs @@ -0,0 +1,77 @@ +using System; +using SlugBase.Features; +using static SlugBase.Features.FeatureTypes; +using MonoMod.Cil; +using Mono.Cecil.Cil; + +namespace JilloSlug; + +internal static class ImmuneToDartMaggotsFeature { + public static readonly PlayerFeature ImmuneToDartMaggots = PlayerBool("jillo/immune_to_dart_maggots"); + + public static void AddHooks() { + IL.DartMaggot.Update += DartMaggot_Update; + } + + private static bool DartMaggotCanStun(DartMaggot maggot) { + if (maggot.stuckInChunk.owner is Player && ImmuneToDartMaggots.TryGet(maggot.stuckInChunk.owner as Player, out var immune) && immune) { + return false; // skip + } + return true; // proceed as normal + } + + private static void ILInsertHandleDartMaggotStun(ILCursor c, ILLabel skipLabel) { + c.Emit(OpCodes.Ldarg_0); + c.EmitDelegate>(maggot => { + return DartMaggotCanStun(maggot); + }); + c.Emit(OpCodes.Brfalse, skipLabel); + } + + private static void DartMaggot_Update(ILContext il) { + ILCursor c = new ILCursor(il); + + // matching for `stuckInChunk.owner is Creature && ...` + c.GotoNext(MoveType.After, + i => i.MatchLdarg(0), + i => i.MatchLdfld("stuckInChunk"), + i => i.MatchCallOrCallvirt("get_owner"), + i => i.MatchIsinst(), + i => i.Match(OpCodes.Brfalse_S) + ); + + // last instruction will be a brfalse.s; capture the label it goes to + ILLabel skipLabel = c.Prev.Operand as ILLabel; + + // we're now ready to write another condition + ILInsertHandleDartMaggotStun(c, skipLabel); + + // comments will be unrepeated; same functionality + + // matching for `stuckInChunk.owner is Player && ...` + c.GotoNext(MoveType.After, + i => i.MatchLdarg(0), + i => i.MatchLdfld("stuckInChunk"), + i => i.MatchCallOrCallvirt("get_owner"), + i => i.MatchIsinst(), + i => i.Match(OpCodes.Brfalse_S) + ); + + skipLabel = c.Prev.Operand as ILLabel; + + ILInsertHandleDartMaggotStun(c, skipLabel); + + // matching for `stuckInChunk.owner is Creature` + c.GotoNext(MoveType.After, + i => i.MatchLdarg(0), + i => i.MatchLdfld("stuckInChunk"), + i => i.MatchCallOrCallvirt("get_owner"), + i => i.MatchIsinst(), + i => i.Match(OpCodes.Brfalse) // watch out! this one isn't _S + ); + + skipLabel = c.Prev.Operand as ILLabel; + + ILInsertHandleDartMaggotStun(c, skipLabel); + } +}