mention_decor vs Underwater or drowning escape

Avoid redundant
|You are on solid land again.
|You are back on floor.
when walking or teleporting out of water with the mention_decor option on.
This commit is contained in:
PatR
2020-04-03 10:41:30 -07:00
parent 42fc34691d
commit b37b9f25ce
4 changed files with 18 additions and 8 deletions

View File

@@ -332,10 +332,15 @@ describe_decor()
if ((IS_POOL(iflags.prev_decor)
|| iflags.prev_decor == LAVAPOOL
|| iflags.prev_decor == ICE)) {
pline("%s %s %s.",
flags.verbose ? "You are back" : "Back",
(Levitation || Flying) ? "over" : "on",
surface(u.ux, u.uy));
const char *ground = surface(u.ux, u.uy);
if (iflags.last_msg != PLNMSG_BACK_ON_GROUND
|| (strcmpi(ground, "floor") && strcmpi(ground, "ground")
&& strcmpi(ground, "ice")))
pline("%s %s %s.",
flags.verbose ? "You are back" : "Back",
(Levitation || Flying) ? "over" : "on",
ground);
}
}
iflags.prev_decor = ltyp;