mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 23:24:52 +09:00
Refactor out config injection in modManager
Change config in modManager to be passed to each individual functions instead of requiring it be present at load time.
This commit is contained in:
1 parent
5f33cf4d3b
commit
a783bd9651
3 files changed
+244
-240
No files matched your search
@@ -10,7 +10,7 @@ module.exports = class remoteCommands {
|
||||
this.config = mergedConfig;
|
||||
this.socket = extras.socket;
|
||||
const pluginManager = require("lib/manager/pluginManager.js");
|
||||
// const modManager = require("lib/manager/modManager.js")(this.config);
|
||||
// const modManager = require("lib/manager/modManager");
|
||||
this.socket.on("hello", () => {
|
||||
this.socket.emit("registerServerManager");
|
||||
});
|
||||
@@ -19,7 +19,7 @@ module.exports = class remoteCommands {
|
||||
});
|
||||
this.socket.on("serverManagerGetMods", async (data, callback) => {
|
||||
// TODO: Implement this function separately from listMods (which console.logs it)
|
||||
// let mods = modManager.getMods()
|
||||
// let mods = modManager.getMods(this.config)
|
||||
// callback(mods);
|
||||
});
|
||||
this.socket.on("serverManagerGetPlugins", async (data, callback) => {
|
||||
|
||||
Reference in new issue
Block a user