feat(plugins/settings): log when modules loaded, remove useless exports
This commit is contained in:
parent
3bca2c4691
commit
cd62a70001
2 changed files with 6 additions and 14 deletions
|
|
@ -15,10 +15,7 @@ registerPlugin(
|
|||
{
|
||||
start(api) {
|
||||
pluginApi = api
|
||||
|
||||
onceSettingsModulesLoaded(() => {
|
||||
require('./register')
|
||||
})
|
||||
onceSettingsModulesLoaded(() => require('./register'))
|
||||
},
|
||||
},
|
||||
PluginFlags.Enabled,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { type PluginApi, PluginFlags } from '@revenge-mod/plugins'
|
||||
import { PluginFlags } from '@revenge-mod/plugins'
|
||||
import { InternalPluginFlags, registerPlugin } from '@revenge-mod/plugins/_'
|
||||
|
||||
import { waitForModules } from '@revenge-mod/modules/finders'
|
||||
|
|
@ -20,12 +20,8 @@ registerPlugin(
|
|||
icon: 'SettingsIcon',
|
||||
},
|
||||
{
|
||||
start(api) {
|
||||
pluginApi = api
|
||||
|
||||
onceSettingsModulesLoaded(() => {
|
||||
require('./register')
|
||||
})
|
||||
start({ logger }) {
|
||||
onceSettingsModulesLoaded(() => require('./register'))
|
||||
|
||||
const unsubForRendererConfig = waitForModules(
|
||||
byProps<{
|
||||
|
|
@ -34,6 +30,8 @@ registerPlugin(
|
|||
(_, SettingRendererConfig) => {
|
||||
unsubForRendererConfig()
|
||||
|
||||
logger.info('Settings modules loaded, running subscriptions and patching...')
|
||||
|
||||
for (const sub of _subs) sub()
|
||||
// We don't ever need to call this again
|
||||
_subs.clear()
|
||||
|
|
@ -94,6 +92,3 @@ registerPlugin(
|
|||
PluginFlags.Enabled,
|
||||
InternalPluginFlags.Internal | InternalPluginFlags.Essential,
|
||||
)
|
||||
|
||||
// Expose to EvaluateJavaScriptSetting
|
||||
export let pluginApi: PluginApi
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue