mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
Factorio: Filter bridged technologies correctly
Turns out, lua does not use regex, nor simple string matching, but its own invention.
This commit is contained in:
@@ -51,11 +51,11 @@ function dumpTech(force)
|
||||
local data_collection = {["research_done"] = research_done}
|
||||
|
||||
for tech_name, tech in pairs(force.technologies) do
|
||||
if tech.researched and string.find(tech_name, "ap-") == 1 then
|
||||
if tech.researched and string.find(tech_name, "ap%-") == 1 then
|
||||
research_done[tech_name] = tech.researched
|
||||
end
|
||||
end
|
||||
game.write_file("ap_bridge.json", game.table_to_json(data_collection), false)
|
||||
game.write_file("ap_bridge.json", game.table_to_json(data_collection), false, 0)
|
||||
-- game.write_file("research_done.json", game.table_to_json(data_collection), false, 0)
|
||||
-- game.print("Sent progress to Archipelago.")
|
||||
end
|
||||
|
Reference in New Issue
Block a user