Add a "detail" property to File objects

This property can be used to provide detail about a requirement or
incompatibility that can be displayed in the error message displayed
for the file (if one is displayed).
This commit is contained in:
Oliver Hamlet
2021-05-22 19:26:29 +01:00
parent 4f75be3d81
commit fc22d3d7a4
5 changed files with 280 additions and 29 deletions
+10
View File
@@ -14,6 +14,16 @@ Map Form
A GitHub Flavored Markdown string, to be displayed instead of the file path in any generated messages, eg. the name of the mod the file belongs to.
.. describe:: detail
``string`` or ``localised content list``
if this file causes an error message to be displayed (e.g. because it's a
missing requirement), this detail message content will be appended to that
error message. If a string is provided, it will be interpreted as GitHub
Flavored Markdown. If a localised content list is provided, one of the
structures must be for English. If undefined, defaults to an empty string.
.. describe:: condition
A condition string that is evaluated to determine whether this file data should be used: if it evaluates to true, the data is used, otherwise it is ignored. See :doc:`../conditions` for details.