PenguLoader / PenguLoader

✨ The ultimate JavaScript plugin loader, build your unmatched LoL Client.
https://pengu.lol
Do What The F*ck You Want To Public License
346 stars 56 forks source link

[Core] reimplement rcp hooks to work on `push` instead of `pull` #116

Closed VanillaMaster closed 1 month ago

VanillaMaster commented 1 month ago

Currently, RCP registration in pengu is done on pull, so there is no way to get a plugin without trying to catch it by preInit or postInit. My implementation gets plugins on push, so every plugin will be registered, even without calling preInit or postInit. This has some advantages, such as opportunity to list all loaded plugins without knowing their names, late postInit calls can be satisfied, since all plugins are caught any way.

VanillaMaster commented 1 month ago

Current behavior of callbacks isn't persistent, need some tweaking

nomi-san commented 1 month ago

Thanks for your contribution. You need to move the length symbol line to above of CallbackContainer, that will solve build fails on typecheck.

VanillaMaster commented 1 month ago

now everything must be fine, probably ...