Skip to content

Commit

Permalink
Yell about archive invalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
AnyOldName3 committed Mar 1, 2024
1 parent 718e541 commit d1ea454
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 27 deletions.
21 changes: 19 additions & 2 deletions OpenMWExport.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
if "mobase" not in sys.modules:
import mobase

class OpenMWExportPlugin(mobase.IPluginTool):
class OpenMWExportPlugin(mobase.IPluginTool, mobase.IPluginDiagnose):
__NAME = "OpenMW Exporter"
__CONFIG_PATH = "config path"
__ALWAYS_USE_THIS_CONFIG_PATH = "always use this config path"
Expand All @@ -32,6 +32,8 @@ class OpenMWExportPlugin(mobase.IPluginTool):

def __init__(self):
super(OpenMWExportPlugin, self).__init__()
# I think this shouldn't be necessary and a base class should be calling super
mobase.IPluginDiagnose.__init__(self)
self.__organizer : mobase.IOrganizer
self.__nexusBridge : mobase.IModRepositoryBridge

Expand All @@ -52,7 +54,7 @@ def description(self):
return OpenMWExportPlugin.tr("Transfers mod list (left pane) to data fields in OpenMW.cfg and plugin list (right pane, plugins tab) to content fields in OpenMW.cfg. This allows you to run OpenMW with the current profile's setup from outside of Mod Organizer")

def version(self):
return mobase.VersionInfo(4, 0, 0, mobase.ReleaseType.FINAL)
return mobase.VersionInfo(4, 1, 0, mobase.ReleaseType.PRE_ALPHA)

def requirements(self):
return [
Expand Down Expand Up @@ -119,6 +121,21 @@ def display(self):
for pluginIndex in range(len(loadOrder)):
openmwcfg.write("content=" + loadOrder[pluginIndex] + "\n")
QMessageBox.information(self._parentWidget(), OpenMWExportPlugin.tr("OpenMW Export Complete"), OpenMWExportPlugin.tr("The export to OpenMW completed successfully. The current setup was saved to {0}").format(configPath))

def activeProblems(self):
return [0] if self.__organizer.profile().invalidationActive()[0] else []

def shortDescription(self, key):
return OpenMWExportPlugin.tr("Automatic Archive Invalidation is enabled.")

def fullDescription(self, key):
return OpenMWExportPlugin.tr("Automatic Archive Invalidation is enabled in the current profile. Automatic Archive Invalidation attempts to work around a problem in the later Bethesda Games Studios games. It is unnecessary for Morrowind or OpenMW, and the archive used is known to crash the game. You should disable it in the Manage Profiles window.")

def hasGuidedFix(self, key):
return False

def startGuidedFix(self, key):
pass

@staticmethod
def tr(str):
Expand Down
60 changes: 35 additions & 25 deletions OpenMWExport_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,129 +4,139 @@
<context>
<name>OpenMWExportPlugin</name>
<message>
<location filename="OpenMWExport.py" line="52" />
<location filename="OpenMWExport.py" line="54" />
<source>Transfers mod list (left pane) to data fields in OpenMW.cfg and plugin list (right pane, plugins tab) to content fields in OpenMW.cfg. This allows you to run OpenMW with the current profile's setup from outside of Mod Organizer</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="74" />
<location filename="OpenMWExport.py" line="76" />
<source>The most-recently-used openmw.cfg path.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="75" />
<location filename="OpenMWExport.py" line="77" />
<source>Whether to always use the saved openmw.cfg without asking each time.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="76" />
<location filename="OpenMWExport.py" line="78" />
<source>Whether to show the Export to OpenMW option for games with only limited experimental support.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="80" />
<location filename="OpenMWExport.py" line="82" />
<source>Export to OpenMW</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="83" />
<location filename="OpenMWExport.py" line="85" />
<source>Exports the current mod list and plugin load order to OpenMW.cfg</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="92" />
<location filename="OpenMWExport.py" line="94" />
<source>Experimental game</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="92" />
<location filename="OpenMWExport.py" line="94" />
<source>(At least when this plugin is being written) OpenMW only fully supports game data designed for the Morrowind engine. The game being managed is not Morrowind, so do not expect the game to be fully playable. If you think you know better than this message, update this plugin.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="94" />
<location filename="OpenMWExport.py" line="96" />
<source>Before starting export...</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="94" />
<location filename="OpenMWExport.py" line="96" />
<source>Before starting the export to OpenMW, please ensure you've backed up anything in OpenMW.cfg which you do not want to risk losing forever.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="100" />
<location filename="OpenMWExport.py" line="102" />
<source>Config file not specified</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="100" />
<location filename="OpenMWExport.py" line="102" />
<source>No config file was specified</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="121" />
<location filename="OpenMWExport.py" line="123" />
<source>OpenMW Export Complete</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="121" />
<location filename="OpenMWExport.py" line="123" />
<source>The export to OpenMW completed successfully. The current setup was saved to {0}</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="174" />
<location filename="OpenMWExport.py" line="129" />
<source>Automatic Archive Invalidation is enabled.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="132" />
<source>Automatic Archive Invalidation is enabled in the current profile. Automatic Archive Invalidation attempts to work around a problem in the later Bethesda Games Studios games. It is unnecessary for Morrowind or OpenMW, and the archive used is known to crash the game. You should disable it in the Manage Profiles window.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="191" />
<source>Saved openmw.cfg path unavailable</source>
<extracomment>{0} is the key for the setting that's being reset.</extracomment>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="174" />
<location filename="OpenMWExport.py" line="191" />
<source>Saved openmw.cfg path unavailable. Resetting {0}</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="179" />
<location filename="OpenMWExport.py" line="196" />
<source>Choose openmw.cfg path</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="183" />
<location filename="OpenMWExport.py" line="200" />
<source>Saved:&lt;div style="white-space:pre"&gt;{0}&lt;/div&gt;&lt;br&gt;Default:&lt;div style="white-space:pre"&gt;{1}&lt;/div&gt;</source>
<extracomment>&lt;div style=\"white-space:pre\"&gt;{0}&lt;/div&gt; is the saved path. &lt;div style=\"white-space:pre\"&gt;{1}&lt;/div&gt; is the default path. &lt;br&gt; is a line break between them.</extracomment>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="184" />
<location filename="OpenMWExport.py" line="201" />
<source>Saved</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="186" />
<location filename="OpenMWExport.py" line="203" />
<source>Default</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="188" />
<location filename="OpenMWExport.py" line="205" />
<source>Browse</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="189" />
<location filename="OpenMWExport.py" line="206" />
<source>Always use this path</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="202" />
<location filename="OpenMWExport.py" line="219" />
<source>Locate OpenMW Config File</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="217" />
<location filename="OpenMWExport.py" line="234" />
<source>Plugin update available</source>
<translation type="unfinished" />
</message>
<message>
<location filename="OpenMWExport.py" line="217" />
<location filename="OpenMWExport.py" line="234" />
<source>{0} can be updated from version {1} to {2}. Do you want to open the download page in your browser?</source>
<translation type="unfinished" />
</message>
Expand Down

0 comments on commit d1ea454

Please sign in to comment.