From f1ac41bc4c65a80503f3970ff648aff1d7b7cdf2 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Wed, 20 Nov 2019 02:56:01 +0100 Subject: [PATCH] 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;