Skip to content

Commit

Permalink
Make all_nutrition_starve_test far more strict
Browse files Browse the repository at this point in the history
Now that vitamins aren't disappearing, this test can be tuned to make
sure that vitamins are being absorbed into the body correctly.
  • Loading branch information
Davi-DeGanne committed Oct 29, 2019
1 parent aaf8a46 commit b006b3b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
10 changes: 10 additions & 0 deletions data/json/items/comestibles/meat_dishes.json
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,16 @@
"fun": -8,
"vitamins": [ [ "iron", 3 ] ]
},
{
"type": "COMESTIBLE",
"id": "debug_nutrition",
"copy-from": "can_spam",
"name": "holy SPAM of debugging",
"calories": 2100,
"description": "A mysterious lump of SPAM that contains just enough calories and vitamins to feed you for a day. For debug use only.",
"//": "This is used for the all_nutrient_starve_test.",
"vitamins": [ [ "vitA", 96 ], [ "vitB", 96 ], [ "vitC", 96 ], [ "calcium", 96 ], [ "iron", 96 ] ]
},
{
"type": "COMESTIBLE",
"id": "can_sardine",
Expand Down
21 changes: 3 additions & 18 deletions tests/stomach_contents_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,24 +75,9 @@ static void print_stomach_contents( player &p, const bool print )
// accounting for appropriate vitamins
static void eat_all_nutrients( player &p )
{
// Absorption rates are imperfect for now, so target is 140% DV (== 135 vitamin units if rate is 15m)
item f( "fried_brain" );
p.eat( f );
f = item( "carrot" );
p.eat( f );
f = item( "carrot" );
p.eat( f );
f = item( "hotdogs_cooked" );
p.eat( f );
f = item( "veggy" );
p.eat( f );
f = item( "can_herring" );
p.eat( f );
f = item( "can_herring" );
p.eat( f );
f = item( "can_herring" );
p.eat( f );
f = item( "junk_burrito" );
// Vitamin target: 100% DV -- or 96 vitamin "units" since all vitamins currently decay every 15m.
// Energy target: 2100 kcal -- debug target will be completely sedentary.
item f( "debug_nutrition" );
p.eat( f );
}

Expand Down

0 comments on commit b006b3b

Please sign in to comment.