From 1787b1de693685bc1e36986dc080c5e86b54b471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sat, 30 Aug 2025 12:32:16 +0200 Subject: [PATCH] Allow disabling of REPL (#25071) --- src/openrct2/interface/StdInOutConsole.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/openrct2/interface/StdInOutConsole.cpp b/src/openrct2/interface/StdInOutConsole.cpp index 069380fd32..0e508eaead 100644 --- a/src/openrct2/interface/StdInOutConsole.cpp +++ b/src/openrct2/interface/StdInOutConsole.cpp @@ -16,6 +16,7 @@ #include "../platform/Platform.h" #include "../scripting/ScriptEngine.h" +#include #include // Ignore isatty warning on WIN32 @@ -31,6 +32,12 @@ void StdInOutConsole::Start() return; } + // Allow user to disable the console REPL. Setting this environment variable to any value will prevent REPL from starting. + if (getenv("OPENRCT2_NO_REPL")) + { + return; + } + std::thread replThread([this]() -> void { linenoise::SetMultiLine(true); linenoise::SetHistoryMaxLen(32);