Boneject
A Dependency Injection implementation for BONELAB.
CHANGELOG
v2.0.0
- Removed MelonLoader and Ninject namespaces.
- Removed VoidG114 context.
- Added SceneBootstrapper context.
v1.2.0
- Context is now dependent on the "host game object" rather than the current scene, modules and bindings will only unload when they should.
- Fixed mod init injection breaking when trying to inject into two or more dependents.
- Fixed incorrect ID.
- Fixed issues caused by trying to load/bind and/or unload/unbind modules and bindings using bad indexing and comparisons (in other words, should be actually stable now)
- Removed source generators.
- Refactored codebase for readability and better practices.
v1.1.0
- BuildInfo is now handled via properties in the (Boneject.csproj) project file and source generation.
- Made
Context.VoidG114obsolete, since its basically useless. Will be removed in the next major. - Added the
Context.VoidG114Menu, and the related base module and patch for the context. - Added the
Context.Menucontext, which is the result of the bitwise OR operation ofContext.StartupandContext.VoidG114Menu. SLZ.Bonelab.FadeAndDisableVolumeis automatically bound to theStartupandVoidG114Menumodules.- Fixed uncaught
KeyNotFoundExceptionthrown when Boneject attempts to unload/unbind "non-preserved" modules/bindings.
v1.0.1
- Gets bindings to register using an expression based method rather than a reflection based one. (should be faster)
- Bindings are only bound to the active scene when loaded. (unless loading screens mess this up)
- Ninject now fully handles mod init injection. (again, speed)
v1.0.0
- Complete rewrite.
- Added the capability for mods to have dependencies injected into their entrypoints at
OnMelonInitialize, through the use of theInjectableMelonModclass and theInitializeattribute. "Mod Initialization Dependencies" can be added using theModInitInjector.AddInjector()static method. - Re-arranged extension methods.
- Entrypoints:
App,Loading,Hub,Campaign,Player,Startup,VoidG114all implemented. - Better module installation system.
- Load instructions.
- Proper documentation.
v0.3.0
- Removed
AsComponentOnNewGameObject<T>andAsComponentOnExistingGameObject<T>extension methods due to Ninject not injecting into constant bindings and not being able to access the Kernel to fix it. - Added
BindComponentOnNewGameObject<T>andBindComponentOnExistingGameObject<T>extension methods to replace the aforementioned.
v0.2.0
- Removed
Applocation and its associated ModuleLoader and HarmonyPatch. This is due to the behaviour being different than desired. GlobalDependencies must now be added manually using theGlobalDependenciesstatic class. Ninject can still handle their creation however. - Added a
Gamelocation, that should load in every level, except the two main menu levels. An instance ofBonelabGameControlis automatically loaded into the Ninject Kernel before the modules are loaded. - Added a
Loadinglocation, its the loading screen basically. An instance ofLoadingSceneis automatically loaded into the Ninject Kernel before modules are loaded. - Added more logging messages.
- Made it so that instances of the Ninject Kernel are limited to one per scene (in theory). Should help with compatibility with some future things.
- Fixed a bug (logic error) where the Ninject Kernel would only be initialized when modules are loaded, preventing "automatically bound dependencies" from actually being bound to the Ninject Kernel.
- Fixed a bug (another logic error) where global dependencies that are created by Ninject would not be updated in the global dependency dictionary. This may have been the problem causing the first issue, I can add the App location back if requested.
v0.1.0
- Initial Release.