mirror of
https://github.com/ModOrganizer2/modorganizer-basic_games.git
synced 2026-07-27 14:07:29 -07:00
Multiple updates from master for 2.3.2 release.
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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)
|
||||
@@ -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"
|
||||
Reference in New Issue
Block a user