-
Notifications
You must be signed in to change notification settings - Fork 279
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
feat(content, port): Port vitamin-based allergies and cannibalism from DDA #5808
feat(content, port): Port vitamin-based allergies and cannibalism from DDA #5808
Conversation
Co-Authored-By: RenechCDDA <84619419+RenechCDDA@users.noreply.github.com>
Co-Authored-By: Anton Simakov <67688115+GuardianDll@users.noreply.github.com>
Co-Authored-By: Antti Riikonen <2456481+harakka@users.noreply.github.com>
Oops, didn't realize that the script for the other vitamins didn't include cannibalism Co-Authored-By: RenechCDDA <84619419+RenechCDDA@users.noreply.github.com>
Co-Authored-By: Antti Riikonen <2456481+harakka@users.noreply.github.com>
Enforces the idea that materials should always be in arrays even if there's only one, specifically for the food-related materials. This is necessary for the vitamins script to work correctly. Also does that 2nd pass of the vitamins script Co-Authored-By: Antti Riikonen <2456481+harakka@users.noreply.github.com>
The DDA script apparently just didn't touch nuts?
We don't even HAVE bread material!
To appease the scarf
Autofix has formatted code style violation in this PR. I edit commits locally (e.g: git, github desktop) and want to keep autofix
I do not want the automated commit
If you don't do this, your following commits will be based on the old commit, and cause MERGE CONFLICT. |
Thank you Tree of formatting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine, it seems to work. But This needs more reviewers. It's 2000 lines.
I'm looking at the changes to the If it does, I'll need to suggest some changes to the cpp to use assigns or something to maintain the old method of defining materials, otherwise this will require a lot of tedious rewriting of JSONs for no reason in every mod available to BN.
Edit: I've been told the changes are purely JSON side and are necessary for a script to add nutrients to food. As this doesn't change how the game loads cpp older 1-entry material definitions will still function so I'm good with it. |
I think this is safe to merge. Kheir and Scarf have both looked at it somewhat, it's been compile tested a few times. We can fix anything missed later in post. |
Checklist
Required
main
so it won't cause conflict when updatingmain
branch later.Optional
Co-Authored-By
in the commit message.Purpose of change
Fixes #5613 and many requests for them to be ported by porting the following DDA PRs:
Cannibalism checks as a vitamin
Vitamin-based allergy
This should greatly improve user experience for anyone with traits regarding dietary restrictions, and also in theory allows us to cut back on any bloated food variants that are just about providing options for certain dietary restrictions.
Describe the solution
Describe alternatives you've considered
Also, this way I don't have to learn typescript or make an entirely new python script for thisTesting
enum class
so that we don't have namespace collision with vitamins.h VITAMIN), and it indeed behaves appropriately with dietary restrictions!Herbivores can't eat meat:
Carnivores can't eat veggies:
It works without Simplified Nutrition:
Additional context
Basic documentation added at request of Scarf
Haven't tested Cannibalism yet, but I assume it works