From 37e999652d8790565aaf37730fe9558504a35394 Mon Sep 17 00:00:00 2001 From: CaitSith2 Date: Tue, 3 Aug 2021 23:24:32 -0700 Subject: [PATCH] Return of the warning for the backwards compatibility layer. Mainly, make sure the backwards compatible /sc game.print works 100% of the time, instead of being silent, since commands that disable achievemets need to be executed twice at least once, within a certain period of time. --- FactorioClient.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/FactorioClient.py b/FactorioClient.py index 09c2cf80..d1b32b67 100644 --- a/FactorioClient.py +++ b/FactorioClient.py @@ -188,6 +188,11 @@ async def factorio_server_watcher(ctx: FactorioContext): factorio_server_logger.info(msg) if not ctx.rcon_client and "Starting RCON interface at IP ADDR:" in msg: ctx.rcon_client = factorio_rcon.RCONClient("localhost", rcon_port, rcon_password) + # TODO: remove around version 0.2 + if ctx.mod_version < Utils.Version(0, 1, 6): + ctx.rcon_client.send_command("/sc game.print('Starting Archipelago Bridge')") + ctx.rcon_client.send_command("/sc game.print('Starting Archipelago Bridge')") + if not ctx.awaiting_bridge and "Archipelago Bridge Data available for game tick " in msg: ctx.awaiting_bridge = True