fix: path discovery of cosmoteer for manjaro linux
This commit is contained in:
+2
-17
@@ -17,15 +17,10 @@ import sys
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
import rules_parser
|
||||
import steam_paths
|
||||
|
||||
MOD_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
CANDIDATE_DATA_DIRS = [
|
||||
"/mnt/SSD4TB/SteamLibrary/steamapps/common/Cosmoteer/Data",
|
||||
os.path.expanduser("~/.local/share/Steam/steamapps/common/Cosmoteer/Data"),
|
||||
os.path.expanduser("~/.steam/steam/steamapps/common/Cosmoteer/Data"),
|
||||
]
|
||||
|
||||
# Component fields whose value names another component in the same part.
|
||||
COMPONENT_REF_FIELDS = {
|
||||
"OperationalToggle",
|
||||
@@ -55,17 +50,7 @@ def check(condition, message):
|
||||
_failures.append(message)
|
||||
|
||||
|
||||
def find_data_dir():
|
||||
override = os.environ.get("COSMOTEER_DATA")
|
||||
if override:
|
||||
return override
|
||||
for path in CANDIDATE_DATA_DIRS:
|
||||
if os.path.isdir(path):
|
||||
return path
|
||||
return None
|
||||
|
||||
|
||||
DATA = find_data_dir()
|
||||
DATA = steam_paths.find_data_dir()
|
||||
|
||||
_vanilla_cache = {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user