Skip to content

Commit 889bc9d

Browse files
recklesscoderBerserker66
authored andcommitted
FactorioClient: Warn about Windows console input.
1 parent 165a38d commit 889bc9d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

FactorioClient.py

+7
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import copy
77
import re
88
import subprocess
9+
import sys
910
import time
1011
import random
1112
import typing
@@ -19,8 +20,13 @@
1920
from queue import Queue
2021
import Utils
2122

23+
def check_stdin() -> None:
24+
if Utils.is_windows and sys.stdin:
25+
print("WARNING: Console input is not routed reliably on Windows, use the GUI instead.")
26+
2227
if __name__ == "__main__":
2328
Utils.init_logging("FactorioClient", exception_logger="Client")
29+
check_stdin()
2430

2531
from CommonClient import CommonContext, server_loop, ClientCommandProcessor, logger, gui_enabled, get_base_parser
2632
from MultiServer import mark_raw
@@ -326,6 +332,7 @@ async def factorio_server_watcher(ctx: FactorioContext):
326332
if not ctx.server:
327333
logger.info("Established bridge to Factorio Server. "
328334
"Ready to connect to Archipelago via /connect")
335+
check_stdin()
329336

330337
if not ctx.awaiting_bridge and "Archipelago Bridge Data available for game tick " in msg:
331338
ctx.awaiting_bridge = True

0 commit comments

Comments
 (0)