mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Move the default save game directory.
The top level DCS directory gets messy fast if we fill it with save games.
This commit is contained in:
@@ -5,13 +5,13 @@ import shutil
|
||||
from typing import Optional
|
||||
|
||||
_dcs_saved_game_folder: Optional[str] = None
|
||||
_file_abs_path = None
|
||||
|
||||
|
||||
def setup(user_folder: str):
|
||||
global _dcs_saved_game_folder
|
||||
_dcs_saved_game_folder = user_folder
|
||||
_file_abs_path = os.path.join(base_path(), "default.liberation")
|
||||
_dcs_saved_game_folder = os.path.join(user_folder, "Liberation", "Saves")
|
||||
if not os.path.exists(_dcs_saved_game_folder):
|
||||
os.makedirs(_dcs_saved_game_folder)
|
||||
|
||||
|
||||
def base_path() -> str:
|
||||
@@ -21,15 +21,15 @@ def base_path() -> str:
|
||||
|
||||
|
||||
def _temporary_save_file() -> str:
|
||||
return os.path.join(base_path(), "tmpsave.liberation")
|
||||
return os.path.join(_dcs_saved_game_folder, "tmpsave.liberation")
|
||||
|
||||
|
||||
def _autosave_path() -> str:
|
||||
return os.path.join(base_path(), "autosave.liberation")
|
||||
return os.path.join(_dcs_saved_game_folder, "autosave.liberation")
|
||||
|
||||
|
||||
def mission_path_for(name: str) -> str:
|
||||
return os.path.join(base_path(), "Missions", "{}".format(name))
|
||||
return os.path.join(base_path(), "Missions", name)
|
||||
|
||||
|
||||
def load_game(path):
|
||||
|
||||
Reference in New Issue
Block a user