mirror of
https://github.com/ModOrganizer2/modorganizer-installer_wizard.git
synced 2026-07-27 14:07:59 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1cf557a33c | ||
|
|
753871d62a | ||
|
|
8b49e0d3cd | ||
|
|
52e20cf676 |
@@ -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
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user