Skip to content

Commit

Permalink
Fix a few exploits allowing safe consumption of mutant meat (#35573)
Browse files Browse the repository at this point in the history
* Change cooked meat's copy-from value
Cooked meat had

"copy-from": "meat"

which meant that it had by extension

"cooks-like": "meat_cooked"

which was causing weird behavior, like an exploit where mutant meat did
not have negative effects if dehydrated before cooking.

* Remove NUTRIENT_OVERRIDE from
Several methods of meat preservation were removing toxins from food.
This was because those foods were inheriting NUTRIENT_OVERRIDE, which
was unnecessary thanks to the cooks-like property.
  • Loading branch information
Davi-DeGanne authored and ZhilkinSerg committed Nov 18, 2019
1 parent 11de18e commit f69236d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 5 additions & 4 deletions data/json/items/comestibles/carnivore.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,16 @@
},
{
"id": "meat_cooked",
"copy-from": "meat",
"copy-from": "flesh",
"weight": "296 g",
"volume": "250 ml",
"spoils_in": "1 day",
"type": "COMESTIBLE",
"name": "cooked meat",
"description": "This is a chunk of freshly cooked meat. It's filling and nutritious, but unseasoned and a bit bland.",
"proportional": { "price": 1.5 },
"price": 750,
"parasites": 0,
"calories": 402,
"healthy": 0,
"fun": 0,
"vitamins": [ [ "vitC", 16 ], [ "calcium", 2 ], [ "iron", 69 ], [ "vitB", 778 ] ],
"flags": [ "EATEN_HOT", "NUTRIENT_OVERRIDE" ]
},
Expand Down
3 changes: 3 additions & 0 deletions data/json/items/comestibles/meat_dishes.json
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,7 @@
"description": "Meat slices cured in brine. Salty but tasty in a pinch.",
"price": 500,
"material": "flesh",
"delete": { "flags": [ "NUTRIENT_OVERRIDE" ] },
"primary_material": "cured_meat",
"fun": 2
},
Expand Down Expand Up @@ -966,6 +967,7 @@
"healthy": 1,
"description": "This is a serving of crisply brined and canned meat. Tasty and nutritious.",
"price": 250,
"delete": { "flags": [ "NUTRIENT_OVERRIDE" ] },
"fun": 6
},
{
Expand All @@ -992,6 +994,7 @@
"color": "light_red",
"description": "Reconstituted meat flakes, which are much more enjoyable to eat now that they have been rehydrated.",
"price": 900,
"delete": { "flags": [ "NUTRIENT_OVERRIDE" ] },
"fun": 2
},
{
Expand Down

0 comments on commit f69236d

Please sign in to comment.