From fa2891f7857f3d1be53284e380695759742ef214 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sun, 17 Sep 2023 22:47:06 +0200 Subject: [PATCH] Factorio: offer error message with some more insight for lock file in use (#2187) --- worlds/factorio/Client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/worlds/factorio/Client.py b/worlds/factorio/Client.py index 58dbb6df83..050455bb07 100644 --- a/worlds/factorio/Client.py +++ b/worlds/factorio/Client.py @@ -446,6 +446,10 @@ async def factorio_spinup_server(ctx: FactorioContext) -> bool: logger.warning("It appears your mods are loaded from Appdata, " "this can lead to problems with multiple Factorio instances. " "If this is the case, you will get a file locked error running Factorio.") + elif "Couldn't create lock file" in msg: + raise Exception(f"This Factorio (at {executable}) is either already running, " + "or a Factorio sharing data directories is already running. " + "Server could not start up.") if not rcon_client and "Starting RCON interface at IP ADDR:" in msg: rcon_client = factorio_rcon.RCONClient("localhost", rcon_port, rcon_password) if ctx.mod_version == ctx.__class__.mod_version: