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

Change all instances of 'volume' in JSONs to be a metric string II: The Empre Strikes Back #33551

Merged
merged 2 commits into from
Aug 26, 2019

Conversation

ampersand55
Copy link
Contributor

Summary

SUMMARY: Infrastructure "Change all instances of 'volume' in JSONs to be a metric string again"

Purpose of change

An update to #33367.

Describe the solution

I've made a proper JSON parser now which can change all types of keys including subkeys.

Changes 'storage', 'contains', 'min_volume', 'max_volume', 'min_pet_volume', 'integral_volume', 'volume' under the subkeys 'use_action', 'workbench', 'container_data', 'armor_data' to use metric units.

Describe alternatives you've considered

Additional context

The change to the comment key in nuts.json: "//2" is to prevent duplicate keys being removed when converting from json to javascript object.

The change in fragment mass from 2.0 to 2 is also due to javascript object conversion. Javascript only has one number type and doesn't distinguish between ints and floats. I assume this doesn't cause any problems.

@ZhilkinSerg ZhilkinSerg added [JSON] Changes (can be) made in JSON Items / Item Actions / Item Qualities Items and how they work and interact labels Aug 26, 2019
@ZhilkinSerg ZhilkinSerg merged commit dbdebf7 into CleverRaven:master Aug 26, 2019
misterprimus pushed a commit to misterprimus/Cataclysm-DDA that referenced this pull request Sep 21, 2019
@ampersand55 ampersand55 deleted the change_volume_to_metric2 branch August 22, 2023 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Items / Item Actions / Item Qualities Items and how they work and interact [JSON] Changes (can be) made in JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants