mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-11 23:04:52 +09:00
Filter out lower levels when syncing research
Fix the next level of an infinite research getting updated with the progress of the previous level from other nodes in the cluster by filtering out infinite researches with a lower level than the local level.
This commit is contained in:
1 parent
62f3a99feb
commit
075d54f708
2 files changed
+8
No files matched your search
@@ -8,6 +8,8 @@ Version 1.2.2
|
||||
Object prototype property in researchSync.
|
||||
- Fixed progress of a current infinite tech carrying over to the next one
|
||||
when researching it and another node completes it in researchSync.
|
||||
- Fixed progress of a previous infinite tech from another node being applied
|
||||
to the current one in researchSync.
|
||||
|
||||
|
||||
Version 1.2.1
|
||||
|
||||
@@ -278,6 +278,12 @@ class ResearchSync {
|
||||
}
|
||||
if (isNaN(cluster_techs[name].progress))
|
||||
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;
|
||||
}
|
||||
|
||||
if (tech.progress < cluster_techs[name].progress)
|
||||
result[name] = cluster_techs[name]
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user