diff --git a/docs/changelog.txt b/docs/changelog.txt index be0b51c69e..5983e2cc2e 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -63,6 +63,7 @@ Template for new versions: - `stocks`: the overlay's ``collapse all`` hotkey now toggles, expanding all categories again when everything is collapsed ## Fixes +- `showmood`: bars, cloth, and thread accurately report they need 1 item instead of 3, due to material sizes. - Fix broken weather lookup in ``World::ReadCurrentWeather`` - Fixed a possible hang or assertion failure when pressing a hotkey while a DFHack GUI window was open but unfocused - In ``Screen`` module, Fix out-of-bounds color table access when Lua pens use ``COLOR_RESET`` diff --git a/plugins/showmood.cpp b/plugins/showmood.cpp index 977c767aeb..4ffdb3907f 100644 --- a/plugins/showmood.cpp +++ b/plugins/showmood.cpp @@ -277,12 +277,15 @@ command_result df_showmood (color_ostream &out, vector & parameters) divisor = 150; else if (item->item_type == item_type::CLOTH) divisor = 10000; + else if (item->item_type == item_type::THREAD) + divisor = 15000; for (size_t j = 0; j < job->items.size(); j++) { if (job->items[j]->job_item_idx == int32_t(i)) count_got += 1; } - out.print(", got {} of {}\n", count_got, - item->quantity < divisor ? item->quantity : item->quantity/divisor); + // quantity requested is in raw units (150 to a bar, 10000 to a bolt) + int needed = (item->quantity + divisor - 1) / divisor; + out.print(", got {} of {}\n", count_got, needed); } } }