4 Commits
Author SHA1 Message Date
Mikaël Capelle 1cf557a33c Bump version to 1.0.2. 2020-11-17 22:08:58 +01:00
Mikaël Capelle 753871d62a Fix getPluginStatus. 2020-11-17 22:05:56 +01:00
Mikaël Capelle 8b49e0d3cd Do not move non-enabled ESPs to optional. 2020-11-17 19:38:22 +01:00
Mikaël Capelle 52e20cf676 Update mobase stubs in setup.cfg. 2020-11-15 21:53:05 +01:00
3 changed files with 6 additions and 21 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ deps =
mypy
flake8
flake8-black
mobase-stubs
mobase-stubs==2.4.0.a3
git+https://github.com/Holt59/bain-wizard-interpreter
commands =
black src --check --diff --exclude "lib" --exclude "ui"
+1 -16
View File
@@ -60,7 +60,7 @@ class WizardInstaller(mobase.IPluginInstallerSimple):
return self._tr("Installer for BAIN archive containing wizard scripts.")
def version(self):
return mobase.VersionInfo(1, 0, 1)
return mobase.VersionInfo(1, 0, 2)
def isActive(self):
return self._organizer.pluginSetting(self.name(), "enabled")
@@ -321,21 +321,6 @@ class WizardInstaller(mobase.IPluginInstallerSimple):
tree.merge(entry)
# Move all non-selected plugins to "optional":
optionals: List[mobase.FileTreeEntry] = []
for entry in tree:
if entry.isFile() and (
entry.hasSuffix(["esl", "esp", "esm"])
and entry.name() not in dialog.plugins()
):
optionals.append(entry)
# Do not keep empty optional folder:
if optionals:
optional = tree.addDirectory("optional")
for entry in optionals:
optional.insert(entry)
# Handle renames:
for original, new in dialog.renames().items():
# Entry should be at the root:
+4 -4
View File
@@ -165,11 +165,11 @@ class MO2ManagerModInterface(ManagerModInterface):
def getPluginStatus(self, filename) -> int:
state = self._organizer.pluginList().state(filename)
if state & mobase.PluginState.MISSING:
return -1
if state & mobase.PluginState.INACTIVE:
if state == mobase.PluginState.ACTIVE:
return 2
if state == mobase.PluginState.INACTIVE:
return 0 # Or 1?
return 2
return -1
def getFilename(self, filepath: str) -> str:
path = self._resolve(filepath)