Updated research sync to handle infinite science and hopefully stop it from apply same research in a loop annoying everyone

This commit is contained in:
psihius committed 2019-07-14 01:25:48 +02:00
1 parent 1f8ac50950
commit 0afe35b67c
3 files changed
+40 -21

No files matched your search

+5 -1
View File
@@ -3,7 +3,11 @@
local data = {};
for _, tech in pairs(game.forces["player"].technologies) do
table.insert(data, tech.name .. ":" .. tostring(tech.researched) .. ":" .. tostring(tech.level));
if tech.prototype.max_level == 4294967295 then
table.insert(data, tech.name .. ":" .. tostring(tech.researched) .. ":" .. tostring(tech.level) .. ":true");
else
table.insert(data, tech.name .. ":" .. tostring(tech.researched) .. ":" .. tostring(tech.level) .. ":false");
end
end
game.write_file("researchSync.txt", table.concat(data, "\n"), false, 0)