mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
hotfix for openbeta DCS saves
This commit is contained in:
parent
3fd3e591e7
commit
42c8b2f989
@ -14,6 +14,8 @@ from dcs.unit import UnitType
|
||||
|
||||
from game import db
|
||||
|
||||
from .persistency import _base_path
|
||||
|
||||
DEBRIEFING_LOG_EXTENSION = "log"
|
||||
|
||||
|
||||
@ -92,7 +94,7 @@ class Debriefing:
|
||||
|
||||
|
||||
def debriefing_directory_location() -> str:
|
||||
return os.path.expanduser("~\Saved Games\DCS\liberation_debriefings")
|
||||
return os.path.join(_base_path(), "liberation_debriefings")
|
||||
|
||||
|
||||
def _logfiles_snapshot() -> typing.Dict[str, float]:
|
||||
|
||||
@ -4,12 +4,20 @@ import os
|
||||
import shutil
|
||||
|
||||
|
||||
def _base_path() -> str:
|
||||
openbeta_path = os.path.expanduser("~\Saved Games\DCS.openbeta")
|
||||
if os.path.exists(openbeta_path):
|
||||
return openbeta_path
|
||||
else:
|
||||
return os.path.expanduser("~\Saved Games\DCS")
|
||||
|
||||
|
||||
def _save_file() -> str:
|
||||
return os.path.expanduser("~\Saved Games\DCS\liberation_save")
|
||||
return os.path.join(_base_path(), "liberation_save")
|
||||
|
||||
|
||||
def _temporary_save_file() -> str:
|
||||
return os.path.expanduser("~\Saved Games\DCS\liberation_save_tmp")
|
||||
return os.path.join(_base_path(), "liberation_save_tmp")
|
||||
|
||||
|
||||
def _save_file_exists() -> bool:
|
||||
@ -17,7 +25,7 @@ def _save_file_exists() -> bool:
|
||||
|
||||
|
||||
def mission_path_for(name: str) -> str:
|
||||
return os.path.expanduser("~\Saved Games\DCS\Missions\{}".format(name))
|
||||
return os.path.join(_base_path(), "Missions\{}".format(name))
|
||||
|
||||
|
||||
def restore_game():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user