Try to unify "back on solid ground" messaging

Put everything through a single function that can handle all the
complicated parts of using the correct proposition for different terrain
types, and will not just call things "solid ground" indiscriminately.
This got complicated but I'm not sure if it's possible to do it much
simpler while still using the distinct names for each type of terrain
(unless you are OK with the sentences sounding sort of wonky).
This commit is contained in:
Michael Meyer
2023-11-06 17:50:25 -05:00
committed by PatR
parent 53be8be3e9
commit a1b1f3b250
5 changed files with 45 additions and 27 deletions

View File

@@ -2826,11 +2826,7 @@ pooleffects(
} else if (is_lava(u.ux, u.uy)) {
You("leave the %s...", hliquid("water")); /* oops! */
} else {
char icebuf[BUFSZ];
You("are %s %s again.",
(Levitation || Flying) ? "over" : "on",
is_ice(u.ux, u.uy) ? ice_descr(u.ux, u.uy, icebuf)
: "solid land");
back_on_ground(FALSE);
iflags.last_msg = PLNMSG_BACK_ON_GROUND;
}
} else if (Is_waterlevel(&u.uz)) {