some pline()-like function usage

This commit is contained in:
nhmall
2023-03-08 19:12:52 -05:00
parent d9b43ce357
commit ecf74d5308
14 changed files with 26 additions and 26 deletions
+3 -3
View File
@@ -2629,7 +2629,7 @@ use_stone(struct obj *tstone)
&& obj->oclass == GEM_CLASS && !is_graystone(obj) && obj->oclass == GEM_CLASS && !is_graystone(obj)
&& !obj_resists(obj, 80, 100)) { && !obj_resists(obj, 80, 100)) {
if (Blind) if (Blind)
pline("You feel something shatter."); You_feel("something shatter.");
else if (Hallucination) else if (Hallucination)
pline("Oh, wow, look at the pretty shards."); pline("Oh, wow, look at the pretty shards.");
else else
@@ -3430,7 +3430,7 @@ use_cream_pie(struct obj *obj)
if (Hallucination) if (Hallucination)
You("give yourself a facial."); You("give yourself a facial.");
else else
pline("You immerse your %s in %s%s.", body_part(FACE), You("immerse your %s in %s%s.", body_part(FACE),
several ? "one of " : "", several ? "one of " : "",
several ? makeplural(the(xname(obj))) : the(xname(obj))); several ? makeplural(the(xname(obj))) : the(xname(obj)));
if (can_blnd((struct monst *) 0, &gy.youmonst, AT_WEAP, obj)) { if (can_blnd((struct monst *) 0, &gy.youmonst, AT_WEAP, obj)) {
@@ -4235,7 +4235,7 @@ static int
flip_through_book(struct obj *obj) flip_through_book(struct obj *obj)
{ {
if (Underwater) { if (Underwater) {
pline("You don't want to get the pages even more soggy, do you?"); You("don't want to get the pages even more soggy, do you?");
return ECMD_OK; return ECMD_OK;
} }
+2 -2
View File
@@ -1576,7 +1576,7 @@ wiz_fuzzer(void)
{ {
if (flags.suppress_alert < FEATURE_NOTICE_VER(3,7,0)) { if (flags.suppress_alert < FEATURE_NOTICE_VER(3,7,0)) {
pline("The fuzz tester will make NetHack execute random keypresses."); pline("The fuzz tester will make NetHack execute random keypresses.");
pline("There is no conventional way out of this mode."); There("is no conventional way out of this mode.");
} }
if (paranoid_query(TRUE, "Do you want to start fuzz testing?")) if (paranoid_query(TRUE, "Do you want to start fuzz testing?"))
iflags.debug_fuzzer = TRUE; /* Thoth, take the reins */ iflags.debug_fuzzer = TRUE; /* Thoth, take the reins */
@@ -1943,7 +1943,7 @@ wiz_smell(void)
return ECMD_OK; return ECMD_OK;
} }
pline("You can move the cursor to a monster that you want to smell."); You("can move the cursor to a monster that you want to smell.");
do { do {
pline("Pick a monster to smell."); pline("Pick a monster to smell.");
ans = getpos(&cc, TRUE, "a monster"); ans = getpos(&cc, TRUE, "a monster");
+2 -2
View File
@@ -528,7 +528,7 @@ food_detect(struct obj *sobj)
You("%s %s nearby.", sobj ? "smell" : "sense", what); You("%s %s nearby.", sobj ? "smell" : "sense", what);
if (sobj && sobj->blessed) { if (sobj && sobj->blessed) {
if (!u.uedibility) if (!u.uedibility)
pline("Your %s starts to tingle.", body_part(NOSE)); Your("%s starts to tingle.", body_part(NOSE));
u.uedibility = 1; u.uedibility = 1;
} }
} else { } else {
@@ -1081,7 +1081,7 @@ furniture_detect(void)
} }
if (!found) if (!found)
pline("There seems to be nothing of interest on this level."); There("seems to be nothing of interest on this level.");
else if (!revealed) else if (!revealed)
/* [what about clipped map with points of interest outside of the /* [what about clipped map with points of interest outside of the
currently shown area?] */ currently shown area?] */
+1 -1
View File
@@ -1132,7 +1132,7 @@ use_pick_axe2(struct obj *obj)
trap_with_u->conjoined |= (1 << idx); trap_with_u->conjoined |= (1 << idx);
trap->conjoined |= (1 << adjidx); trap->conjoined |= (1 << adjidx);
pline("You clear some debris from between the pits."); You("clear some debris from between the pits.");
} }
} else if (u.utrap && u.utraptype == TT_PIT } else if (u.utrap && u.utraptype == TT_PIT
&& (trap_with_u = t_at(u.ux, u.uy)) != 0) { && (trap_with_u = t_at(u.ux, u.uy)) != 0) {
+1 -1
View File
@@ -1891,7 +1891,7 @@ hellish_smoke_mesg(void)
gl.level.flags.temperature > 0 ? "hot" : "cold"); gl.level.flags.temperature > 0 ? "hot" : "cold");
if (In_hell(&u.uz) && gl.level.flags.temperature > 0) if (In_hell(&u.uz) && gl.level.flags.temperature > 0)
pline("You %s smoke...", You("%s smoke...",
olfaction(gy.youmonst.data) ? "smell" : "sense"); olfaction(gy.youmonst.data) ? "smell" : "sense");
} }
+1 -1
View File
@@ -1807,7 +1807,7 @@ namefloorobj(void)
} }
if (!obj) { if (!obj) {
/* "under you" is safe here since there's no object to hide under */ /* "under you" is safe here since there's no object to hide under */
pline("There doesn't seem to be any object %s.", There("doesn't seem to be any object %s.",
u_at(cc.x, cc.y) ? "under you" : "there"); u_at(cc.x, cc.y) ? "under you" : "there");
return; return;
} }
+3 -3
View File
@@ -739,12 +739,12 @@ dragon_armor_handling(
case BLUE_DRAGON_SCALE_MAIL: case BLUE_DRAGON_SCALE_MAIL:
if (puton) { if (puton) {
if (!Very_fast) if (!Very_fast)
pline("You speed up%s.", Fast ? " a bit more" : ""); You("speed up%s.", Fast ? " a bit more" : "");
EFast |= W_ARM; EFast |= W_ARM;
} else { } else {
EFast &= ~W_ARM; EFast &= ~W_ARM;
if (!Very_fast && !gc.context.takeoff.cancelled_don) if (!Very_fast && !gc.context.takeoff.cancelled_don)
pline("You slow down."); You("slow down.");
} }
break; break;
case GREEN_DRAGON_SCALES: case GREEN_DRAGON_SCALES:
@@ -1948,7 +1948,7 @@ canwearobj(struct obj *otmp, long *mask, boolean noisy)
/* break_armor() pushes boots off for centaurs, /* break_armor() pushes boots off for centaurs,
so don't let dowear() put them back on... */ so don't let dowear() put them back on... */
if (noisy) if (noisy)
pline("You have too many hooves to wear %s.", You("have too many hooves to wear %s.",
c_boots); /* makeplural(body_part(FOOT)) yields c_boots); /* makeplural(body_part(FOOT)) yields
"rear hooves" which sounds odd */ "rear hooves" which sounds odd */
err++; err++;
+2 -2
View File
@@ -1183,7 +1183,7 @@ engrave(void)
if (gc.context.engraving.pos.x != u.ux if (gc.context.engraving.pos.x != u.ux
|| gc.context.engraving.pos.y != u.uy) { /* teleported? */ || gc.context.engraving.pos.y != u.uy) { /* teleported? */
pline("You are unable to continue engraving."); You("are unable to continue engraving.");
return 0; return 0;
} }
/* Stylus might have been taken out of inventory and destroyed somehow. /* Stylus might have been taken out of inventory and destroyed somehow.
@@ -1197,7 +1197,7 @@ engrave(void)
} }
} }
if (!stylus) { if (!stylus) {
pline("You are unable to continue engraving."); You("are unable to continue engraving.");
return 0; return 0;
} }
} }
+1 -1
View File
@@ -4392,7 +4392,7 @@ read_tribute(const char *tribsection, const char *tribtitle,
if (!fp) { if (!fp) {
/* this is actually an error - cannot open tribute file! */ /* this is actually an error - cannot open tribute file! */
if (!nowin_buf) if (!nowin_buf)
pline("You feel too overwhelmed to continue!"); You_feel("too overwhelmed to continue!");
return grasped; return grasped;
} }
+1 -1
View File
@@ -921,7 +921,7 @@ test_move(
so we won't get here, hence don't need to worry about so we won't get here, hence don't need to worry about
"there" being somewhere the player isn't sure of */ "there" being somewhere the player isn't sure of */
if (mode == DO_MOVE) if (mode == DO_MOVE)
pline("There is an obstacle there."); There("is an obstacle there.");
return FALSE; return FALSE;
} else if (tmpr->typ == IRONBARS) { } else if (tmpr->typ == IRONBARS) {
if (mode == DO_MOVE if (mode == DO_MOVE
+1 -1
View File
@@ -603,7 +603,7 @@ read_simplemail(const char *mbox, boolean adminmsg)
fl.l_type = F_UNLCK; fl.l_type = F_UNLCK;
fcntl(fileno(mb), F_UNLCK, &fl); fcntl(fileno(mb), F_UNLCK, &fl);
#endif #endif
pline("There is a%s message on this scroll.", There("is a%s message on this scroll.",
seen_one_already ? "nother" : ""); seen_one_already ? "nother" : "");
} }
msg = strchr(curline, ':'); msg = strchr(curline, ':');
+1 -1
View File
@@ -449,7 +449,7 @@ polyself(int psflags)
controllable_poly = Polymorph_control && !(Stunned || Unaware); controllable_poly = Polymorph_control && !(Stunned || Unaware);
if (Unchanging) { if (Unchanging) {
pline("You fail to transform!"); You("fail to transform!");
return; return;
} }
/* being Stunned|Unaware doesn't negate this aspect of Poly_control */ /* being Stunned|Unaware doesn't negate this aspect of Poly_control */
+2 -2
View File
@@ -924,7 +924,7 @@ do_symset(boolean rogueflag)
big_desc = thissize; big_desc = thissize;
} }
if (!setcount) { if (!setcount) {
pline("There are no appropriate %s symbol sets available.", There("are no appropriate %s symbol sets available.",
rogueflag ? "rogue level" : "primary"); rogueflag ? "rogue level" : "primary");
return TRUE; return TRUE;
} }
@@ -1010,7 +1010,7 @@ do_symset(boolean rogueflag)
return TRUE; return TRUE;
} else if (!gs.symset_list) { } else if (!gs.symset_list) {
/* The symbols file was empty */ /* The symbols file was empty */
pline("There were no symbol sets found in \"%s\".", SYMBOLS); There("were no symbol sets found in \"%s\".", SYMBOLS);
return TRUE; return TRUE;
} }
+5 -5
View File
@@ -4144,7 +4144,7 @@ acid_damage(struct obj* obj)
) { ) {
if (!Blind) { if (!Blind) {
if (victim == &gy.youmonst) if (victim == &gy.youmonst)
pline("Your %s.", aobjnam(obj, "fade")); Your("%s.", aobjnam(obj, "fade"));
else if (vismon) else if (vismon)
pline("%s %s.", s_suffix(Monnam(victim)), pline("%s %s.", s_suffix(Monnam(victim)),
aobjnam(obj, "fade")); aobjnam(obj, "fade"));
@@ -4232,7 +4232,7 @@ water_damage(
#endif #endif
) return 0; ) return 0;
if (in_invent) if (in_invent)
pline("Your %s %s.", ostr, vtense(ostr, "fade")); Your("%s %s.", ostr, vtense(ostr, "fade"));
obj->otyp = SCR_BLANK_PAPER; obj->otyp = SCR_BLANK_PAPER;
obj->dknown = 0; obj->dknown = 0;
@@ -4254,7 +4254,7 @@ water_damage(
return 0; return 0;
} }
if (in_invent) if (in_invent)
pline("Your %s %s.", ostr, vtense(ostr, "fade")); Your("%s %s.", ostr, vtense(ostr, "fade"));
if (obj->otyp == SPE_NOVEL) { if (obj->otyp == SPE_NOVEL) {
obj->novelidx = 0; obj->novelidx = 0;
@@ -4322,7 +4322,7 @@ water_damage(
return ER_DESTROYED; return ER_DESTROYED;
} else if (obj->odiluted) { } else if (obj->odiluted) {
if (in_invent) if (in_invent)
pline("Your %s %s further.", ostr, vtense(ostr, "dilute")); Your("%s %s further.", ostr, vtense(ostr, "dilute"));
obj->otyp = POT_WATER; obj->otyp = POT_WATER;
obj->dknown = 0; obj->dknown = 0;
@@ -4333,7 +4333,7 @@ water_damage(
return ER_DAMAGED; return ER_DAMAGED;
} else if (obj->otyp != POT_WATER) { } else if (obj->otyp != POT_WATER) {
if (in_invent) if (in_invent)
pline("Your %s %s.", ostr, vtense(ostr, "dilute")); Your("%s %s.", ostr, vtense(ostr, "dilute"));
obj->odiluted++; obj->odiluted++;
if (in_invent) if (in_invent)