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

Refactor profession item substitution: #36520

Merged
merged 1 commit into from
Dec 30, 2019
Merged

Conversation

BevapDin
Copy link
Contributor

SUMMARY: None

Changes JSON arrays into objects as they give their "elements" names, which makes the whole structure much easier to read.

This is especially visible with traits that must be there and traits that must not be there:

"sub": [ [ [ "ANTIWHEAT" ], [ "MEATARIAN" ], "cornbread" ], [ [ "ANTIWHEAT", "MEATARIAN" ], "meat_cooked", 0.72 ] ]

This defines a replacement to "cornbread" when "ANTIWHEAT" is present and "MEATARIAN" is absent. Can anybody guess that just be looking at the JSON data?


Removed the main "substitution" array. Instead each entry of that array is now a top level entry.


Added documentation.

Changes arrays into JSON objects as they give their "elements" names, which makes the whole structure much easier to read.

This is especially visible with traits that must be there and traits that must not be there:
```
"sub": [ [ [ "ANTIWHEAT" ], [ "MEATARIAN" ], "cornbread" ], [ [ "ANTIWHEAT", "MEATARIAN" ], "meat_cooked", 0.72 ] ]
```
This defines a replacement to "cornbread" when "ANTIWHEAT" is present and "MEATARIAN" is absent. Can anybody guess that just be looking at the JSON data?

----

Removed the main "substitution" array. Instead each entry of that array is now a top level entry.

----

Added documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants