Files
python-plugins-doc/api/mobase.IModList.html
T

646 lines
35 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>IModList &mdash; MO2 Python Plugin API 2.3rc1 documentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/graphviz.css" type="text/css" />
<link rel="shortcut icon" href="../_static/mo2.ico"/>
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="IModRepositoryBridge" href="mobase.IModRepositoryBridge.html" />
<link rel="prev" title="IModInterface" href="mobase.IModInterface.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> MO2 Python Plugin API
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../setup-tools.html">Setting up the environment</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../setup-tools.html#required-tools">Required tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="../setup-tools.html#preparation">Preparation</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../setup-tools.html#get-the-mobase-stubs">1. Get the <code class="docutils literal notranslate"><span class="pre">mobase</span></code> stubs</a></li>
<li class="toctree-l3"><a class="reference internal" href="../setup-tools.html#configure-visual-studio-code-for-mobase">2. Configure Visual Studio Code for <code class="docutils literal notranslate"><span class="pre">mobase</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="../setup-tools.html#configure-mypy-to-find-the-mobase-stubs">3. Configure <code class="docutils literal notranslate"><span class="pre">mypy</span></code> to find the <code class="docutils literal notranslate"><span class="pre">mobase</span></code> stubs</a></li>
<li class="toctree-l3"><a class="reference internal" href="../setup-tools.html#optional-automatically-reload-plugins-during-development">4. [Optional] Automatically reload plugins during development</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../setup-tools.html#testing-the-setup">Testing the setup</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../plugin-types.html">Type of Plugins</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../plugin-types.html#installers">Installers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugin-types.html#previewers">Previewers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugin-types.html#mod-page">Mod Page</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugin-types.html#game">Game</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugin-types.html#tool">Tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugin-types.html#proxies">Proxies</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugin-types.html#free-plugins"><em>Free Plugins</em></a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugin-types.html#extension-interfaces">Extension Interfaces</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../plugin-types.html#diagnose">Diagnose</a></li>
<li class="toctree-l3"><a class="reference internal" href="../plugin-types.html#file-mappings">File Mappings</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../writing-plugins.html">Writing Plugins</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../writing-plugins.html#getting-started">Getting started</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../writing-plugins.html#single-file-plugins">Single file plugins</a></li>
<li class="toctree-l3"><a class="reference internal" href="../writing-plugins.html#module-plugins">Module Plugins</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../writing-plugins.html#writing-the-plugin">Writing the plugin</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../writing-plugins.html#iplugin-interface"><code class="docutils literal notranslate"><span class="pre">IPlugin</span></code> interface</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../writing-plugins.html#examples">Examples</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../writing-plugins.html#tutorial-plugins">Tutorial Plugins</a></li>
<li class="toctree-l3"><a class="reference internal" href="../writing-plugins.html#official-plugins">Official Plugins</a></li>
<li class="toctree-l3"><a class="reference internal" href="../writing-plugins.html#unofficial-plugins">Unofficial Plugins</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../writing-plugins.html#internationalization">Internationalization</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../writing-plugins.html#adding-translation-code">Adding translation code</a></li>
<li class="toctree-l3"><a class="reference internal" href="../writing-plugins.html#generating-qt-translation-files">Generating Qt translation files</a></li>
<li class="toctree-l3"><a class="reference internal" href="../writing-plugins.html#translating">Translating</a></li>
<li class="toctree-l3"><a class="reference internal" href="../writing-plugins.html#distributing-translations">Distributing translations</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../faq.html">FAQ</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../faq.html#why-is-mo2-throwing-an-exception-when-i-try-to-create-a-type-inheriting-one-of-mo2-class">1. Why is MO2 throwing an exception when I try to create a type inheriting one of MO2 class?</a></li>
<li class="toctree-l2"><a class="reference internal" href="../faq.html#how-can-i-be-sure-to-implement-all-the-required-methods-when-creating-a-plugin">2. How can I be sure to implement all the required methods when creating a plugin?</a></li>
<li class="toctree-l2"><a class="reference internal" href="../faq.html#why-are-my-isinstance-x-qobject-and-isinstance-y-qwidget-not-working">3. Why are my <code class="docutils literal notranslate"><span class="pre">isinstance(x,</span> <span class="pre">QObject)</span></code> and <code class="docutils literal notranslate"><span class="pre">isinstance(y,</span> <span class="pre">QWidget)</span></code> not working?</a></li>
</ul>
</li>
<li class="toctree-l1 current"><a class="reference internal" href="../mobase.html"><code class="docutils literal notranslate"><span class="pre">mobase</span></code> API</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../mobase.html#functions">Functions</a><ul>
<li class="toctree-l3"><a class="reference internal" href="mobase.getFileVersion.html">getFileVersion</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.getIconForExecutable.html">getIconForExecutable</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.getProductVersion.html">getProductVersion</a></li>
</ul>
</li>
<li class="toctree-l2 current"><a class="reference internal" href="../mobase.html#classes">Classes</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="mobase.BSAInvalidation.html">BSAInvalidation</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.DataArchives.html">DataArchives</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.EndorsedState.html">EndorsedState</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.ExecutableForcedLoadSetting.html">ExecutableForcedLoadSetting</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.ExecutableInfo.html">ExecutableInfo</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.FileInfo.html">FileInfo</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.FileTreeEntry.html">FileTreeEntry</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.GamePlugins.html">GamePlugins</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.GuessQuality.html">GuessQuality</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.GuessedString.html">GuessedString</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.IDownloadManager.html">IDownloadManager</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.IFileTree.html">IFileTree</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.IInstallationManager.html">IInstallationManager</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.IModInterface.html">IModInterface</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">IModList</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.IModRepositoryBridge.html">IModRepositoryBridge</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.IOrganizer.html">IOrganizer</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.IPlugin.html">IPlugin</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.IPluginDiagnose.html">IPluginDiagnose</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.IPluginFileMapper.html">IPluginFileMapper</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.IPluginGame.html">IPluginGame</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.IPluginInstaller.html">IPluginInstaller</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.IPluginInstallerCustom.html">IPluginInstallerCustom</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.IPluginInstallerSimple.html">IPluginInstallerSimple</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.IPluginList.html">IPluginList</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.IPluginModPage.html">IPluginModPage</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.IPluginPreview.html">IPluginPreview</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.IPluginRequirement.html">IPluginRequirement</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.IPluginTool.html">IPluginTool</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.IProfile.html">IProfile</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.ISaveGame.html">ISaveGame</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.ISaveGameInfoWidget.html">ISaveGameInfoWidget</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.InstallResult.html">InstallResult</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.InterfaceNotImplemented.html">InterfaceNotImplemented</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.LoadOrderMechanism.html">LoadOrderMechanism</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.LocalSavegames.html">LocalSavegames</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.Mapping.html">Mapping</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.ModDataChecker.html">ModDataChecker</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.ModDataContent.html">ModDataContent</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.ModRepositoryFileInfo.html">ModRepositoryFileInfo</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.ModState.html">ModState</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.PluginRequirementFactory.html">PluginRequirementFactory</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.PluginSetting.html">PluginSetting</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.PluginState.html">PluginState</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.ProfileSetting.html">ProfileSetting</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.ReleaseType.html">ReleaseType</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.SaveGameInfo.html">SaveGameInfo</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.ScriptExtender.html">ScriptExtender</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.SortMechanism.html">SortMechanism</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.TrackedState.html">TrackedState</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.UnmanagedMods.html">UnmanagedMods</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.VersionInfo.html">VersionInfo</a></li>
<li class="toctree-l3"><a class="reference internal" href="mobase.VersionScheme.html">VersionScheme</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">MO2 Python Plugin API</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../mobase.html"><code class="docutils literal notranslate"><span class="pre">mobase</span></code> API</a> &raquo;</li>
<li>IModList</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/api/mobase.IModList.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="imodlist">
<h1>IModList<a class="headerlink" href="#imodlist" title="Permalink to this headline">ΒΆ</a></h1>
<dl class="class">
<dt id="mobase.IModList">
<em class="property">class </em><code class="sig-prename descclassname">mobase.</code><code class="sig-name descname">IModList</code><a class="headerlink" href="#mobase.IModList" title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Interface to the mod-list.</p>
<p>All api functions in this interface work need the internal name of a mod to find a
mod. For regular mods (mods the user installed) the display name (as shown to the user)
and internal name are identical. For other mods (non-MO mods) there is currently no way
to translate from display name to internal name because the display name might not me un-ambiguous.</p>
<p class="rubric">Methods Summary</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#mobase.IModList.allMods" title="mobase.IModList.allMods"><code class="xref py py-obj docutils literal notranslate"><span class="pre">allMods</span></code></a>()</p></td>
<td><p><dl class="field-list simple">
<dt class="field-odd">returns</dt>
<dd class="field-odd"><p>A list containing the internal names of all installed mods.</p>
</dd>
</dl>
</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#mobase.IModList.allModsByProfilePriority" title="mobase.IModList.allModsByProfilePriority"><code class="xref py py-obj docutils literal notranslate"><span class="pre">allModsByProfilePriority</span></code></a>([profile])</p></td>
<td><p><dl class="field-list simple">
<dt class="field-odd">returns</dt>
<dd class="field-odd"><p>The list of mod (names), sorted according to the current profile priorities.</p>
</dd>
</dl>
</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#mobase.IModList.displayName" title="mobase.IModList.displayName"><code class="xref py py-obj docutils literal notranslate"><span class="pre">displayName</span></code></a>(name)</p></td>
<td><p>Retrieve the display name of a mod from its internal name.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#mobase.IModList.getMod" title="mobase.IModList.getMod"><code class="xref py py-obj docutils literal notranslate"><span class="pre">getMod</span></code></a>(name)</p></td>
<td><p>Retrieve an interface to a mod using its name.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#mobase.IModList.onModInstalled" title="mobase.IModList.onModInstalled"><code class="xref py py-obj docutils literal notranslate"><span class="pre">onModInstalled</span></code></a>(callback)</p></td>
<td><p>Install a new handler to be called when a new mod is installed.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#mobase.IModList.onModMoved" title="mobase.IModList.onModMoved"><code class="xref py py-obj docutils literal notranslate"><span class="pre">onModMoved</span></code></a>(callback)</p></td>
<td><p>Install a handler to be called when a mod is moved.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#mobase.IModList.onModRemoved" title="mobase.IModList.onModRemoved"><code class="xref py py-obj docutils literal notranslate"><span class="pre">onModRemoved</span></code></a>(callback)</p></td>
<td><p>Install a new handler to be called when a mod is removed.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#mobase.IModList.onModStateChanged" title="mobase.IModList.onModStateChanged"><code class="xref py py-obj docutils literal notranslate"><span class="pre">onModStateChanged</span></code></a>(callback)</p></td>
<td><p>Install a handler to be called when mod states change (enabled/disabled, endorsed, …).</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#mobase.IModList.priority" title="mobase.IModList.priority"><code class="xref py py-obj docutils literal notranslate"><span class="pre">priority</span></code></a>(name)</p></td>
<td><p>Retrieve the priority of a mod.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#mobase.IModList.removeMod" title="mobase.IModList.removeMod"><code class="xref py py-obj docutils literal notranslate"><span class="pre">removeMod</span></code></a>(mod)</p></td>
<td><p>Remove a mod (from disc and from the UI).</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#mobase.IModList.renameMod" title="mobase.IModList.renameMod"><code class="xref py py-obj docutils literal notranslate"><span class="pre">renameMod</span></code></a>(mod,Β name)</p></td>
<td><p>Rename the given mod.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#mobase.IModList.setActive" title="mobase.IModList.setActive"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setActive</span></code></a>(**kwds)</p></td>
<td><p>Helper for &#64;overload to raise when called.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#mobase.IModList.setPriority" title="mobase.IModList.setPriority"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setPriority</span></code></a>(name,Β priority)</p></td>
<td><p>Change the priority of a mod.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#mobase.IModList.state" title="mobase.IModList.state"><code class="xref py py-obj docutils literal notranslate"><span class="pre">state</span></code></a>(name)</p></td>
<td><p>Retrieve the state of a mod.</p></td>
</tr>
</tbody>
</table>
<p class="rubric">Methods Documentation</p>
<dl class="method">
<dt id="mobase.IModList.allMods">
<code class="sig-name descname">allMods</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#mobase.IModList.allMods" title="Permalink to this definition">ΒΆ</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>A list containing the internal names of all installed mods.</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="mobase.IModList.allModsByProfilePriority">
<code class="sig-name descname">allModsByProfilePriority</code><span class="sig-paren">(</span><em class="sig-param">profile=None</em><span class="sig-paren">)</span><a class="headerlink" href="#mobase.IModList.allModsByProfilePriority" title="Permalink to this definition">ΒΆ</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>The list of mod (names), sorted according to the current profile priorities.</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="mobase.IModList.displayName">
<code class="sig-name descname">displayName</code><span class="sig-paren">(</span><em class="sig-param">name</em><span class="sig-paren">)</span><a class="headerlink" href="#mobase.IModList.displayName" title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Retrieve the display name of a mod from its internal name.</p>
<p>If you received an internal name from the API (e.g. <cite>IPluginList.origin</cite>) then you should use
that name to identify the mod in all other api calls but use this function to retrieve the name
to show to the user.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>name</strong> – Internal name of the mod.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The display name of the given mod.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="mobase.IModList.getMod">
<code class="sig-name descname">getMod</code><span class="sig-paren">(</span><em class="sig-param">name</em><span class="sig-paren">)</span><a class="headerlink" href="#mobase.IModList.getMod" title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Retrieve an interface to a mod using its name.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>name</strong> – Name of the mod to retrieve.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>An interface to the given mod, or <cite>None</cite> if there is no mod with this name.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="mobase.IModInterface.html#mobase.IModInterface" title="mobase.IModInterface"><code class="xref py py-class docutils literal notranslate"><span class="pre">IModInterface</span></code></a></p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="mobase.IModList.onModInstalled">
<code class="sig-name descname">onModInstalled</code><span class="sig-paren">(</span><em class="sig-param">callback</em><span class="sig-paren">)</span><a class="headerlink" href="#mobase.IModList.onModInstalled" title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Install a new handler to be called when a new mod is installed.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>callback</strong> – The function to call when a mod is installed. The parameter of the function is the name of the
newly installed mod.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>True if the handler was installed properly (there are currently no reasons for this to fail).</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="mobase.IModList.onModMoved">
<code class="sig-name descname">onModMoved</code><span class="sig-paren">(</span><em class="sig-param">callback</em><span class="sig-paren">)</span><a class="headerlink" href="#mobase.IModList.onModMoved" title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Install a handler to be called when a mod is moved.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>callback</strong> – The function to call when a mod is moved. The first argument is the internal name of the
mod, the second argument the old priority and the third argument the new priority.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>True if the handler was installed properly (there are currently no reasons for this to fail).</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="mobase.IModList.onModRemoved">
<code class="sig-name descname">onModRemoved</code><span class="sig-paren">(</span><em class="sig-param">callback</em><span class="sig-paren">)</span><a class="headerlink" href="#mobase.IModList.onModRemoved" title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Install a new handler to be called when a mod is removed.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>callback</strong> – The function to call when a mod is removed. The parameter of the function is the name of the
removed mod.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>True if the handler was installed properly (there are currently no reasons for this to fail).</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="mobase.IModList.onModStateChanged">
<code class="sig-name descname">onModStateChanged</code><span class="sig-paren">(</span><em class="sig-param">callback</em><span class="sig-paren">)</span><a class="headerlink" href="#mobase.IModList.onModStateChanged" title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Install a handler to be called when mod states change (enabled/disabled, endorsed, …).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>callback</strong> – The function to call when the states of mod change. The argument is a map containing the
mods whose states have changed. Keys are internal mod names and values are mod states.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>True if the handler was installed properly (there are currently no reasons for this to fail).</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="mobase.IModList.priority">
<code class="sig-name descname">priority</code><span class="sig-paren">(</span><em class="sig-param">name</em><span class="sig-paren">)</span><a class="headerlink" href="#mobase.IModList.priority" title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Retrieve the priority of a mod.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>name</strong> – Internal name of the mod.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The priority of the given mod.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="mobase.IModList.removeMod">
<code class="sig-name descname">removeMod</code><span class="sig-paren">(</span><em class="sig-param">mod</em><span class="sig-paren">)</span><a class="headerlink" href="#mobase.IModList.removeMod" title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Remove a mod (from disc and from the UI).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>mod</strong> – The mod to remove.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>True if the mod was removed, False otherwise.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="mobase.IModList.renameMod">
<code class="sig-name descname">renameMod</code><span class="sig-paren">(</span><em class="sig-param">mod</em>, <em class="sig-param">name</em><span class="sig-paren">)</span><a class="headerlink" href="#mobase.IModList.renameMod" title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Rename the given mod.</p>
<p>This method usually invalidates the given mod so you should use the returned value
after calling it instead of the passed value.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>mod</strong> – The mod to rename.</p></li>
<li><p><strong>name</strong> – The new name of the mod.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A valid reference to the given mod after renaming it.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="mobase.IModInterface.html#mobase.IModInterface" title="mobase.IModInterface"><code class="xref py py-class docutils literal notranslate"><span class="pre">IModInterface</span></code></a></p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="mobase.IModList.setActive">
<code class="sig-name descname">setActive</code><span class="sig-paren">(</span><em class="sig-param">**kwds</em><span class="sig-paren">)</span><a class="headerlink" href="#mobase.IModList.setActive" title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Helper for &#64;overload to raise when called.</p>
</dd></dl>
<dl class="method">
<dt id="mobase.IModList.setPriority">
<code class="sig-name descname">setPriority</code><span class="sig-paren">(</span><em class="sig-param">name</em>, <em class="sig-param">priority</em><span class="sig-paren">)</span><a class="headerlink" href="#mobase.IModList.setPriority" title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Change the priority of a mod.</p>
<p><cite>priority</cite> is the new priority after the move. Keep in mind that the mod disappears from its
old location and all mods with higher priority than the moved mod decrease in priority by one.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>name</strong> – Internal name of the mod.</p></li>
<li><p><strong>priority</strong> – The new priority of the mod.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>True if the priority was changed, False otherwise (if the name or priority were invalid).</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="mobase.IModList.state">
<code class="sig-name descname">state</code><span class="sig-paren">(</span><em class="sig-param">name</em><span class="sig-paren">)</span><a class="headerlink" href="#mobase.IModList.state" title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Retrieve the state of a mod.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>name</strong> – Internal name of the mod.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The state of the given mod.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="mobase.IModRepositoryBridge.html" class="btn btn-neutral float-right" title="IModRepositoryBridge" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="mobase.IModInterface.html" class="btn btn-neutral float-left" title="IModInterface" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2020, Holt59.
</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>