mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Factorio: fix attempting to create savegame with not filename safe characters (#2842)
This commit is contained in:
@@ -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] "
|
||||||
|
|||||||
Reference in New Issue
Block a user