Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
71a1a32
orders: add search overlay for manager orders
pajawojciech Dec 2, 2025
cfaa140
Fix trailing whitespace
pajawojciech Dec 2, 2025
16ab556
Newline at the end
pajawojciech Dec 2, 2025
e368607
orders: load cache reaction map on init
pajawojciech Dec 6, 2025
b46eb7f
Add Enter/Shift+Enter navigation and refactor jump to match
pajawojciech Dec 6, 2025
cde1477
Hide search highlight when filter text changes
pajawojciech Dec 6, 2025
7fa03fb
Use full_interface for OrderHighlightOverlay to prevent repositioning
pajawojciech Dec 6, 2025
c163d3c
Hide highlight when order list changes
pajawojciech Dec 6, 2025
f37e46a
Consolidate onRenderFrame into render method
pajawojciech Dec 6, 2025
506ca40
Use utils.search_text instead of custom search
pajawojciech Dec 6, 2025
7fabf2b
Force new version of overlay position
pajawojciech Dec 6, 2025
2cbf2d7
Narrow search overlay and adjust button positions
pajawojciech Dec 6, 2025
1f2705d
Reshape arrow and contrasting colors
pajawojciech Dec 6, 2025
0650a74
Merge branch 'develop' into orders-search
pajawojciech Dec 6, 2025
93f6b1c
Hide overlay when job_details is open. Add author
pajawojciech Dec 7, 2025
b184150
Merge branch 'orders-search' of github.com:pajawojciech/dfhack into o…
pajawojciech Dec 7, 2025
6bd16ad
Remove trailing spaces
pajawojciech Dec 7, 2025
d8eb61e
Rebuild manager order search results on every navigation to fix stale…
pajawojciech Dec 13, 2025
860a2a1
Consolidate search state variables in OrdersSearchOverlay section to …
pajawojciech Dec 13, 2025
ab257aa
Guard get_order_search_key against nil reaction map and return nil fo…
pajawojciech Dec 13, 2025
3a727a0
Remove unused cached variables from OrderHighlightOverlay init
pajawojciech Dec 13, 2025
d3d7067
Convert OrderHighlightOverlay constants from instance fields to modu…
pajawojciech Dec 13, 2025
2cd1c6e
Use early return guard for search cursor visibility in OrderHighlight…
pajawojciech Dec 13, 2025
d605165
Add unconditional super render call to OrderHighlightOverlay for futu…
pajawojciech Dec 13, 2025
14f46c8
Inline build_reaction_map into get_cached_reaction_map with early ret…
pajawojciech Dec 13, 2025
1bdd533
Free C++ manager_order objects allocated by collect_reactions to prev…
pajawojciech Dec 13, 2025
7aa13f8
Merge branch 'develop' into orders-search
pajawojciech Dec 13, 2025
da543e9
Merge branch 'develop' into orders-search
pajawojciech Dec 17, 2025
c4e84d7
Refactor overlay helper functions to local scope in orders.lua
pajawojciech Dec 17, 2025
c474f75
Remove order name generation from Lua and use DF button trick to get …
pajawojciech Dec 30, 2025
9c9b5fd
Merge branch 'DFHack:develop' into orders-search
pajawojciech Dec 30, 2025
99d0126
Enable orders search overlay by default
pajawojciech Dec 30, 2025
b9c82f6
Move change in changelog to future
pajawojciech Dec 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/about/Authors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ Omniclasm
Ong Ying Gao ong-yinggao98
oorzkws oorzkws
OwnageIsMagic OwnageIsMagic
pajawojciech pajawojciech
palenerd dlmarquis
PassionateAngler PassionateAngler
Patrik Lundell PatrikLundell
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Template for new versions:
## New Tools

## New Features
- `orders`: added search overlay to find and navigate to matching manager orders with arrow indicators

## Fixes

Expand Down
2 changes: 2 additions & 0 deletions library/LuaApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ distribution.
#include "df/job_item.h"
#include "df/job_material_category.h"
#include "df/language_word_table.h"
#include "df/manager_order.h"
#include "df/material.h"
#include "df/map_block.h"
#include "df/nemesis_record.h"
Expand Down Expand Up @@ -2018,6 +2019,7 @@ static const LuaWrapper::FunctionReg dfhack_job_module[] = {
WRAPM(Job,isSuitableItem),
WRAPM(Job,isSuitableMaterial),
WRAPM(Job,getName),
WRAPM(Job,getManagerOrderName),
WRAPM(Job,linkIntoWorld),
WRAPM(Job,removePostings),
WRAPM(Job,disconnectJobItem),
Expand Down
2 changes: 2 additions & 0 deletions library/include/modules/Job.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ namespace df
struct job_item_filter;
struct building;
struct unit;
struct manager_order;
}

namespace DFHack
Expand Down Expand Up @@ -117,6 +118,7 @@ namespace DFHack
int mat_index,
df::item_type itype);
DFHACK_EXPORT std::string getName(df::job *job);
DFHACK_EXPORT std::string getManagerOrderName(df::manager_order *order);

struct JobDeleter {
void operator()(df::job *ptr) const {
Expand Down
27 changes: 27 additions & 0 deletions library/modules/Job.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ distribution.
#include "df/job_list_link.h"
#include "df/job_postingst.h"
#include "df/job_restrictionst.h"
#include "df/manager_order.h"
#include "df/plotinfost.h"
#include "df/specific_ref.h"
#include "df/unit.h"
Expand Down Expand Up @@ -686,3 +687,29 @@ std::string Job::getName(df::job *job)

return desc;
}

std::string Job::getManagerOrderName(df::manager_order *order)
{
CHECK_NULL_POINTER(order);

std::string desc;
auto button = df::allocate<df::interface_button_building_new_jobst>();
button->mstring = order->reaction_name;
button->specdata.hist_figure_id = order->specdata.hist_figure_id;
button->jobtype = order->job_type;
button->itemtype = order->item_type;
button->subtype = order->item_subtype;
button->material = order->mat_type;
button->matgloss = order->mat_index;
button->specflag = order->specflag;
button->job_item_flag = order->material_category;
button->specdata = order->specdata;
button->art_specifier = order->art_spec.type;
button->art_specifier_id1 = order->art_spec.id;
button->art_specifier_id2 = order->art_spec.subid;

button->text(&desc);
delete button;

return desc;
}
Loading