-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R2API.ContentManagement is the biggest codesmell I've contribued and needs rectification. #511
Comments
How do you account for multiple bepinplugins in a single assembly? |
Is there even a mod that does this? |
There are some mods that do this though this is a non issue because of how PluginInfo work, it's just a member field tied to the BaseUnityPlugin instance so not a problem. The problem with the current methods is that removing them would be breaking, so the best we can do is marking them as obsolete and provide overload that take a PluginInfo instead |
The existing methods can be re-routed to the plugininfo by reflecting through the plugin attribute (finding the specific instance of BaseUnityPlugin isn't necessary because BepIn itself maintains a mapping between plugin id and info). |
Is all the hassle to split content added by contentmanagement into separate content packs worthwhile? |
There are some mods that count on it (primarily WAILA,though it's possible that there are other consumers that aren't advertising it) |
Alright, here are my thoughts on content management then
That is what I was thinking about regarding the external API. Internally, content management has its own problems:
I have some interest in working on this content management rewrite; I am not sure how busy Nebby is or how much they wish to work on it though. |
We can work it together if you'd like, currently i have my final defense on my thesis on the 11th, after that i'm officially on vacation. |
(I hate my code)
In all seriousness, ContentManagement, while it was a good idea, needs to be refactored to be modified to use BepInPlugins instead of obtaining the assembly via the calling method.
Using the assembly causes issues as it can sometimes create unecesary content packs. Or overall unintended behaviour
This rectification should be done in a clean way ideally to avoid mods breaking, which could be difficult.
The other option of course, is to do nothing and completely axe ContentPack frameworks from R2API once Seekers of The Storm releases, and let modders properly use IContentPackProvider.
The text was updated successfully, but these errors were encountered: