mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Overhaul plugin metadata types' comparison operators
Change their implementations to check full object equality, with case insensitivity for filename strings. The filename case insensitivity doesn't extend to filenames in condition strings, as conditions are compared as strings, but the risk of duplicates due to that is much less than the risk of treating non-duplicate objects as duplicates.
This commit is contained in:
@@ -42,7 +42,9 @@ This structure holds information on which versions of a plugin are dirty or clea
|
||||
Equality
|
||||
--------
|
||||
|
||||
Two cleaning data structures are equal if the values of their ``crc`` keys are identical.
|
||||
Two plugin cleaning data structures are equal if all their fields are equal.
|
||||
`util` field equality is case-sensitive. If the `info` field is a string, it
|
||||
is treated as a localised content data structure.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
@@ -26,7 +26,8 @@ The scalar form is simply the value of the map form's ``name`` key. Using the sc
|
||||
Equality
|
||||
--------
|
||||
|
||||
Two file data structures are equal if the lowercased values of their ``name`` keys are identical.
|
||||
Two file data structures are equal if all their fields are equal. ``name`` field
|
||||
equality is case-insensitive, the other fields use case-sensitive equality.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
@@ -27,3 +27,9 @@ The localised content data structure is a key-value string map.
|
||||
Spanish es
|
||||
Swedish sv
|
||||
==================== =====
|
||||
|
||||
Equality
|
||||
--------
|
||||
|
||||
Two localised content data structures are equal if all their fields are equal.
|
||||
Field equality is case-sensitive.
|
||||
|
||||
@@ -22,7 +22,8 @@ The scalar form is simply the value of the map form's ``link`` key. Using the sc
|
||||
Equality
|
||||
--------
|
||||
|
||||
Two location data structures are equal if the values of their ``link`` keys are identical.
|
||||
Two location data structures are equal if all their fields are equal. Field
|
||||
equality is case-sensitive.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
@@ -57,8 +57,11 @@ If a message's ``content`` value is a string, the message will use the string as
|
||||
Equality
|
||||
--------
|
||||
|
||||
The equality of two message data structures is determined by comparing the values of their ``content`` keys. If a content key is a string, it is treated as a localised content list
|
||||
containing a single English-language string. The two message data structures are then equal if their localised content lists are identical.
|
||||
Two message data structures are equal if their `type`, `content` and `condition`
|
||||
fields are equal, after any `subs` values have been substituted into `content`
|
||||
strings. If the `content` field is a string, it is treated as a localised
|
||||
content list containing a single English-language string. String equality is
|
||||
case sensitive.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
@@ -22,7 +22,8 @@ The scalar form is simply the value of the map form's ``name`` key. Using the sc
|
||||
Equality
|
||||
--------
|
||||
|
||||
Two tag data structures are equal if the values of their ``name`` keys are identical.
|
||||
Two tag data structures are equal if all their fields are equal. String equality
|
||||
is case-sensitive.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Reference in New Issue
Block a user