tutorial tweaks

Replace tests against tutorial_dnum with 'In_tutorial()' predicate.

Give a message when entering the tutorial (via level change mechanism).

Likewise, give a message when resuming regular play.

If player uses #quit or ^C in the tutorial, ask whether to cut the
tutorial short and resume regular play; skip "Really quit?" if the
answer is yes.  Behavior is a bit odd for ^C + yes; it just sits there
until player types something.
This commit is contained in:
PatR
2023-06-04 00:22:14 -07:00
parent 2bbfed2183
commit ee27ec97d1
6 changed files with 28 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 allmain.c $NHDT-Date: 1652831519 2022/05/17 23:51:59 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.185 $ */
/* NetHack 3.7 allmain.c $NHDT-Date: 1685863328 2023/06/04 07:22:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.218 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -520,7 +520,8 @@ maybe_do_tutorial(void)
if (ask_do_tutorial()) {
assign_level(&u.ucamefrom, &u.uz);
iflags.nofollowers = TRUE;
schedule_goto(&sp->dlevel, UTOTYPE_NONE, (char *) 0, (char *) 0);
schedule_goto(&sp->dlevel, UTOTYPE_NONE,
"Entering the tutorial.", (char *) 0);
deferred_goto();
vision_recalc(0);
docrt();