From 0e008ac87bb359884ac105f8bb8a5735761bb6eb Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 27 Jun 2019 22:41:58 +0200 Subject: [PATCH] Added method to get DCS saved games directory --- userdata/dcs_environment.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/userdata/dcs_environment.py b/userdata/dcs_environment.py index 050a81f2..f5c10efd 100644 --- a/userdata/dcs_environment.py +++ b/userdata/dcs_environment.py @@ -3,8 +3,6 @@ This utility classes provides methods to check players installed DCS environment TODO : add method 'is_using_open_beta', 'is_using_stable' TODO : [NICE to have] add method to check list of installed DCS modules (could be done either through window registry, or through filesystem analysis) -TODO : add method 'get DCS save path' - """ import winreg @@ -119,7 +117,16 @@ def get_dcs_install_directory(): print("Couldn't detect any installed DCS World version") +def get_dcs_saved_games_directory(): + """ + Get the save game directory for DCS World + :return: Save game directory as string + """ + return os.path.join(os.path.expanduser("~"), "Saved Games", "DCS") + + if __name__ == "__main__": print("Using STEAM Edition : " + str(is_using_dcs_steam_edition())) print("Using Standalone Edition : " + str(is_using_dcs_standalone_edition())) - print("DCS Installation directory : " + get_dcs_install_directory()) \ No newline at end of file + print("DCS Installation directory : " + get_dcs_install_directory()) + print("DCS saved games directory : " + get_dcs_saved_games_directory()) \ No newline at end of file