From a7c9474a370f0cd0a0caf80d4225b6efccf6404c Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Wed, 14 Apr 2021 04:14:37 +0200 Subject: [PATCH] Factorio: fix sending --- FactorioClient.py | 2 +- data/factorio/mod_template/control.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/FactorioClient.py b/FactorioClient.py index b8dc31e6..d3e3cb44 100644 --- a/FactorioClient.py +++ b/FactorioClient.py @@ -111,7 +111,7 @@ async def game_watcher(ctx: FactorioContext): research_data = {int(tech_name.split("-")[1]) for tech_name in research_data} if ctx.locations_checked != research_data: bridge_logger.info(f"New researches done: " - f"{[lookup_id_to_name[rid] for rid in research_data - ctx.locations_checked]}") + f"{[lookup_id_to_name[rid] for rid in research_data - ctx.locations_checked]}") ctx.locations_checked = research_data await ctx.send_msgs([{"cmd": 'LocationChecks', "locations": tuple(research_data)}]) await asyncio.sleep(1) diff --git a/data/factorio/mod_template/control.lua b/data/factorio/mod_template/control.lua index a63354ad..391a17fc 100644 --- a/data/factorio/mod_template/control.lua +++ b/data/factorio/mod_template/control.lua @@ -52,7 +52,7 @@ function dumpTech(force) for tech_name, tech in pairs(force.technologies) do if tech.researched and string.find(tech_name, "ap-") == 1 then - data_collection[tech_name] = tech.researched + research_done[tech_name] = tech.researched end end game.write_file("ap_bridge.json", game.table_to_json(data_collection), false)