Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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``
Expand Down
7 changes: 5 additions & 2 deletions plugins/showmood.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,15 @@ command_result df_showmood (color_ostream &out, vector <string> & 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);
}
}
}
Expand Down