diff options
| author | jj | 2012-07-05 16:17:41 +0200 |
|---|---|---|
| committer | jj | 2012-07-05 16:17:41 +0200 |
| commit | 70740481463bbde3f078b612e529e6c7a3b6704d (patch) | |
| tree | 70972302366a3fe324429ced7c0f83407acc5e53 /plugins/showmood.cpp | |
| parent | 7732901b6ec1af9ed5e77a118bade7285da3e018 (diff) | |
| download | dfhack-70740481463bbde3f078b612e529e6c7a3b6704d.tar.gz dfhack-70740481463bbde3f078b612e529e6c7a3b6704d.tar.bz2 dfhack-70740481463bbde3f078b612e529e6c7a3b6704d.tar.xz | |
showmood: display number of items already collected
Diffstat (limited to 'plugins/showmood.cpp')
| -rw-r--r-- | plugins/showmood.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/showmood.cpp b/plugins/showmood.cpp index 7926e2ac..10d7b52c 100644 --- a/plugins/showmood.cpp +++ b/plugins/showmood.cpp @@ -165,6 +165,8 @@ command_result df_showmood (color_ostream &out, vector <string> & parameters) out.print("not yet claimed a workshop but will want"); out.print(" the following items:\n"); + int count_got = job->items.size(), got; + for (size_t i = 0; i < job->job_items.size(); i++) { df::job_item *item = job->job_items[i]; @@ -267,7 +269,11 @@ command_result df_showmood (color_ostream &out, vector <string> & parameters) } } - out.print(", quantity %i\n", item->quantity); + got = count_got; + if (got > item->quantity) + got = item->quantity; + out.print(", quantity %i (got %i)\n", item->quantity, got); + count_got -= got; } } if (!found) |
