Skip to content

Commit

Permalink
Merge pull request #13 from Qudix/master
Browse files Browse the repository at this point in the history
Improved data checker for STALKER Anomaly
  • Loading branch information
Holt59 authored Nov 7, 2020
2 parents 41ac867 + e4d594c commit f123a2d
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions games/game_stalkeranomaly.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,30 @@


class StalkerAnomalyModDataChecker(mobase.ModDataChecker):
_valid_folders: List[str] = [
"db",
"appdata",
"gamedata",
]

def __init__(self):
super().__init__()

def dataLooksValid(
self, tree: mobase.IFileTree
) -> mobase.ModDataChecker.CheckReturn:
if tree.exists("db") or tree.exists("appdata") or tree.exists("gamedata"):
return mobase.ModDataChecker.VALID
else:
return mobase.ModDataChecker.INVALID
for e in tree:
if e.isDir():
if e.name().lower() in self._valid_folders:
return mobase.ModDataChecker.VALID

return mobase.ModDataChecker.INVALID


class StalkerAnomalyGame(BasicGame, mobase.IPluginFileMapper):
Name = "STALKER Anomaly"
Author = "Qudix"
Version = "0.3.0"
Version = "0.3.1"
Description = "Adds support for STALKER Anomaly"

GameName = "STALKER Anomaly"
Expand Down

0 comments on commit f123a2d

Please sign in to comment.