Fix issue with research_sync plugin (#502)

* fix type issues on loading technologies and broadcasting progress

* Distinguish Technology and TechnologySync type
This commit is contained in:
Luciole authored and GitHub committed 2023-08-26 16:35:39 +02:00
1 parent 36ced0d3ba
commit 1afbbe04e1
3 files changed
+26 -19

No files matched your search

+2 -2
View File
@@ -3,7 +3,7 @@ import {
ContributionEvent,
ProgressEvent,
FinishedEvent,
Technology,
TechnologySync,
SyncTechnologiesRequest,
} from "./messages";
@@ -73,7 +73,7 @@ export class InstancePlugin extends lib.BaseInstancePlugin {
let techsToSend = [];
let instanceTechs = new Map();
for (let tech of JSON.parse(dumpJson)) {
techsToSend.push(new Technology(
techsToSend.push(new TechnologySync(
tech.name,
tech.level,
tech.progress || null,