mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 07:33:12 +09:00
researchsync: every server can now research
This commit is contained in:
1 parent
8935d03b4a
commit
d1a295ae4e
4 files changed
+51
-28
No files matched your search
@@ -450,6 +450,7 @@ function instanceManagement() {
|
||||
global.subscribedFiles[pluginConfig.scriptOutputFileSubscription] = true;
|
||||
|
||||
fs.watch(instancedirectory + "/script-output/" + pluginConfig.scriptOutputFileSubscription, function (eventType, filename) {
|
||||
if (filename == null) return;
|
||||
// get array of lines in file
|
||||
let stuff = fs.readFileSync(instancedirectory + "/script-output/" + filename, "utf8").split("\n");
|
||||
// if you found anything, reset the file
|
||||
@@ -491,6 +492,7 @@ function instanceManagement() {
|
||||
global.subscribedFiles[pluginConfig.scriptOutputFileSubscription] = true;
|
||||
fs.watch(instancedirectory + "/script-output/" + pluginConfig.scriptOutputFileSubscription, function (eventType, filename) {
|
||||
// get array of lines in file
|
||||
// TODO async
|
||||
let stuff = fs.readFileSync(instancedirectory + "/script-output/" + filename, "utf8").split("\n");
|
||||
// if you found anything, reset the file
|
||||
if (stuff[0]) {
|
||||
|
||||
Reference in new issue
Block a user