Fix hard coded config.hjson event in ConfigLoader

* ConfigLoader init can now take onReload handler
* Use onReload for config.hjson/system config event
This commit is contained in:
Bryan Ashby
2020-06-15 21:21:26 -06:00
parent 5b7c83cdc1
commit 8808447343
2 changed files with 22 additions and 8 deletions

View File

@@ -37,6 +37,12 @@ exports.Config = class Config extends ConfigLoader {
}
}
},
onReload : err => {
if (!err) {
const Events = require('./events.js');
Events.emit(Events.getSystemEvents().ConfigChanged);
}
},
};
systemConfigInstance = new Config(options);