Skip to content

Commit

Permalink
s/CE_ROT/CE_NOXIOUS/, s/CE_POISONOUS/CE_NOXIOUS/ (|amethyst).
Browse files Browse the repository at this point in the history
  • Loading branch information
wheals committed Apr 15, 2015
1 parent f1b8291 commit 12d63cc
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 87 deletions.
2 changes: 1 addition & 1 deletion crawl-ref/source/butcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ static int _corpse_quality(const item_def &item, bool bottle_blood)
int badness = 3 * item.freshness;
if (ce == CE_MUTAGEN)
badness += 1000;
else if (ce == CE_ROT)
else if (ce == CE_NOXIOUS)
badness += 1000;

// Bottleable corpses first, unless forbidden
Expand Down
4 changes: 2 additions & 2 deletions crawl-ref/source/describe.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1867,8 +1867,8 @@ string get_item_description(const item_def &item, bool verbose,
description << "\n\nEating this meat will cause random "
"mutations.";
break;
case CE_ROT:
description << "\n\nThis meat is rotten.";
case CE_NOXIOUS:
description << "\n\nThis meat is toxic.";
break;
default:
break;
Expand Down
18 changes: 9 additions & 9 deletions crawl-ref/source/food.cc
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ static void _eat_chunk(item_def& food)
break;
}

case CE_ROT:
case CE_NOXIOUS:
case CE_NOCORPSE:
mprf(MSGCH_ERROR, "This flesh (%d) tastes buggy!", chunk_effect);
break;
Expand Down Expand Up @@ -1190,7 +1190,7 @@ void vampire_nutrition_per_turn(const item_def &corpse, int feeding)
_heal_from_food(1);
break;

case CE_ROT:
case CE_NOXIOUS:
case CE_NOCORPSE:
mprf(MSGCH_ERROR, "This blood (%d) tastes buggy!", chunk_type);
return;
Expand All @@ -1202,7 +1202,7 @@ void vampire_nutrition_per_turn(const item_def &corpse, int feeding)

bool is_bad_food(const item_def &food)
{
return is_mutagenic(food) || is_forbidden_food(food) || causes_rot(food);
return is_mutagenic(food) || is_forbidden_food(food) || is_noxious(food);
}

// Returns true if a food item (or corpse) is mutagenic.
Expand All @@ -1214,13 +1214,13 @@ bool is_mutagenic(const item_def &food)
return determine_chunk_effect(food) == CE_MUTAGEN;
}

// Returns true if a food item (or corpse) will cause rotting.
bool causes_rot(const item_def &food)
// Returns true if a food item (or corpse) is totally inedible.
bool is_noxious(const item_def &food)
{
if (food.base_type != OBJ_FOOD && food.base_type != OBJ_CORPSES)
return false;

return determine_chunk_effect(food) == CE_ROT;
return determine_chunk_effect(food) == CE_NOXIOUS;
}

// Returns true if an item of basetype FOOD or CORPSES cannot currently
Expand Down Expand Up @@ -1345,8 +1345,8 @@ bool can_eat(const item_def &food, bool suppress_msg, bool check_hunger)
if (!_eat_check(check_hunger, suppress_msg))
return false;

if (check_hunger && causes_rot(food))
FAIL("It is putrefying and completely inedible.");
if (is_noxious(food))
FAIL("It is completely inedible.");

if (you.species == SP_VAMPIRE)
{
Expand Down Expand Up @@ -1413,7 +1413,7 @@ corpse_effect_type determine_chunk_effect(corpse_effect_type chunktype)
{
switch (chunktype)
{
case CE_ROT:
case CE_NOXIOUS:
case CE_MUTAGEN:
if (you.species == SP_GHOUL)
chunktype = CE_CLEAN;
Expand Down
2 changes: 1 addition & 1 deletion crawl-ref/source/food.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void set_hunger(int new_hunger_level, bool suppress_msg);

bool is_bad_food(const item_def &food);
bool is_mutagenic(const item_def &food);
bool causes_rot(const item_def &food);
bool is_noxious(const item_def &food);
bool is_inedible(const item_def &item);
bool is_preferred_food(const item_def &food);
bool is_forbidden_food(const item_def &food);
Expand Down
8 changes: 4 additions & 4 deletions crawl-ref/source/itemname.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1813,8 +1813,8 @@ string item_def::name_aux(description_level_type desc, bool terse, bool ident,
case CE_MUTAGEN:
buff << "mutagenic ";
break;
case CE_ROT:
buff << "putrefying ";
case CE_NOXIOUS:
buff << "inedible ";
break;
default:
break;
Expand Down Expand Up @@ -3903,8 +3903,8 @@ string item_prefix(const item_def &item, bool temp)

if (is_mutagenic(item))
prefixes.push_back("mutagenic");
else if (causes_rot(item))
prefixes.push_back("rot-inducing"), prefixes.push_back("inedible");
else if (is_noxious(item))
prefixes.push_back("inedible");
break;

case OBJ_POTIONS:
Expand Down
Loading

0 comments on commit 12d63cc

Please sign in to comment.