Millzy-Boneject icon

Boneject

A Dependency Injection implementation for BONELAB.

Last updated a year ago
Total downloads 2244
Total rating 2 
Categories Code Mods
Dependency string Millzy-Boneject-2.0.0
Dependants 1 other package depends on this package

This mod requires the following mods to function

LavaGang-MelonLoader-0.5.7 icon
LavaGang-MelonLoader

The World's First Universal Mod Loader for Unity Games compatible with both Il2Cpp and Mono

Preferred version: 0.5.7

README

Boneject

A BONELAB mod that provides a basic Ninject implementation and wrapper for use in the game. This can be useful for mods that do a lot of things with a lot of concrete dependencies; Ninject can manage those for you.

This project is still in active development, there are not as many locations as there could be. More will be added in time or as I need them. If you'd like to use Boneject in a location that it currently does not support, please DM me on Discord (Millzy#8418) and I can add it for you. Or if you prefer, open a PR to add it in on the GitHub repository.

This is installed, do I need it?

Probably! For the mods that do implement this, it will most likely be essential.

For Contributors

  1. Clone the project from the GitHub repository.
  2. Open Boneject.sln in your favourite IDE.
  3. Create a copy of Boneject.csproj.user.template and remove the .template suffix.
  4. In the same file, replace the comment between the <BonelabDir> tags with your BONELAB installation path. This will let Boneject build with your game's assemblies.
  5. Save the file.
  6. Make sure Ninject has been downloaded from Nuget.
  7. All set!

For Developers

If you are considering implementing Boneject in to your mod, by all means, give it a go! I found that after using a Dependency Injection framework for modding Unity games (at the time Zenject in BeatSaber) it is very tricky to go back afterwards.

Read the wiki to get started.

Credits

  • Auros - For creating SiraUtil, the inspiration for this project.
  • Danike - For creating BSIPA and it's Mod Init Injection system, that part of this project is based on.