update docs for sort
parent
a1f937e354
commit
7261914826
@ -1,33 +1,51 @@
|
|||||||
sort-items
|
sort
|
||||||
==========
|
====
|
||||||
Sort the visible item list::
|
Tags:
|
||||||
|
:dfhack-keybind:`sort-items`
|
||||||
sort-items order [order...]
|
:dfhack-keybind:`sort-units`
|
||||||
|
|
||||||
Sort the item list using the given sequence of comparisons.
|
Sort the visible item or unit list.
|
||||||
The ``<`` prefix for an order makes undefined values sort first.
|
|
||||||
The ``>`` prefix reverses the sort order for defined values.
|
|
||||||
|
|
||||||
Item order examples::
|
Usage::
|
||||||
|
|
||||||
description material wear type quality
|
sort-items <property> [<property> ...]
|
||||||
|
sort-units <property> [<property> ...]
|
||||||
|
|
||||||
The orderings are defined in ``hack/lua/plugins/sort/*.lua``
|
Both commands sort the visible list using the given sequence of comparisons.
|
||||||
|
Each property can be prefixed with a ``<`` or ``>`` character to indicate
|
||||||
|
whether elements that don't have the given property defined go first or last
|
||||||
|
(respectively) in the sorted list.
|
||||||
|
|
||||||
sort-units
|
Examples
|
||||||
==========
|
--------
|
||||||
Sort the visible unit list::
|
|
||||||
|
|
||||||
sort-units order [order...]
|
``sort-items material type quality``
|
||||||
|
Sort a list of items by material, then by type, then by quality
|
||||||
|
``sort-units profession name``
|
||||||
|
Sort a list of units by profession, then by name
|
||||||
|
|
||||||
Sort the unit list using the given sequence of comparisons.
|
Properties
|
||||||
The ``<`` prefix for an order makes undefined values sort first.
|
----------
|
||||||
The ``>`` prefix reverses the sort order for defined values.
|
|
||||||
|
|
||||||
Unit order examples::
|
Items can be sorted by the following properties:
|
||||||
|
|
||||||
name age arrival squad squad_position profession
|
- ``type``
|
||||||
|
- ``description``
|
||||||
|
- ``base_quality``
|
||||||
|
- ``quality``
|
||||||
|
- ``improvement``
|
||||||
|
- ``wear``
|
||||||
|
- ``material``
|
||||||
|
|
||||||
The orderings are defined in ``hack/lua/plugins/sort/*.lua``
|
Units can be sorted by the following properties:
|
||||||
|
|
||||||
:dfhack-keybind:`sort-units`
|
- ``name``
|
||||||
|
- ``age``
|
||||||
|
- ``arrival``
|
||||||
|
- ``noble``
|
||||||
|
- ``profession``
|
||||||
|
- ``profession_class``
|
||||||
|
- ``race``
|
||||||
|
- ``squad``
|
||||||
|
- ``squad_position``
|
||||||
|
- ``happiness``
|
||||||
|
Loading…
Reference in New Issue