mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 15:33:12 +09:00
Make researchSync work for any research on any node
This commit is contained in:
1 parent
fa4c10dce2
commit
98c6795f8f
4 files changed
+208
-94
No files matched your search
@@ -1,11 +1,19 @@
|
||||
|
||||
local data = {};
|
||||
local force = game.forces["player"];
|
||||
|
||||
for _, tech in pairs(game.forces["player"].technologies) do
|
||||
for _, tech in pairs(force.technologies) do
|
||||
local progress;
|
||||
if tech == force.current_research then
|
||||
progress = force.research_progress
|
||||
else
|
||||
progress = force.get_saved_technology_progress(tech.name);
|
||||
end
|
||||
local tech_data = {
|
||||
tech.name,
|
||||
tostring(tech.researched),
|
||||
tostring(tech.level),
|
||||
tostring(progress),
|
||||
}
|
||||
tech_data = table.concat(tech_data, ':')
|
||||
table.insert(data, tech_data);
|
||||
|
||||
Reference in new issue
Block a user