Skip to content

Commit a2220ff

Browse files
authored
Merge pull request #5721 from pajawojciech/orders-export-name
Include name in orders export
2 parents 7935ac8 + 0f0fa85 commit a2220ff

3 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎docs/changelog.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ Template for new versions:
259259

260260
## New Features
261261
- `orders`: added search overlay to find and navigate to matching manager orders with arrow indicators
262+
- `orders`: exported orders now include a human-readable ``name`` field
262263
- `sort`: added ``Uniformed`` filter to squad assignment screen to filter dwarves with mining, woodcutting, or hunting labors
263264
- `sort`: Add death cause button to dead/missing tab in the creatures screen
264265

‎plugins/orders.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "PluginManager.h"
55

66
#include "modules/Filesystem.h"
7+
#include "modules/Job.h"
78
#include "modules/Materials.h"
89
#include "modules/World.h"
910

@@ -383,6 +384,7 @@ static command_result orders_export_command(color_ostream & out, const std::stri
383384
order["art"] = art;
384385
}
385386

387+
order["name"] = Job::getManagerOrderName(it);
386388
order["amount_left"] = it->amount_left;
387389
order["amount_total"] = it->amount_total;
388390
order["is_validated"] = bool(it->status.bits.validated);

‎test/plugins/orders.lua‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ function test.import_export_reaction_condition()
190190
}
191191
],
192192
"job" : "CustomReaction",
193+
"name" : "Make soap from tallow",
193194
"reaction" : "MAKE_SOAP_FROM_TALLOW"
194195
}
195196
]

0 commit comments

Comments
 (0)