Skip to content

Commit

Permalink
Merge pull request #76999 from TheMurderUnicorn/Milling
Browse files Browse the repository at this point in the history
Resolve Milling Issues/Errors
  • Loading branch information
Night-Pryanik authored Nov 18, 2024
2 parents a23c67e + c7e3212 commit de11116
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 1 deletion.
54 changes: 54 additions & 0 deletions data/json/recipes/food/milling.json
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,60 @@
"components": [ [ [ "bone_edible", 1, "LIST" ] ] ],
"charges": 4
},
{
"//": "For use by mills, so the only entries used are the charges and components.",
"//1": "Note that there should only be a single component with no extras such as lubricants, etc.",
"result": "meal_bone",
"type": "recipe",
"activity_level": "NO_EXERCISE",
"id_suffix": "mill_20_1",
"category": "CC_FOOD",
"subcategory": "CSC_FOOD_OTHER",
"skill_used": "cooking",
"difficulty": 2,
"charges": 1,
"time": "0 s",
"autolearn": false,
"flags": [ "SECRET" ],
"tools": [ ],
"components": [ [ [ "skull_rodent", 20 ] ] ]
},
{
"//": "For use by mills, so the only entries used are the charges and components.",
"//1": "Note that there should only be a single component with no extras such as lubricants, etc.",
"result": "meal_bone",
"type": "recipe",
"activity_level": "NO_EXERCISE",
"id_suffix": "mill_2_1",
"category": "CC_FOOD",
"subcategory": "CSC_FOOD_OTHER",
"skill_used": "cooking",
"difficulty": 2,
"charges": 1,
"time": "0 s",
"autolearn": false,
"flags": [ "SECRET" ],
"tools": [ ],
"components": [ [ [ "skull_small", 2, "LIST" ] ] ]
},
{
"//": "For use by mills, so the only entries used are the charges and components.",
"//1": "Note that there should only be a single component with no extras such as lubricants, etc.",
"result": "meal_bone",
"type": "recipe",
"activity_level": "NO_EXERCISE",
"id_suffix": "mill_1_1",
"category": "CC_FOOD",
"subcategory": "CSC_FOOD_OTHER",
"skill_used": "cooking",
"difficulty": 2,
"charges": 1,
"time": "0 s",
"autolearn": false,
"flags": [ "SECRET" ],
"tools": [ ],
"components": [ [ [ "skull_medium", 1, "LIST" ] ] ]
},
{
"//": "For use by mills, so the only entries used are the charges and components.",
"//1": "Note that there should only be a single component with no extras such as lubricants, etc.",
Expand Down
12 changes: 12 additions & 0 deletions data/json/requirements/materials.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@
"//": "Any kind of bone meal, edible or not. May possibly be poisonous to eat.",
"components": [ [ [ "meal_bone", 1 ], [ "meal_bone_tainted", 1 ] ] ]
},
{
"id": "skull_small",
"type": "requirement",
"//": "Small skulls",
"components": [ [ [ "skull_feline_small", 1 ], [ "skull_canis_small", 1 ], [ "skull_opossum", 1 ], [ "skull_skunk", 1 ] ] ]
},
{
"id": "skull_medium",
"type": "requirement",
"//": "Medium skulls",
"components": [ [ [ "skull_feline_medium", 1 ], [ "skull_canis_medium", 1 ], [ "skull_raccoon", 1 ], [ "skull_rabbit", 1 ] ] ]
},
{
"id": "copper_scrap_equivalent",
"type": "requirement",
Expand Down
3 changes: 2 additions & 1 deletion tests/comestible_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,9 @@ TEST_CASE( "recipe_permutations", "[recipe]" )
const recipe &recipe_obj = recipe_pair.first.obj();
item temp( recipe_obj.result() );
const bool is_food = temp.is_food();
const bool should_make_sense = temp.made_of_any_food_components();
const bool has_override = temp.has_flag( STATIC( flag_id( "NUTRIENT_OVERRIDE" ) ) );
if( is_food && !has_override ) {
if( is_food && should_make_sense && !has_override ) {
// Collection of kcal values of all ingredient permutations
all_stats mystats = recipe_permutations( recipe_obj.simple_requirements().get_components(),
byproduct_calories( recipe_obj ) );
Expand Down

0 comments on commit de11116

Please sign in to comment.