From b2239aeb968bf9cb7ab17274b94409578684a2d7 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Tue, 19 Nov 2019 20:58:15 +0100 Subject: [PATCH 1/5] Add changelog entry from 1.2.4 Add changelog entry for the removal of the combinator signaling which was first implemented in the master branch. --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa5156e4..8e309434 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,7 +50,6 @@ Version 2.0.0 handling in client. - Removed redundant call to /api/slaves in globalChat plugin. - Removed broken serverManager plugin. -- Removed broken remote combinator signaling. - Removed factorio_version from config. The version installed is auto detected and used instead. - Removed the playerManager specific command CLI tools/delete_player.js. @@ -98,6 +97,12 @@ Version 2.0.0 - Changed the format of database/slaves.json. +Version 1.2.4 +------------- + +- Removed broken remote combinator signaling. + + Version 1.2.3 ------------- From f1ac41bc4c65a80503f3970ff648aff1d7b7cdf2 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Wed, 20 Nov 2019 02:56:01 +0100 Subject: [PATCH 2/5] Port fix researchSync updating researched technologies Add check in filter_updated_techs that ignores already researched technologies. This is a port of b0eb188. --- CHANGELOG.md | 1 + sharedPlugins/researchSync/index.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e309434..7ef46785 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -101,6 +101,7 @@ Version 1.2.4 ------------- - Removed broken remote combinator signaling. +- Fixed research sync endlessly updating already researched technologies Version 1.2.3 diff --git a/sharedPlugins/researchSync/index.js b/sharedPlugins/researchSync/index.js index 5054083f..5e555cac 100644 --- a/sharedPlugins/researchSync/index.js +++ b/sharedPlugins/researchSync/index.js @@ -259,6 +259,11 @@ class ResearchSync { if (isNaN(cluster_techs[name].progress)) continue + // Ignore researched techs + if (!tech.infinite && tech.researched) { + continue; + } + // Do not update progress for infinite techs with a local level that's higher. if (tech.infinite && tech.level > cluster_techs[name].level) { continue; From 3e7f497669605520676b212c5d15a95499d86041 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Wed, 20 Nov 2019 03:07:32 +0100 Subject: [PATCH 3/5] Port remove obsolete flow statistics from clusterioMod Remove the obsolete and broken statistics gather from the clusterioMod plugin. The statisticsExporter plugin already exports all of the statistics (and more) that was exported here. This is a port of 3e7d4a8. --- CHANGELOG.md | 1 + sharedPlugins/clusterioMod/index.js | 61 ----------------------------- 2 files changed, 1 insertion(+), 61 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ef46785..57216c94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -102,6 +102,7 @@ Version 1.2.4 - Removed broken remote combinator signaling. - Fixed research sync endlessly updating already researched technologies +- Removed obsolete item/fluid statistics from clusterioMod Version 1.2.3 diff --git a/sharedPlugins/clusterioMod/index.js b/sharedPlugins/clusterioMod/index.js index d9b1d9a9..3a845b63 100644 --- a/sharedPlugins/clusterioMod/index.js +++ b/sharedPlugins/clusterioMod/index.js @@ -34,67 +34,6 @@ module.exports = class remoteCommands { ensureFileSync(instancedirectory + "/script-output/output.txt"); ensureFileSync(instancedirectory + "/script-output/orders.txt"); - - // flow/production statistics ------------------------------------------------------------ - var oldFlowStats = false; - var oldTimestamp; - var oldFlowStats; - setInterval(function(){ - fs.readFile(instancedirectory + "/script-output/flows.txt", {encoding: "utf8"}, function(err, data) { - if(!err && data) { - let timestamp = Date.now(); - data = data.split("\n"); - let flowStats = []; - for(let i = 0; i < data.length; i++) { - // try catch to remove any invalid json - try{ - flowStats[flowStats.length] = JSON.parse(data[i]); - } catch (e) { - // console.log(" invalid json: " + i); - // some lines of JSON are invalid but don't worry, we just filter em out - } - } - // fluids - let flowStat1 = flowStats[flowStats.length-1].flows.player.input_counts - // items - let flowStat2 = flowStats[flowStats.length-2].flows.player.input_counts - // merge fluid and item flows - let totalFlows = {}; - for(let key in flowStat1) totalFlows[key] = flowStat1[key]; - for(let key in flowStat2) totalFlows[key] = flowStat2[key]; - if(oldFlowStats && totalFlows && oldTimestamp) { - let payload = objectOps.deepclone(totalFlows); - // change from total reported to per time unit - for(let key in oldFlowStats) { - // get production per minute - payload[key] = Math.floor((payload[key] - oldFlowStats[key])/(timestamp - oldTimestamp)*60000); - if(payload[key] < 0) { - payload[key] = 0; - } - } - for(let key in payload) { - if(payload[key] == '0') { - delete payload[key]; - } - } - console.log("Recorded flows, copper plate since last time: " + payload["copper-plate"]); - needle.post( - that.config.masterURL + '/api/logStats', - {timestamp: timestamp, instanceID: that.config.unique, data: payload}, - needleOptionsWithTokenAuthHeader, - function (err, response, body) { - // we did it, keep going - } - ); - } - oldTimestamp = timestamp; - oldFlowStats = totalFlows; - fs.writeFileSync(instancedirectory + "/script-output/flows.txt", ""); - } - }); - // we don't need to update stats quickly as that could be expensive - }, 60000*5); - // provide items -------------------------------------------------------------- // trigger when something happens to output.txt fs.watch(instancedirectory + "/script-output/output.txt", function (eventType, filename) { From a2d10c8c02684de0c5a96ffac3649908f75e4944 Mon Sep 17 00:00:00 2001 From: Survaaki Date: Fri, 22 Nov 2019 09:40:07 +0000 Subject: [PATCH 4/5] Add changelog entry from 1.2.4 Add changelog entry for the change in the removed master mod uploading. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57216c94..e245d65b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -103,6 +103,7 @@ Version 1.2.4 - Removed broken remote combinator signaling. - Fixed research sync endlessly updating already researched technologies - Removed obsolete item/fluid statistics from clusterioMod +- Removed per mod upload logging when config.uploadModsToMaster disabled Version 1.2.3 From 7a03b84858a0a51e6d680e2e00d20a0da720d785 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Thu, 5 Dec 2019 19:21:00 +0100 Subject: [PATCH 5/5] Port fix bcrypt failing to install on Windows The maintainers of bcrypt have in their infinite wisdom decided to stop distributing Windows binaries. Their inner workings remain a mystery. This is a port of 5fe98a0. --- CHANGELOG.md | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e245d65b..23b048e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -104,6 +104,8 @@ Version 1.2.4 - Fixed research sync endlessly updating already researched technologies - Removed obsolete item/fluid statistics from clusterioMod - Removed per mod upload logging when config.uploadModsToMaster disabled +- Fixed bcrypt failing to install on windows due to the new version not + having Windows binaries. Version 1.2.3 diff --git a/package.json b/package.json index 1d1fd4ff..a56560de 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "as-table": "^1.0.31", "averaged-timeseries": "^1.4.0", "base64url": "^3.0.0", - "bcrypt": "^3.0.6", + "bcrypt": "=3.0.6", "bcrypt-promise": "^2.0.0", "body-parser": "^1.18.2", "cli-interact": "^0.1.9",