livelog of breaking food conducts
Shorten the livelog messages for food conduct a little by changing a bunch of "the first time" to just "first time". Will result in fewer instances of tty condensing whitespace for a too-wide line written into a text window. That includes stripping off indentation, which messes up the alignment of #chronicle output. Also, eliminate one redundant livelog printf. Breaking vegan conduct by eating wax when poly'd can be folded into same message for eating leather/bones/dragon hide. [The breaking vegetarian conduct for those says "eating meat" which seems wrong but hasn't been changed.]
This commit is contained in:
49
src/eat.c
49
src/eat.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 eat.c $NHDT-Date: 1646172696 2022/03/01 22:11:36 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.261 $ */
|
||||
/* NetHack 3.7 eat.c $NHDT-Date: 1647133629 2022/03/13 01:07:09 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.262 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -462,21 +462,21 @@ eating_conducts(struct permonst *pd)
|
||||
int ll_conduct = 0;
|
||||
|
||||
if (!u.uconduct.food++) {
|
||||
livelog_printf(LL_CONDUCT, "ate for the first time - %s",
|
||||
livelog_printf(LL_CONDUCT, "ate for first time - %s",
|
||||
pd->pmnames[NEUTRAL]);
|
||||
ll_conduct++;
|
||||
}
|
||||
if (!vegan(pd)) {
|
||||
if (!u.uconduct.unvegan++ && !ll_conduct) {
|
||||
livelog_printf(LL_CONDUCT,
|
||||
"consumed animal products (%s) for the first time",
|
||||
"consumed animal products (%s) for first time",
|
||||
pd->pmnames[NEUTRAL]);
|
||||
ll_conduct++;
|
||||
}
|
||||
}
|
||||
if (!vegetarian(pd)) {
|
||||
if (!u.uconduct.unvegetarian && !ll_conduct)
|
||||
livelog_printf(LL_CONDUCT, "tasted meat (%s) for the first time",
|
||||
livelog_printf(LL_CONDUCT, "tasted meat (%s) for first time",
|
||||
pd->pmnames[NEUTRAL]);
|
||||
violated_vegetarian();
|
||||
}
|
||||
@@ -1035,7 +1035,7 @@ cpostfx(int pm)
|
||||
|
||||
if (!u.uconduct.polyselfs++) /* you're changing form */
|
||||
livelog_printf(LL_CONDUCT,
|
||||
"changed form for the first time by mimicking %s",
|
||||
"changed form for first time by mimicking %s",
|
||||
Hallucination ? "an orange" : "a pile of gold");
|
||||
You_cant("resist the temptation to mimic %s.",
|
||||
Hallucination ? "an orange" : "a pile of gold");
|
||||
@@ -1451,7 +1451,7 @@ consume_tin(const char *mesg)
|
||||
*/
|
||||
/* don't need vegetarian checks for spinach */
|
||||
if (!u.uconduct.food++)
|
||||
livelog_printf(LL_CONDUCT, "ate for the first time (spinach)");
|
||||
livelog_printf(LL_CONDUCT, "ate for first time (spinach)");
|
||||
if (!tin->cursed)
|
||||
pline("This makes you feel like %s!",
|
||||
/* "Swee'pea" is a character from the Popeye cartoons */
|
||||
@@ -1648,14 +1648,14 @@ eatcorpse(struct obj *otmp)
|
||||
if (!vegan(&mons[mnum]))
|
||||
if (!u.uconduct.unvegan++) {
|
||||
livelog_printf(LL_CONDUCT,
|
||||
"consumed animal products for the first time, by eating %s",
|
||||
"consumed animal products for first time, by eating %s",
|
||||
an(food_xname(otmp, FALSE)));
|
||||
ll_conduct++;
|
||||
}
|
||||
if (!vegetarian(&mons[mnum])) {
|
||||
if (!u.uconduct.unvegetarian && !ll_conduct)
|
||||
livelog_printf(LL_CONDUCT,
|
||||
"tasted meat for the first time, by eating %s",
|
||||
"tasted meat for first time, by eating %s",
|
||||
an(food_xname(otmp, FALSE)));
|
||||
violated_vegetarian();
|
||||
}
|
||||
@@ -2656,28 +2656,27 @@ doeat(void)
|
||||
|
||||
if (!u.uconduct.food++) {
|
||||
ll_conduct++;
|
||||
livelog_printf(LL_CONDUCT, "ate for the first time (%s)",
|
||||
livelog_printf(LL_CONDUCT, "ate for first time (%s)",
|
||||
food_xname(otmp, FALSE));
|
||||
}
|
||||
material = objects[otmp->otyp].oc_material;
|
||||
if (material == LEATHER || material == BONE
|
||||
|| material == DRAGON_HIDE) {
|
||||
|| material == DRAGON_HIDE || material == WAX) {
|
||||
if (!u.uconduct.unvegan++ && !ll_conduct) {
|
||||
livelog_printf(LL_CONDUCT,
|
||||
"consumed animal products for the first time, by eating %s",
|
||||
"consumed animal products for first time, by eating %s",
|
||||
an(food_xname(otmp, FALSE)));
|
||||
ll_conduct++;
|
||||
}
|
||||
if (!u.uconduct.unvegetarian && !ll_conduct)
|
||||
livelog_printf(LL_CONDUCT,
|
||||
"tasted meat for the first time, by eating %s",
|
||||
an(food_xname(otmp, FALSE)));
|
||||
violated_vegetarian();
|
||||
} else if (material == WAX)
|
||||
if (!u.uconduct.unvegan++ && !ll_conduct)
|
||||
livelog_printf(LL_CONDUCT,
|
||||
"consumed animal products for the first time, by eating %s",
|
||||
an(food_xname(otmp, FALSE)));
|
||||
if (material != WAX) {
|
||||
/* FIXME: none of the materials which reach here are meat */
|
||||
if (!u.uconduct.unvegetarian && !ll_conduct)
|
||||
livelog_printf(LL_CONDUCT,
|
||||
"tasted meat for first time, by eating %s",
|
||||
an(food_xname(otmp, FALSE)));
|
||||
violated_vegetarian();
|
||||
}
|
||||
}
|
||||
|
||||
if (otmp->cursed) {
|
||||
(void) rottenfood(otmp);
|
||||
@@ -2741,7 +2740,7 @@ doeat(void)
|
||||
|
||||
/* KMH, conduct */
|
||||
if (!u.uconduct.food++) {
|
||||
livelog_printf(LL_CONDUCT, "ate for the first time - %s",
|
||||
livelog_printf(LL_CONDUCT, "ate for first time - %s",
|
||||
food_xname(otmp, FALSE));
|
||||
ll_conduct++;
|
||||
}
|
||||
@@ -2776,14 +2775,14 @@ doeat(void)
|
||||
case FLESH:
|
||||
if (!u.uconduct.unvegan++ && !ll_conduct) {
|
||||
livelog_printf(LL_CONDUCT,
|
||||
"consumed animal products for the first time, by eating %s",
|
||||
"consumed animal products for first time, by eating %s",
|
||||
an(food_xname(otmp, FALSE)));
|
||||
ll_conduct++;
|
||||
}
|
||||
if (otmp->otyp != EGG) {
|
||||
if (!u.uconduct.unvegetarian && !ll_conduct)
|
||||
livelog_printf(LL_CONDUCT,
|
||||
"tasted meat for the first time, by eating %s",
|
||||
"tasted meat for first time, by eating %s",
|
||||
an(food_xname(otmp, FALSE)));
|
||||
|
||||
violated_vegetarian();
|
||||
@@ -2795,7 +2794,7 @@ doeat(void)
|
||||
|| otmp->otyp == LUMP_OF_ROYAL_JELLY)
|
||||
if (!u.uconduct.unvegan++ && !ll_conduct)
|
||||
livelog_printf(LL_CONDUCT,
|
||||
"consumed animal products (%s) for the first time",
|
||||
"consumed animal products (%s) for first time",
|
||||
food_xname(otmp, FALSE));
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user