Rename Slave to Host

The role of a slave as a host for Factorio servers is not well reflected
in its name and has caused confusion among users.  Rename slave to host
to better reflect its role as a host of Factorio servers.
This commit is contained in:
Hornwitser committed 2023-02-22 15:30:51 +01:00
1 parent 70ad295a89
commit 6fc3abafd5
101 files changed
+1168 -1168

No files matched your search

+7 -7
View File
@@ -125,7 +125,7 @@ class MockServer extends events.EventEmitter {
class MockInstance extends libLink.Link {
constructor() {
super("instance", "slave", new MockConnector());
super("instance", "host", new MockConnector());
this.logger = new MockLogger();
this.server = new MockServer();
this.name = "test";
@@ -150,9 +150,9 @@ class MockInstance extends libLink.Link {
}
}
class MockSlave extends libLink.Link {
class MockHost extends libLink.Link {
constructor() {
super("slave", "controller", new MockConnector());
super("host", "controller", new MockConnector());
}
}
@@ -193,7 +193,7 @@ class MockController {
["player", new libUsers.User({ name: "player", roles: [1] }, this.userManager.roles)],
]);
this.instances = new Map();
this.slaves = new Map();
this.hosts = new Map();
}
getControllerUrl() {
@@ -228,8 +228,8 @@ async function createControllerPlugin(ControllerPluginClass, info) {
async function createInstancePlugin(InstancePluginClass, info) {
let instance = new MockInstance();
let slave = new MockSlave();
let plugin = new InstancePluginClass(info, instance, slave);
let host = new MockHost();
let plugin = new InstancePluginClass(info, instance, host);
libPlugin.attachPluginMessages(instance, plugin);
await plugin.init();
return plugin;
@@ -242,7 +242,7 @@ module.exports = {
MockConnector,
MockServer,
MockInstance,
MockSlave,
MockHost,
MockControl,
MockController,