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:
Fabian Dill
2021-04-14 17:51:11 +02:00
parent 73bc5fb376
commit 432ae5865d
3 changed files with 6 additions and 5 deletions

View File

@@ -108,7 +108,8 @@ async def game_watcher(ctx: FactorioContext):
with open(bridge_file) as f:
data = json.load(f)
research_data = data["research_done"]
research_data = {int(tech_name.split("-")[1]) for tech_name in research_data if tech_name.startswith("ap-")}
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]}")