Change syntax requirements for regex plugins.

Make it so that their entries can't contain dirty metadata, as it's not
clear (to a reader) to which plugin the metadata applies. Also minor
typo fix.
This commit is contained in:
Oliver Hamlet
2015-01-04 17:09:10 +00:00
parent 3559f894f4
commit b466c712d9
2 changed files with 8 additions and 4 deletions
+2 -2
View File
@@ -432,14 +432,14 @@ nav: 0
<li>One of the plugins has a priority greater than or equal to 1,000,000. In this case, only the modulo (ie. remainder when divided) with 1,000,000 is used when comparing plugin priority values &ndash; the rest is only used to signify that the plugin should be compared against all others.
</ul>
<p>For example, <code>priority: 153000352</code> and <code>priority: 352</code> have equal values when compared, but a plugin with the first priority will be compared against all others, while a (non-empty) plugin with the second priority will be compared against only those it conflicts with.
<p>A plugin with a higher priority value will load after a plugin with a lower priority value. Value can be anything in the range <code>-2000000000</code> to <code>2000000000</code>, and if unspecified defaults to <code>0</code>.
<p>A plugin with a higher priority value will load after a plugin with a lower priority value. The value can be anything in the range <code>-2000000000</code> to <code>2000000000</code>, and if unspecified defaults to <code>0</code>.
<tr><td><code>after</code><td>file list<td>&#x2717;<td>An unordered list of plugins that this plugin must load after, but which are not dependencies. Used for resolving specific compatibility issues and by user rules for specifying custom plugin positions.
<tr><td><code>req</code><td>file list<td>&#x2717;<td>An unordered list of files that this plugin requires to be present. This plugin will load after any plugins listed. If any of these files are missing, an error message will be displayed. Intended for use specifying implicit dependencies, as LOOT will detect a plugin's explicit masters itself.
<tr><td><code>inc</code><td>file list<td>&#x2717;<td>An unordered list of files that this plugin is incompatible with. If any of these files are present, an error message will be displayed.
<tr><td><code>msg</code><td>message list<td>&#x2717;<td>The messages attached to this plugin. The messages will be displayed in the order that they are listed.
<tr><td><code>tag</code><td>tag list<td>&#x2717;<td>An unordered list of Bash Tags suggested for this plugin. If a Bash Tag is suggested for both addition and removal, the latter will override the former when the list is evaluated.
<tr><td><code>url</code><td>location list<td>&#x2717;<td>An unordered list of locations for this plugin. If the same version can be found at multiple locations, only one location should be recorded. This metadata is not currently used by LOOT.
<tr><td><code>dirty</code><td>dirty info list<td>&#x2717;<td>An unordered list of dirty info structures for this plugin.
<tr><td><code>dirty</code><td>dirty info list<td>&#x2717;<td>An unordered list of dirty info structures for this plugin. Plugin entries with regular expression filenames <strong>must not</strong> contain dirty info.
</table>
<p><strong>Each plugin must have only one matching non-regex entry.</strong> If multiple non-regex entries exist with the same <code>name</code> value, all but the first will be ignored. A plugin may match any number of regex entries though, and their metadata will be merged, with later entries being merged into earlier entries as detailed in the table below. Merging only takes place if both entries have their <code>enabled</code> value set to <code>true</code> (which is the default if unspecified).
+6 -2
View File
@@ -432,8 +432,12 @@ namespace YAML {
rhs.Messages(node["msg"].as< std::list<loot::Message> >());
if (node["tag"])
rhs.Tags(node["tag"].as< std::set<loot::Tag> >());
if (node["dirty"])
rhs.DirtyInfo(node["dirty"].as< std::set<loot::PluginDirtyInfo> >());
if (node["dirty"]) {
if (rhs.IsRegexPlugin())
return false;
else
rhs.DirtyInfo(node["dirty"].as< std::set<loot::PluginDirtyInfo> >());
}
if (node["url"])
rhs.Locations(node["url"].as< std::set<loot::Location> >());