-
Notifications
You must be signed in to change notification settings - Fork 54
/
game_stardewvalley.py
56 lines (46 loc) · 1.62 KB
/
game_stardewvalley.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import mobase
from PyQt6.QtCore import QFileInfo
from ..basic_game import BasicGame
class StardewValleyModDataChecker(mobase.ModDataChecker):
def __init__(self):
super().__init__()
def dataLooksValid(
self, filetree: mobase.IFileTree
) -> mobase.ModDataChecker.CheckReturn:
for e in filetree:
if isinstance(e, mobase.IFileTree) and e.exists(
"manifest.json", mobase.IFileTree.FILE
):
return mobase.ModDataChecker.VALID
return mobase.ModDataChecker.INVALID
class StardewValleyGame(BasicGame):
Name = "Stardew Valley Support Plugin"
Author = "Syer10"
Version = "0.1.0a"
GameName = "Stardew Valley"
GameShortName = "stardewvalley"
GameNexusName = "stardewvalley"
GameNexusId = 1303
GameSteamId = 413150
GameGogId = 1453375253
GameBinary = "Stardew Valley.exe"
GameDataPath = "mods"
GameDocumentsDirectory = "%DOCUMENTS%/StardewValley"
GameSavesDirectory = "%GAME_DOCUMENTS%/Saves"
GameSupportURL = (
r"https://github.com/ModOrganizer2/modorganizer-basic_games/wiki/"
"Game:-Stardew-Valley"
)
def init(self, organizer: mobase.IOrganizer):
super().init(organizer)
self._register_feature(StardewValleyModDataChecker())
return True
def executables(self):
return [
mobase.ExecutableInfo(
"SMAPI", QFileInfo(self.gameDirectory(), "StardewModdingAPI.exe")
),
mobase.ExecutableInfo(
"Stardew Valley", QFileInfo(self.gameDirectory(), "Stardew Valley.exe")
),
]