Multiple updates from master for 2.3.2 release.

This commit is contained in:
Mikaël Capelle
2021-01-03 11:41:50 +01:00
parent 6cabcaf07c
commit 19c7c8556c
4 changed files with 72 additions and 6 deletions
+5
View File
@@ -20,6 +20,11 @@ def replace_variables(value: str, game: "BasicGame") -> str:
"%DOCUMENTS%",
QStandardPaths.writableLocation(QStandardPaths.DocumentsLocation),
)
if value.find("%USERPROFILE%") != -1:
value = value.replace(
"%USERPROFILE%",
QStandardPaths.writableLocation(QStandardPaths.HomeLocation),
)
if value.find("%GAME_DOCUMENTS%") != -1:
value = value.replace(
"%GAME_DOCUMENTS%", game.documentsDirectory().absolutePath()
+7 -6
View File
@@ -10,22 +10,23 @@ from ..basic_game import BasicGame
class DarkestDungeonGame(BasicGame):
Name = "DarkestDungeon"
Author = "erri120"
Version = "0.1.0"
Version = "0.1.1"
GameName = "Darkest Dungeon"
GameShortName = "darkestdungeon"
GameNexusName = "darkestdungeon"
GameNexusId = 804
GameSteamId = 262060
GameBinary = "_windows//darkest.exe"
GameGogId = 1719198803
GameBinary = "_windowsnosteam//darkest.exe"
GameDataPath = ""
def executables(self):
path = QFileInfo(self.gameDirectory(), "_windows/darkest.exe")
if not path.exists():
path = QFileInfo(self.gameDirectory(), "_windowsnosteam/darkest.exe")
return [
mobase.ExecutableInfo(
"Darkest Dungeon",
QFileInfo(self.gameDirectory(), "_windows//darkest.exe"),
),
mobase.ExecutableInfo("Darkest Dungeon", path),
]
def savesDirectory(self):
+42
View File
@@ -0,0 +1,42 @@
# -*- encoding: utf-8 -*-
from ..basic_game import BasicGame
import os
from PyQt5.QtCore import QDir
class KingdomComeDeliveranceGame(BasicGame):
Name = "Kingdom Come Deliverance Support Plugin"
Author = "Silencer711"
Version = "1.0.0"
GameName = "Kingdom Come: Deliverance"
GameShortName = "kingdomcomedeliverance"
GameNexusName = "kingdomcomedeliverance"
GameNexusId = 2298
GameSteamId = [379430]
GameGogId = [1719198803]
GameBinary = "bin/Win64/KingdomCome.exe"
GameDataPath = "mods"
GameSaveExtension = "whs"
GameDocumentsDirectory = "%GAME_PATH%"
GameSavesDirectory = "%USERPROFILE%/Saved Games/kingdomcome/saves"
def iniFiles(self):
return ["custom.cfg", "system.cfg", "user.cfg"]
def initializeProfile(self, path: QDir, settings: int):
# Create .cfg files if they don't exist
for iniFile in self.iniFiles():
iniPath = self.documentsDirectory().absoluteFilePath(iniFile)
if not os.path.exists(iniPath):
with open(iniPath, "w") as _:
pass
# Create the mods directory if it doesn't exist
modsPath = self.dataDirectory().absolutePath()
if not os.path.exists(modsPath):
os.mkdir(modsPath)
super().initializeProfile(path, settings)
+18
View File
@@ -0,0 +1,18 @@
# -*- encoding: utf-8 -*-
from ..basic_game import BasicGame
class NoMansSkyGame(BasicGame):
Name = "Mo Man's Sky Support Plugin"
Author = "Luca/EzioTheDeadPoet"
Version = "1.0.0"
GameName = "Mo Man's Sky"
GameShortName = "nomanssky"
GaneNexusHame = "nomanssky"
GameSteamId = 275850
GameGogId = 1446213994
GameBinary = "Binaries/NMS.exe"
GameDataPath = "GAMEDATA/PCBANKS/MODS"