Update name, volume, and weight json members to newer format #35857
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Content "Update name, volume, and weight json members to newer format: bird, fish, defense_bot, drone"
Purpose of change
The prupose of this is to start to move name, volume, and weight json members to use the newer format.
For name, this is the translation object { "str": string, "str_pl": string } that can also have context.
For volume and weight, this is enforcing using the strings over raw integers (perhaps in order to deprecate reading the numbers from json entirely later on, so that it's truly enforced) And also using larger units where appropriate for readability (like "1 kg" instead of "1000 g")
Describe alternatives you've considered
Keep the inconsistencies i guess?
Testing
For each of the 4 json files, I made the edits and then spawned in 2-3 of the monsters that were in that file, then murdering them and checking their corpse size. For the robots, I think this type of test probably doesn't work, but i'm not sure how to check the volume of a monster in-game otherwise. The game loaded with no json errors and their names were correct as well.
Additional context
I sort of came upon this inconsistency writing another app that reads cdda's json. I didn't really see a reason for this particular inconsistency, and it likely stems from introducing a new way of reading the values from json without updating all of the json entries to suit. It should be a pretty low-impact change, due to the actual values not changing, just changing how they appear in json.