CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.29k stars 4.12k forks source link

Weight of some items are slightly larger in AIM compared to the examine window #69785

Open CoroNaut opened 10 months ago

CoroNaut commented 10 months ago

Describe the bug

  1. A single "Glock 9x19mm 22-round magazine" reads 0.10 in examine window, but 0.11 in AIM.
  2. 41 "Glock 9x19mm 15-round magazine" reads 0.10 in examine window per 1 magazine (4.10 total), but reads 4.30 in AIM.

Probably a floating point or rounding thing that effects everything equally, or maybe certain items, idk.

Attach save file

N/A trivially reproducible

Steps to reproduce

  1. Get "Glock 9x19mm 22-round magazine" or "Glock 9x19mm 15-round magazine", or presumably other items as well
  2. Notice weight difference in AIM compared to examine window

Expected behavior

Weight calculated correctly

Screenshots

image image

Versions and configuration

Additional context

No response

RenechCDDA commented 9 months ago

Looks like AIM's display is rounding while examine is truncating but I don't immediately see the code responsible for it.

github-actions[bot] commented 8 months ago

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.