Skip to content

Commit

Permalink
Add some more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
V3L0C1T13S committed Sep 27, 2022
1 parent 753538e commit cc5d3b1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ The plugin and theme manager UI's are also adapted versions of Replugged's. Howe
There's a whole mix of different code snippets inside Rikka, that I'm sure I forgot about in the past couple of months I took off this project, but those are the ones I remember the most clearly. Now that we've got that out of the way, if you'd like to continue with hacking up your own code, feel free to continue.

#### Plugins
A basic example plugin can be found in `/src/plugins/rk-ExamplePlugin`.

The plugin manifest format:

The plugin format is a bit weird if you're used to working with other client mods.
First of all, some plugins have a "preload" property inside the manifest.json. But what does this mysterious property do? Well, the Plugin Manager is loaded inside both the main and renderer process. The one in the main process will only load all plugins with the preload property set to true. It then calls the preInject() function defined by the plugin.
First of all, some plugins have a "preload" property inside their manifest.json. But what does this mysterious property do? Well, the Plugin Manager is loaded inside both the main and renderer process. The one in the main process will only load all plugins with the preload property set to true. It then calls the preInject() function defined by the plugin.
This is an incredibly useful feature for compatibility layers, such as [vz-compat](https://github.com/V3L0C1T13S/vz-compat) and [replugged-compat](https://github.com/V3L0C1T13S/replugged-compat), which both only need to reimplement IPC, and then call upon a modified preload.js that doesn't conflict with Rikka's preload.

#### Compilation - A (mostly) unfixable mess
Expand All @@ -30,6 +34,9 @@ Also, unlike other client mods which will use global modules, Rikka instead opte

This also makes updating Rikka for the average user an extremely long process, as you have to pull the code, and then recompile it all using `npm run build`, as opposed to just pulling it and then restarting your client.

#### The API
Rikka's API is all stored in `/src/Rikka/API`. Rikka doesn't load every API up immediately, instead choosing to just have them as modules that plugins can use. This way, only things that are needed will actually be loaded, so if nothing uses `/Utils/strings`, it won't be wasting memory.

## About the Rikka project
Rikka was created as a true FOSS modification to Discord. Unlike some client mods, Rikka is licensed under a copyleft license, that allow anyone to make their own derivatives of it.
While most client mods are open source, some are not licensed in such a way that would permit one to create their own version of them.
Expand Down

0 comments on commit cc5d3b1

Please sign in to comment.