mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
BSA -> Archive
Replace BSA with Archive everywhere apart from where BSAs are used to refer to a specific game that uses actual BSAs for its archives.
This commit is contained in:
@@ -306,7 +306,7 @@ var {
|
||||
<figcaption>Examples of plugin cards.</figcaption>
|
||||
</figure>
|
||||
|
||||
<p>Each plugin is displayed on its own <q>card</q>, which displays all the information LOOT has for that plugin, and provides access to plugin-specific functionality, including its metadata editor. Each plugin also has an item in the sidebar's <span class="button">Plugins</span> tab. The sidebar item contains the plugin's name and icons for plugins that load BSAs or have user metadata. Clicking on a plugin's sidebar item will jump to its card, while double-clicking will jump to its card and open its metadata editor.
|
||||
<p>Each plugin is displayed on its own <q>card</q>, which displays all the information LOOT has for that plugin, and provides access to plugin-specific functionality, including its metadata editor. Each plugin also has an item in the sidebar's <span class="button">Plugins</span> tab. The sidebar item contains the plugin's name and icons for plugins that load archives or have user metadata. Clicking on a plugin's sidebar item will jump to its card, while double-clicking will jump to its card and open its metadata editor.
|
||||
|
||||
<p>The plugin card's header holds the following information, some of which is only displayed if applicable:
|
||||
<ol>
|
||||
@@ -349,7 +349,7 @@ var {
|
||||
<li>Bash Tag suggestions
|
||||
<li>Messages
|
||||
</ul>
|
||||
<li>A conflict filter that can be accessed through each plugin's menu. This filters the plugin cards displayed so that only plugins which conflict with this plugin will be visible. If this plugin loads a BSA, other plugins that load BSAs which <em>may</em> contain conflicting resources are also displayed.</p>
|
||||
<li>A conflict filter that can be accessed through each plugin's menu. This filters the plugin cards displayed so that only plugins which conflict with this plugin will be visible. If this plugin loads an archive, other plugins that load archives which <em>may</em> contain conflicting resources are also displayed.</p>
|
||||
|
||||
Only one plugin's conflict filter can be active at any one time, so activating a second conflict filter will deactivate the first. The plugin for which the filter is currently active has its card highlighted. Sorting with a conflict filter active will first deactivate it.
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace loot {
|
||||
libespm::Plugin(game.LibespmId()),
|
||||
_isEmpty(true),
|
||||
_isActive(false),
|
||||
_loadsBsa(false),
|
||||
_loadsArchive(false),
|
||||
crc(0),
|
||||
numOverrideRecords(0) {
|
||||
try {
|
||||
@@ -91,17 +91,17 @@ namespace loot {
|
||||
// Get whether the plugin is active or not.
|
||||
_isActive = game.IsPluginActive(Name());
|
||||
|
||||
// Get whether the plugin loads a BSA or not.
|
||||
// Get whether the plugin loads an archive (BSA/BA2) or not.
|
||||
if (game.Id() == Game::tes5) {
|
||||
// Skyrim plugins only load BSAs that exactly match their basename.
|
||||
_loadsBsa = boost::filesystem::exists(game.DataPath() / (Name().substr(0, Name().length() - 3) + "bsa"));
|
||||
_loadsArchive = boost::filesystem::exists(game.DataPath() / (Name().substr(0, Name().length() - 3) + "bsa"));
|
||||
}
|
||||
else if (game.Id() != Game::tes4 || boost::iends_with(Name(), ".esp")) {
|
||||
//Oblivion .esp files and FO3, FNV plugins can load BSAs which begin with the plugin basename.
|
||||
string basename = Name().substr(0, Name().length() - 4);
|
||||
for (boost::filesystem::directory_iterator it(game.DataPath()); it != boost::filesystem::directory_iterator(); ++it) {
|
||||
if (it->path().extension().string() == ".bsa" && boost::istarts_with(it->path().filename().string(), basename)) {
|
||||
_loadsBsa = true;
|
||||
_loadsArchive = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -238,7 +238,7 @@ namespace loot {
|
||||
return !DirtyInfo().empty();
|
||||
}
|
||||
|
||||
bool Plugin::LoadsBSA() const {
|
||||
return _loadsBsa;
|
||||
bool Plugin::LoadsArchive() const {
|
||||
return _loadsArchive;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace loot {
|
||||
uint32_t Crc() const;
|
||||
size_t NumOverrideFormIDs() const;
|
||||
|
||||
bool LoadsBSA() const;
|
||||
bool LoadsArchive() const;
|
||||
bool IsActive() const;
|
||||
|
||||
//Load ordering functions.
|
||||
@@ -67,7 +67,7 @@ namespace loot {
|
||||
private:
|
||||
bool _isEmpty; // Does the plugin contain any records other than the TES4 header?
|
||||
bool _isActive;
|
||||
bool _loadsBsa;
|
||||
bool _loadsArchive;
|
||||
std::string version; //Obtained from description field.
|
||||
uint32_t crc;
|
||||
|
||||
|
||||
@@ -380,14 +380,12 @@ namespace loot {
|
||||
loot::vertex_it vit, vitend;
|
||||
for (boost::tie(vit, vitend) = boost::vertices(graph); vit != vitend; ++vit) {
|
||||
BOOST_LOG_TRIVIAL(trace) << "Adding priority difference edges to vertex for \"" << graph[*vit].Name() << "\".";
|
||||
//Priority differences should only be taken account between plugins that conflict.
|
||||
//However, an exception is made for plugins that contain only a header record,
|
||||
//as they are for loading BSAs, and in Skyrim that means the resources they load can
|
||||
//be affected by load order.
|
||||
|
||||
// If the plugin does not have a global priority and doesn't load
|
||||
// an archive and has no override records, skip it.
|
||||
if (!graph[*vit].IsPriorityGlobal() && graph[*vit].NumOverrideFormIDs() == 0 && !graph[*vit].LoadsBSA())
|
||||
// an archive and has no override records, skip it. Plugins without
|
||||
// override records can only conflict with plugins that override
|
||||
// the records they add, so any edge necessary will be added when
|
||||
// evaluating that plugin.
|
||||
if (!graph[*vit].IsPriorityGlobal() && graph[*vit].NumOverrideFormIDs() == 0 && !graph[*vit].LoadsArchive())
|
||||
continue;
|
||||
|
||||
loot::vertex_it vit2, vitend2;
|
||||
|
||||
+1
-1
@@ -734,7 +734,7 @@ namespace loot {
|
||||
pluginNode["isActive"] = plugin.IsActive();
|
||||
pluginNode["isEmpty"] = plugin.IsEmpty();
|
||||
pluginNode["isMaster"] = plugin.isMasterFile();
|
||||
pluginNode["loadsBSA"] = plugin.LoadsBSA();
|
||||
pluginNode["loadsArchive"] = plugin.LoadsArchive();
|
||||
pluginNode["crc"] = IntToHexString(plugin.Crc());
|
||||
pluginNode["version"] = Version(plugin.getDescription()).AsString();
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ loot-clear-metadata
|
||||
:host([data-active=false]) #activeTick {
|
||||
visibility: hidden;
|
||||
}
|
||||
:host([data-bsa=false]) #loadsBSA,
|
||||
:host([data-archive=false]) #loadsArchive,
|
||||
:host([data-empty=false]) #emptyPlugin,
|
||||
:host([data-master=false]) #isMaster,
|
||||
:host(:not([data-edits])) #hasUserEdits {
|
||||
@@ -174,7 +174,7 @@ loot-clear-metadata
|
||||
<core-tooltip id="emptyPlugin" label="Empty Plugin" noarrow>
|
||||
<core-icon icon="visibility-off"></core-icon>
|
||||
</core-tooltip>
|
||||
<core-tooltip id="loadsBSA" label="Loads Archive" noarrow>
|
||||
<core-tooltip id="loadsArchive" label="Loads Archive" noarrow>
|
||||
<core-icon icon="attachment"></core-icon>
|
||||
</core-tooltip>
|
||||
<core-tooltip id="hasUserEdits" label="Has User Metadata" noarrow>
|
||||
@@ -332,7 +332,7 @@ loot-clear-metadata
|
||||
this.shadowRoot.getElementById('activeTick').setPosition();
|
||||
this.shadowRoot.getElementById('emptyPlugin').setPosition();
|
||||
this.shadowRoot.getElementById('hasUserEdits').setPosition();
|
||||
this.shadowRoot.getElementById('loadsBSA').setPosition();
|
||||
this.shadowRoot.getElementById('loadsArchive').setPosition();
|
||||
|
||||
/* Also re-calculate editor tooltip positions. */
|
||||
this.shadowRoot.getElementById('editor').updatePolymerElements();
|
||||
|
||||
@@ -34,7 +34,7 @@ loot-editor-close
|
||||
:host-context(loot-plugin-card[data-active=false]) #activeTick {
|
||||
visibility: hidden;
|
||||
}
|
||||
:host-context(loot-plugin-card[data-bsa=false]) #loadsBSA,
|
||||
:host-context(loot-plugin-card[data-archive=false]) #loadsArchive,
|
||||
:host-context(loot-plugin-card[data-empty=false]) #emptyPlugin,
|
||||
:host-context(loot-plugin-card[data-master=false]) #isMaster {
|
||||
display: none;
|
||||
@@ -134,7 +134,7 @@ loot-editor-close
|
||||
<core-tooltip id="emptyPlugin" label="Empty Plugin" noarrow>
|
||||
<core-icon icon="visibility-off"></core-icon>
|
||||
</core-tooltip>
|
||||
<core-tooltip id="loadsBSA" label="Loads Archive" noarrow>
|
||||
<core-tooltip id="loadsArchive" label="Loads Archive" noarrow>
|
||||
<core-icon icon="attachment"></core-icon>
|
||||
</core-tooltip>
|
||||
<core-tooltip label="Apply" noarrow>
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
</section>
|
||||
<core-list id="pluginCardList" flex>
|
||||
<template>
|
||||
<loot-plugin-card data="{{model}}" id="{{model.id}}" data-active="{{model.isActive}}" data-empty="{{model.isEmpty}}" data-bsa="{{model.loadsBSA}}" data-master="{{model.isMaster}}">
|
||||
<loot-plugin-card data="{{model}}" id="{{model.id}}" data-active="{{model.isActive}}" data-empty="{{model.isEmpty}}" data-archive="{{model.loadsArchive}}" data-master="{{model.isMaster}}">
|
||||
<h1>{{model.name}}</h1>
|
||||
<span class="version">{{model.version}}</span>
|
||||
<span class="crc">{{model.computed.crc}}</span>
|
||||
|
||||
@@ -301,7 +301,7 @@ function onCopyContent(evt) {
|
||||
version: plugin.version,
|
||||
isActive: plugin.isActive,
|
||||
isEmpty: plugin.isEmpty,
|
||||
loadsBSA: plugin.loadsBSA,
|
||||
loadsArchive: plugin.loadsArchive,
|
||||
|
||||
modPriority: plugin.modPriority,
|
||||
isGlobalPriority: plugin.isGlobalPriority,
|
||||
@@ -652,7 +652,7 @@ function onContentRefresh(evt) {
|
||||
|
||||
loot.game.plugins[i].isActive = plugin.isActive;
|
||||
loot.game.plugins[i].isEmpty = plugin.isEmpty;
|
||||
loot.game.plugins[i].loadsBSA = plugin.loadsBSA;
|
||||
loot.game.plugins[i].loadsArchive = plugin.loadsArchive;
|
||||
loot.game.plugins[i].crc = plugin.crc;
|
||||
loot.game.plugins[i].version = plugin.version;
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
pluginCard.getElementById('activeTick').setAttribute('label', l10n.translate("Active Plugin").fetch());
|
||||
pluginCard.getElementById('isMaster').setAttribute('label', l10n.translate("Master File").fetch());
|
||||
pluginCard.getElementById('emptyPlugin').setAttribute('label', l10n.translate("Empty Plugin").fetch());
|
||||
pluginCard.getElementById('loadsBSA').setAttribute('label', l10n.translate("Loads Archive").fetch());
|
||||
pluginCard.getElementById('loadsArchive').setAttribute('label', l10n.translate("Loads Archive").fetch());
|
||||
pluginCard.getElementById('hasUserEdits').setAttribute('label', l10n.translate("Has User Metadata").fetch());
|
||||
|
||||
pluginCard.getElementById('showOnlyConflicts').previousElementSibling.textContent = l10n.translate("Show Only Conflicts").fetch();
|
||||
@@ -80,7 +80,7 @@
|
||||
pluginEditor.getElementById('activeTick').setAttribute('label', l10n.translate("Active Plugin").fetch());
|
||||
pluginEditor.getElementById('isMaster').setAttribute('label', l10n.translate("Master File").fetch());
|
||||
pluginEditor.getElementById('emptyPlugin').setAttribute('label', l10n.translate("Empty Plugin").fetch());
|
||||
pluginEditor.getElementById('loadsBSA').setAttribute('label', l10n.translate("Loads Archive").fetch());
|
||||
pluginEditor.getElementById('loadsArchive').setAttribute('label', l10n.translate("Loads Archive").fetch());
|
||||
|
||||
pluginEditor.getElementById('enableEdits').previousElementSibling.textContent = l10n.translate("Enable Edits").fetch();
|
||||
pluginEditor.getElementById('globalPriority').parentElement.parentElement.setAttribute('label', l10n.translate("Global priorities are compared against all other plugins. Normal priorities are compared against only conflicting plugins.").fetch());
|
||||
|
||||
@@ -30,7 +30,7 @@ function Plugin(obj) {
|
||||
this.isActive = obj.isActive;
|
||||
this.isEmpty = obj.isEmpty;
|
||||
this.isMaster = obj.isMaster;
|
||||
this.loadsBSA = obj.loadsBSA;
|
||||
this.loadsArchive = obj.loadsArchive;
|
||||
|
||||
this.masterlist = obj.masterlist;
|
||||
this.userlist = obj.userlist;
|
||||
|
||||
@@ -88,10 +88,10 @@ TEST_F(Plugin, ConstructorsAndDataAccess) {
|
||||
EXPECT_EQ(0x832152DC, plugin.Crc());
|
||||
}
|
||||
|
||||
TEST_F(Plugin, LoadsBSA) {
|
||||
EXPECT_FALSE(loot::Plugin(game, "Blank - Different.esm", true).LoadsBSA());
|
||||
EXPECT_FALSE(loot::Plugin(game, "Blank\\.esm", true).LoadsBSA());
|
||||
EXPECT_TRUE(loot::Plugin(game, "Blank.esm", true).LoadsBSA());
|
||||
TEST_F(Plugin, LoadsArchive) {
|
||||
EXPECT_FALSE(loot::Plugin(game, "Blank - Different.esm", true).LoadsArchive());
|
||||
EXPECT_FALSE(loot::Plugin(game, "Blank\\.esm", true).LoadsArchive());
|
||||
EXPECT_TRUE(loot::Plugin(game, "Blank.esm", true).LoadsArchive());
|
||||
}
|
||||
|
||||
TEST_F(Plugin, IsValid) {
|
||||
|
||||
Reference in New Issue
Block a user