remove old code for search plugin (now part of sort)

develop
Myk Taylor 2023-11-01 23:56:56 -07:00
parent a2735125bc
commit a6ce29d209
No known key found for this signature in database
8 changed files with 12 additions and 2626 deletions

@ -78,8 +78,7 @@ def write_tool_docs():
os.makedirs(os.path.join('docs/tools', os.path.dirname(k[0])), os.makedirs(os.path.join('docs/tools', os.path.dirname(k[0])),
mode=0o755, exist_ok=True) mode=0o755, exist_ok=True)
with write_file_if_changed('docs/tools/{}.rst'.format(k[0])) as outfile: with write_file_if_changed('docs/tools/{}.rst'.format(k[0])) as outfile:
if k[0] != 'search': outfile.write(label)
outfile.write(label)
outfile.write(include) outfile.write(include)

@ -220,6 +220,12 @@ ruby
Support for the Ruby language in DFHack scripts was removed due to the issues Support for the Ruby language in DFHack scripts was removed due to the issues
the Ruby library causes when used as an embedded language. the Ruby library causes when used as an embedded language.
.. _search-plugin:
search
======
Functionality was merged into `sort`.
.. _show-unit-syndromes: .. _show-unit-syndromes:
show-unit-syndromes show-unit-syndromes

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

@ -1,52 +0,0 @@
.. _search-plugin:
search
======
.. dfhack-tool::
:summary: Adds search capabilities to the UI.
:tags: unavailable
:no-command:
Search options are added to the Stocks, Animals, Trading, Stockpile, Noble
assignment candidates), Military (position candidates), Burrows (unit list),
Rooms, Announcements, Job List, and Unit List screens all get hotkeys that allow
you to dynamically filter the displayed lists.
Usage
-----
::
enable search
.. image:: ../images/search.png
Searching works the same way as the search option in :guilabel:`Move to Depot`.
You will see the Search option displayed on screen with a hotkey
(usually :kbd:`s`). Pressing it lets you start typing a query and the relevant
list will start filtering automatically.
Pressing :kbd:`Enter`, :kbd:`Esc` or the arrow keys will return you to browsing
the now filtered list, which still functions as normal. You can clear the filter
by either going back into search mode and backspacing to delete it, or pressing
the "shifted" version of the search hotkey while browsing the list (e.g. if the
hotkey is :kbd:`s`, then hitting :kbd:`Shift`:kbd:`s` will clear any filter).
Leaving any screen automatically clears the filter.
In the Trade screen, the actual trade will always only act on items that are
actually visible in the list; the same effect applies to the Trade Value numbers
displayed by the screen. Because of this, the :kbd:`t` key is blocked while
search is active, so you have to reset the filters first. Pressing
:kbd:`Alt`:kbd:`C` will clear both search strings.
In the stockpile screen the option only appears if the cursor is in the
rightmost list:
.. image:: ../images/search-stockpile.png
Note that the 'Permit XXX'/'Forbid XXX' keys conveniently operate only on items
actually shown in the rightmost list, so it is possible to select only fat or
tallow by forbidding fats, then searching for fat/tallow, and using Permit Fats
again while the list is filtered.

@ -6,10 +6,12 @@ sort
:tags: fort productivity interface :tags: fort productivity interface
:no-command: :no-command:
The ``sort`` tool provides overlays that sorting and searching options for The ``sort`` tool provides search and sort functionality for lists displayed in
lists displayed in the DF interface. the DF interface.
Searching and sorting functionality is provided by `overlay` widgets, and widgets for individual lists can be moved via `gui/overlay` or turned on or off via `gui/control-panel`. Searching and sorting functionality is provided by `overlay` widgets, and
widgets for individual lists can be moved via `gui/overlay` or turned on or off
via `gui/control-panel`.
Squad assignment overlay Squad assignment overlay
------------------------ ------------------------

@ -153,7 +153,6 @@ if(BUILD_SUPPORTED)
#dfhack_plugin(rename rename.cpp LINK_LIBRARIES lua PROTOBUFS rename) #dfhack_plugin(rename rename.cpp LINK_LIBRARIES lua PROTOBUFS rename)
#add_subdirectory(rendermax) #add_subdirectory(rendermax)
dfhack_plugin(reveal reveal.cpp LINK_LIBRARIES lua) dfhack_plugin(reveal reveal.cpp LINK_LIBRARIES lua)
#dfhack_plugin(search search.cpp)
dfhack_plugin(seedwatch seedwatch.cpp LINK_LIBRARIES lua) dfhack_plugin(seedwatch seedwatch.cpp LINK_LIBRARIES lua)
dfhack_plugin(showmood showmood.cpp) dfhack_plugin(showmood showmood.cpp)
#dfhack_plugin(siege-engine siege-engine.cpp LINK_LIBRARIES lua) #dfhack_plugin(siege-engine siege-engine.cpp LINK_LIBRARIES lua)

File diff suppressed because it is too large Load Diff