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

Quickfix for sweetbread missing from offal_raw #1916

Merged
merged 7 commits into from
Nov 19, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Suggestions per feedback
* Reverted the change to how much sweetbread is used, because the test that the original commit is less CBT to try and fix.
* Per Coolthulhu's suggestion on the discord, adjusted how comestible_test.cpp works to make the range more forgiving.
  • Loading branch information
chaosvolt committed Oct 27, 2022
commit f1125573919bfd246a3ec7fb1ce363a866d357ed
2 changes: 1 addition & 1 deletion data/json/requirements/cooking_components.json
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@
{
"id": "offal_raw",
"type": "requirement",
"components": [ [ [ "offal", 1 ], [ "mutant_offal", 1 ], [ "sweetbread", 1 ], [ "liver", 2 ], [ "lung", 2 ], [ "kidney", 2 ] ] ]
"components": [ [ [ "offal", 1 ], [ "mutant_offal", 1 ], [ "sweetbread", 2 ], [ "liver", 2 ], [ "lung", 2 ], [ "kidney", 2 ] ] ]
},
{
"id": "meat_offal",
Expand Down
6 changes: 2 additions & 4 deletions tests/comestible_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,8 @@ TEST_CASE( "recipe_permutations", "[recipe]" )
default_calories *= res_it.charges;
}
// Make the range of acceptable average calories of permutations, using result's calories
const float lower_bound = std::min( default_calories - mystats.calories.stddev() * 2,
default_calories * 0.8 );
const float upper_bound = std::max( default_calories + mystats.calories.stddev() * 2,
default_calories * 1.2 );
const float lower_bound = default_calories * 0.66;
const float upper_bound = default_calories * 1.33;
CHECK( mystats.calories.min() >= 0 );
CHECK( lower_bound <= mystats.calories.avg() );
CHECK( mystats.calories.avg() <= upper_bound );
Expand Down