Soooo mostly out of laziness and a bit out of just curiosity...
Anyone know of some best practices for coding a plugin to be added to the plugin manager multiple times like this:
and allow them to both have there own separate parameters used and function nicely together.. instead of the way it currently works for me, which is it just does what is setup with the top one.
lol Hope that makes sense...
I mean I of course know I could code the parameters into being an array in just one plugin and just add the plugin file once or code it differently.. but it just had piqued my curiosity.. on what the best way to code a plugin to allow it to do such would be or if possible.
A more in-depth look at how the plugin manager code works would suggest this isn't really even possible without recoding the PluginManager class?
..well hope I don't get bashed to hard here.. just a random thought I was having.
Hope this question at least makes sense though
Let me know if there are any "best practices" you know of for coding a plugin to be added to the plugin manager multiple times with different parameters to get it to still work nicely.
Thanks for reading 🙂
Edit:
It's not even possible to create a plugin to change the "PluginManager.setup" function is it? lol
that would just have to be hardcoded directly into the managers.js file wouldn't it? since the plugin isn't even added before that is called... since that is what adds the plugins themselves
lol dang... well guess even that is out of the question then
...wait maybe a plugin that reloads the "PluginManager.setup" function... lol hmm... that I suppose could work sort of..
Edit2:
Summary of what I've gathered to be "best practices"/ easiest to allow multiple used plugins of the same plugin:
Making a special trait in the plugin that is to become a multiple used/added plugin, such as a special parameter name
Make a new PluginManager setup that then loops the plugin list again and adds/loads the plugins that aren't in the PluginManager._scripts list and adds them with an index
When making the plugin that is to become a multiple used/added plugin make sure to get the index to be used for the parameters and function names.
I'm sure there is more to detail out but that's the basic gists of it for now.
This post contains the example plugins I made on this subject.
Anyone know of some best practices for coding a plugin to be added to the plugin manager multiple times like this:
and allow them to both have there own separate parameters used and function nicely together.. instead of the way it currently works for me, which is it just does what is setup with the top one.
lol Hope that makes sense...
I mean I of course know I could code the parameters into being an array in just one plugin and just add the plugin file once or code it differently.. but it just had piqued my curiosity.. on what the best way to code a plugin to allow it to do such would be or if possible.
A more in-depth look at how the plugin manager code works would suggest this isn't really even possible without recoding the PluginManager class?
..well hope I don't get bashed to hard here.. just a random thought I was having.
Hope this question at least makes sense though
Let me know if there are any "best practices" you know of for coding a plugin to be added to the plugin manager multiple times with different parameters to get it to still work nicely.
Thanks for reading 🙂
Edit:
It's not even possible to create a plugin to change the "PluginManager.setup" function is it? lol
that would just have to be hardcoded directly into the managers.js file wouldn't it? since the plugin isn't even added before that is called... since that is what adds the plugins themselves
lol dang... well guess even that is out of the question then
...wait maybe a plugin that reloads the "PluginManager.setup" function... lol hmm... that I suppose could work sort of..
Edit2:
Summary of what I've gathered to be "best practices"/ easiest to allow multiple used plugins of the same plugin:
Making a special trait in the plugin that is to become a multiple used/added plugin, such as a special parameter name
Make a new PluginManager setup that then loops the plugin list again and adds/loads the plugins that aren't in the PluginManager._scripts list and adds them with an index
When making the plugin that is to become a multiple used/added plugin make sure to get the index to be used for the parameters and function names.
I'm sure there is more to detail out but that's the basic gists of it for now.
This post contains the example plugins I made on this subject.