A switchblade (vol .05L, weight .22 lb, length 5 in.) can not fit inside
Army Pants (2 pockets, vol .7L, weight 6.6lb, max length 5 in.)
Be naked. Wear army pants. Pickup switchblade.
Switchblade should fit inside one of the two pockets having length up to 5 in.
I noticed this issue when making #42117 it seems if item length = maximum length the item wont fit. Still testing more items to see if this is indeed the case myself. Edits to this will be tested items I have sitting around.
Jeans can hold a Swiss army knife and their numbers match.
Kel-Tec PF9 can not fit in jean jacket (inches both are 5, and volume/weight are both well under jacket maximum)
Purse can hold a combat knife, both 11 inches.
FN five seven can not fit inside leather duster, both 6in, volume and weight under maximum.
Bone Shiv can not fit in a hoodie, both being 7in for length.
The jeans fitting a Swiss army knife, and purse fitting a combat knife with matching item length brings up a new question, whats different on the items that can and cant fit really?
\src\item_pocket.cpp line 999 ?
after more consideration, I would guess this problem is related to rounding. the length value shown in the UI seems to be derived from old json values, if max_item_length is not defined
I can't put my trench knife in my kimono.
the display shows 5 inches but it's saved in millimeters. it's probably a length thing.
Sure! But even when showing both in the same measure scale one is shown in centimeters and the other in milimeters what is prone to confusion. Is it possible to always shows both in the same measure unit?

switching interface -> distance units from imperial to metric revealed the issue
switchblade length is 15cm (150mm)
army pants largest pocket max length is 127mm
it is worth noting that a 150mm (5.9 inch) object is rounding down to "5 inches" in the UI
Is it possible to always shows both in the same measure unit?
no, not really. the ui doesn't know what you're looking at, it just tries to show lengths in the largest possible unit. metric conversions to other metric units are confusing?
switching to metric even showed the issue with the bone shiv and hoodie - bone shiv as its description also says is 20cm (7.8in), but the hoodie can only handle 18.3cm (7.2in) so a good fix for this situation on items that don't fit could be simply round them to the next higher inch. or simplify their metric number a tiny bit.
Perhaps we should round up for lengths and round down for pocket sizes.
How difficult would it be to make inches no longer a thing in the code base and simply a ratio to mm, then you can display X.X inches?
How difficult would it be to make inches no longer a thing in the code base and simply a ratio to mm, then you can display X.X inches?
That's already the case. It would just be a display change.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not \'bump\' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.
This issue has been automatically closed due to lack of activity. This does not mean that we do not value the issue. Feel free to request that it be re-opened if you are going to actively work on it
Most helpful comment
Perhaps we should round up for lengths and round down for pocket sizes.