Factorio: fix attempting to create savegame with not filename safe characters (#2842)

This commit is contained in:
Fabian Dill 2024-04-01 15:06:02 +02:00 committed by GitHub
parent 24a03bc8b6
commit 4aa03da66e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ import Utils
from CommonClient import ClientCommandProcessor, CommonContext, logger, server_loop, gui_enabled, get_base_parser from CommonClient import ClientCommandProcessor, CommonContext, logger, server_loop, gui_enabled, get_base_parser
from MultiServer import mark_raw from MultiServer import mark_raw
from NetUtils import ClientStatus, NetworkItem, JSONtoTextParser, JSONMessagePart from NetUtils import ClientStatus, NetworkItem, JSONtoTextParser, JSONMessagePart
from Utils import async_start from Utils import async_start, get_file_safe_name
def check_stdin() -> None: def check_stdin() -> None:
@ -120,7 +120,7 @@ class FactorioContext(CommonContext):
@property @property
def savegame_name(self) -> str: def savegame_name(self) -> str:
return f"AP_{self.seed_name}_{self.auth}_Save.zip" return get_file_safe_name(f"AP_{self.seed_name}_{self.auth}")+"_Save.zip"
def print_to_game(self, text): def print_to_game(self, text):
self.rcon_client.send_command(f"/ap-print [font=default-large-bold]Archipelago:[/font] " self.rcon_client.send_command(f"/ap-print [font=default-large-bold]Archipelago:[/font] "