pass through sys args to factorio server

This commit is contained in:
Fabian Dill 2021-05-15 22:11:20 +02:00
parent 19896e1fae
commit c4f5db9c84
1 changed files with 3 additions and 1 deletions

View File

@ -21,7 +21,6 @@ rcon_port = 24242
rcon_password = ''.join(random.choice(string.ascii_letters) for x in range(32)) rcon_password = ''.join(random.choice(string.ascii_letters) for x in range(32))
save_name = "Archipelago" save_name = "Archipelago"
server_args = (save_name, "--rcon-port", rcon_port, "--rcon-password", rcon_password)
logging.basicConfig(format='[%(name)s]: %(message)s', level=logging.INFO) logging.basicConfig(format='[%(name)s]: %(message)s', level=logging.INFO)
options = Utils.get_options() options = Utils.get_options()
@ -35,6 +34,9 @@ if not os.path.exists(executable):
else: else:
raise FileNotFoundError(executable) raise FileNotFoundError(executable)
import sys
server_args = (save_name, "--rcon-port", rcon_port, "--rcon-password", rcon_password, *sys.argv[1:])
threadpool = ThreadPoolExecutor(10) threadpool = ThreadPoolExecutor(10)