Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect weight items with charges #56131

Closed
Croisis opened this issue Mar 16, 2022 · 0 comments · Fixed by #56162
Closed

Incorrect weight items with charges #56131

Croisis opened this issue Mar 16, 2022 · 0 comments · Fixed by #56162
Labels
Good First Issue This is a good first issue for a new contributor Items / Item Actions / Item Qualities Items and how they work and interact

Comments

@Croisis
Copy link
Contributor

Croisis commented Mar 16, 2022

Describe the bug

Some of the items with defined charges have weight assumed per the whole batch, not per charge in JSON as they should.
These are the ones I found so far:

"id": "liquid_soap", "volume": "250 ml", "weight": "260 g", "count": 5
Most visible issue because it causes the liquid soap to hit the weight limit for containers way before their volume limit.

"id": "conc_venom", "volume": "5 ml", "weight": "5 g", "count": 10

"id": "propane", "volume": "200ml", "weight": "375 g", "count": 30

"id": "aluminum_foil", "volume": "10 ml", "weight": "4 g", "count": 200

"id": "coal_lump", "volume": "250 ml", "weight": "44 g", "count": 250
This is probably wrong either way as solid coal should have a density somewhere between 1.35 and 1.5 g/cm3 (i.e. https://www.answers.com/Q/What_is_the_density_of_coal)

"id": "pouch_autoclave", "volume": "1 ml", "weight": "2 g", "count": 25

"id": "polycarbonate_sheet", "volume": "500 ml", "weight": "250 g", count": 20

Steps to reproduce

Check json data:
cdda\data\json\items\chemicals_and_resources.json
cdda\data\json\items\fuel.json
cdda\data\json\items\ammo.json
cdda\data\json\items\generic.json
cdda\data\json\items\resources\plastic.json

Expected behavior

Weights for the listed items should be set per charge, not per batch.

Screenshots

No response

Versions and configuration

build number: 2022-03-11-0559

Additional context

No response

Croisis added a commit to Croisis/Cataclysm-DDA that referenced this issue Mar 17, 2022
@Maleclypse Maleclypse added Good First Issue This is a good first issue for a new contributor Items / Item Actions / Item Qualities Items and how they work and interact labels Mar 17, 2022
ZhilkinSerg added a commit that referenced this issue Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue This is a good first issue for a new contributor Items / Item Actions / Item Qualities Items and how they work and interact
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants