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

feat: apply NUTRIENT_OVERRIDE for recipes #3132

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

scarf005
Copy link
Member

Summary

SUMMARY: Mods "Allow recipes to declare NUTRIENT_OVERRIDE flag to ignore components used"

Purpose of change

Describe the solution

added NUTRIENT_OVERRIDE flag check for recipes. it will propagate the flag to items, also ignoring any components.

Describe alternatives you've considered

  • make it a separate flag, e.g NUTRIENT_IGNORE_COMPONENTS to distinguish it with items?
  • do not discard components?

Testing

2023-09-12_13-27-31.mp4
{
  "type": "recipe",
  "result": "carrot",
  "id_suffix": "WithRocks",
  "category": "CC_FOOD",
  "subcategory": "CSC_FOOD_VEGGI",
  "skill_used": "cooking",
  "time": "1 s",
  "result_mult": 1,
  "batch_time_factors": [ 80, 2 ],
  "autolearn": true,
  "components": [ [ [ "rock", 2 ] ] ],
  "flags": ["NUTRIENT_OVERRIDE"]
}

conjured carrot from rock. eating it increased body kcal.

@github-actions github-actions bot added the src changes related to source code. label Sep 12, 2023
@chaosvolt chaosvolt merged commit 24a08bf into cataclysmbnteam:upload Sep 12, 2023
16 checks passed
@scarf005 scarf005 deleted the ignore-components branch September 12, 2023 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Mods] Food recipes with all ingredients lacking calories creates calorie-less food
2 participants