mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Remove plugin priorities
This commit is contained in:
@@ -75,9 +75,6 @@ Classes
|
||||
.. doxygenclass:: loot::PluginMetadata
|
||||
:members:
|
||||
|
||||
.. doxygenclass:: loot::Priority
|
||||
:members:
|
||||
|
||||
.. doxygenclass:: loot::Tag
|
||||
:members:
|
||||
|
||||
|
||||
@@ -52,31 +52,6 @@ the group-derived plugin to the plugin would cause a cycle, and if not the edge
|
||||
is recorded. Once all potential edges have been checked, the recorded edges are
|
||||
added to the graph.
|
||||
|
||||
At this point, all explicit interdependencies have been graphed. Plugin priority
|
||||
metadata values must now be propagated down the dependency trees to ensure that
|
||||
priority edges are added correctly later in the process. To do this:
|
||||
|
||||
1. Create a list of all vertices with a global or non-global priority value
|
||||
greater than zero.
|
||||
2. Sort the list in order of decreasing priority value.
|
||||
3. For each vertex, perform a depth-first search, setting priorities at each
|
||||
vertex visited until equal or larger values are encountered.
|
||||
|
||||
Now that the priorities have been propagated, the priority edges can be added.
|
||||
For each plugin, if it has a global priority value of zero, overrides no records
|
||||
and loads no archive, skip it, otherwise iterate over all other plugins and:
|
||||
|
||||
* If the other plugin's global and non-global priority values equal the
|
||||
plugin's own values, or if both plugins have a global priority of zero and
|
||||
have no FormIDs in common, skip the other plugin.
|
||||
* Otherwise, add an edge from the plugin with lower global priority to the
|
||||
plugin with higher global priority, if that edge does not cause a cycle. A
|
||||
cycle is caused if a circular dependency is introduced, for example for two
|
||||
vertices A and B, A -> B -> A is a cycle.
|
||||
|
||||
If the global priorities are equal, compare the non-global priorities
|
||||
instead.
|
||||
|
||||
Plugin overlap edges are then added. Two plugins overlap if they contain the
|
||||
same FormID, i.e. if they both edit the same record or if one edits a record the
|
||||
other plugin adds.
|
||||
|
||||
@@ -53,24 +53,6 @@ This is the structure that brings all the others together, and forms the main co
|
||||
dependency when combined in isolation with the third rule, but having all
|
||||
three rules applied causes a cycle.
|
||||
|
||||
.. describe:: priority
|
||||
|
||||
``integer``
|
||||
|
||||
Modifies plugin position relative to others that change one or more of the same records, but which are otherwise unrelated (ie. neither plugin lists the other as a master, requirement, or in its ``after`` list). Plugins that don't change any of the same records are not compared, unless one of the plugins contains only a header record.
|
||||
|
||||
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 ``-127`` to ``127`` inclusive, and if unspecified defaults to ``0``.
|
||||
|
||||
.. describe:: global_priority
|
||||
|
||||
``integer``
|
||||
|
||||
Modifies plugin position relative to all unrelated plugins (ie. neither plugin lists the other as a master, requirement, or in its ``after`` list).
|
||||
|
||||
A plugin with a higher ``global_priority`` value will load after a plugin with a lower priority value. The value can be anything in the range ``-127`` to ``127`` inclusive, and if unspecified defaults to ``0``.
|
||||
|
||||
``global_priority`` takes precedence over ``priority`` when comparing two plugins' priorities: the ``priority`` value is only compared if the two plugins have the same ``global_priority`` value.
|
||||
|
||||
.. describe:: after
|
||||
|
||||
``file set``
|
||||
@@ -138,8 +120,6 @@ Key Merge Behaviour (merging B into A)
|
||||
name Not merged.
|
||||
enabled Replaced by B's value.
|
||||
group Replaced by B's value.
|
||||
priority Replaced by B's value, unless that value is ``0`` and it was not explicitly set.
|
||||
global_priority Replaced by B's value, unless that value is ``0`` and it was not explicitly set.
|
||||
after Merged. If B's file set contains an item that is equal to one already present in A's file set, B's item is discarded.
|
||||
req Merged. If B's file set contains an item that is equal to one already present in A's file set, B's item is discarded.
|
||||
inc Merged. If B's file set contains an item that is equal to one already present in A's file set, B's item is discarded.
|
||||
|
||||
Reference in New Issue
Block a user