Factorio: fix sending
This commit is contained in:
parent
0cf9baef4b
commit
a7c9474a37
|
@ -111,7 +111,7 @@ async def game_watcher(ctx: FactorioContext):
|
||||||
research_data = {int(tech_name.split("-")[1]) for tech_name in research_data}
|
research_data = {int(tech_name.split("-")[1]) for tech_name in research_data}
|
||||||
if ctx.locations_checked != research_data:
|
if ctx.locations_checked != research_data:
|
||||||
bridge_logger.info(f"New researches done: "
|
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
|
ctx.locations_checked = research_data
|
||||||
await ctx.send_msgs([{"cmd": 'LocationChecks', "locations": tuple(research_data)}])
|
await ctx.send_msgs([{"cmd": 'LocationChecks', "locations": tuple(research_data)}])
|
||||||
await asyncio.sleep(1)
|
await asyncio.sleep(1)
|
||||||
|
|
|
@ -52,7 +52,7 @@ function dumpTech(force)
|
||||||
|
|
||||||
for tech_name, tech in pairs(force.technologies) do
|
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
|
||||||
data_collection[tech_name] = tech.researched
|
research_done[tech_name] = tech.researched
|
||||||
end
|
end
|
||||||
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)
|
||||||
|
|
Loading…
Reference in New Issue