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.
This commit is contained in:
CaitSith2 2021-08-03 23:24:32 -07:00
parent 9408557f03
commit 37e999652d
1 changed files with 5 additions and 0 deletions

View File

@ -188,6 +188,11 @@ async def factorio_server_watcher(ctx: FactorioContext):
factorio_server_logger.info(msg) factorio_server_logger.info(msg)
if not ctx.rcon_client and "Starting RCON interface at IP ADDR:" in 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) 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: if not ctx.awaiting_bridge and "Archipelago Bridge Data available for game tick " in msg:
ctx.awaiting_bridge = True ctx.awaiting_bridge = True