mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-15 15:24:52 +09:00
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:
1 parent
70ad295a89
commit
6fc3abafd5
101 files changed
+1168
-1168
No files matched your search
@@ -10,4 +10,4 @@ Run the following commands in the folder Clusterio is installed to:
|
||||
npm install @clusterio/plugin-research_sync
|
||||
npx clusteriocontroller plugin add @clusterio/plugin-research_sync
|
||||
|
||||
Substitute clusteriocontroller with clusterioslave or clusterioctl if this a dedicate slave or ctl installation respectively.
|
||||
Substitute clusteriocontroller with clusteriohost or clusterioctl if this a dedicate host or ctl installation respectively.
|
||||
@@ -59,7 +59,7 @@ class ControllerPlugin extends libPlugin.BaseControllerPlugin {
|
||||
|
||||
this.lastProgressBroadcast = Date.now();
|
||||
if (techs.length) {
|
||||
this.broadcastEventToSlaves(this.info.messages.progress, { technologies: techs });
|
||||
this.broadcastEventToHosts(this.info.messages.progress, { technologies: techs });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ class ControllerPlugin extends libPlugin.BaseControllerPlugin {
|
||||
tech.progress = null;
|
||||
this.progressToBroadcast.delete(name);
|
||||
|
||||
this.broadcastEventToSlaves(this.info.messages.finished, { name, level: tech.level });
|
||||
this.broadcastEventToHosts(this.info.messages.finished, { name, level: tech.level });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ class ControllerPlugin extends libPlugin.BaseControllerPlugin {
|
||||
if (progress) {
|
||||
this.progressToBroadcast.add(name);
|
||||
} else if (researched || baseLevel(name) !== level) {
|
||||
this.broadcastEventToSlaves(this.info.messages.finished, { name, level });
|
||||
this.broadcastEventToHosts(this.info.messages.finished, { name, level });
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -138,7 +138,7 @@ class ControllerPlugin extends libPlugin.BaseControllerPlugin {
|
||||
if (tech.level < level || researched) {
|
||||
// Send update if the unlocked level is greater
|
||||
if (level - !researched > tech.level - !tech.researched) {
|
||||
this.broadcastEventToSlaves(this.info.messages.finished, { name, level: level - !researched });
|
||||
this.broadcastEventToHosts(this.info.messages.finished, { name, level: level - !researched });
|
||||
}
|
||||
tech.level = level;
|
||||
tech.progress = progress;
|
||||
|
||||
@@ -28,7 +28,7 @@ module.exports = {
|
||||
messages: {
|
||||
contribution: new libLink.Event({
|
||||
type: "research_sync:contribution",
|
||||
links: ["instance-slave", "slave-controller"],
|
||||
links: ["instance-host", "host-controller"],
|
||||
forwardTo: "controller",
|
||||
eventProperties: {
|
||||
"name": { type: "string" },
|
||||
@@ -38,7 +38,7 @@ module.exports = {
|
||||
}),
|
||||
progress: new libLink.Event({
|
||||
type: "research_sync:progress",
|
||||
links: ["controller-slave", "slave-instance"],
|
||||
links: ["controller-host", "host-instance"],
|
||||
broadcastTo: "instance",
|
||||
eventProperties: {
|
||||
"technologies": {
|
||||
@@ -57,7 +57,7 @@ module.exports = {
|
||||
}),
|
||||
finished: new libLink.Event({
|
||||
type: "research_sync:finished",
|
||||
links: ["instance-slave", "slave-controller", "controller-slave", "slave-instance"],
|
||||
links: ["instance-host", "host-controller", "controller-host", "host-instance"],
|
||||
forwardTo: "controller",
|
||||
broadcastTo: "instance",
|
||||
eventProperties: {
|
||||
@@ -67,7 +67,7 @@ module.exports = {
|
||||
}),
|
||||
syncTechnologies: new libLink.Request({
|
||||
type: "research_sync:sync_technologies",
|
||||
links: ["instance-slave", "slave-controller"],
|
||||
links: ["instance-host", "host-controller"],
|
||||
forwardTo: "controller",
|
||||
requestProperties: {
|
||||
"technologies": technologies,
|
||||
|
||||
Reference in new issue
Block a user