cleanup when exiting tutorial

When returning to play from within the tutorial, remove the level files
similar to how they're discarded for the rest of the dungeon when going
into the endgame.  It turned out to be a bit messier than anticipated.

The dungeon.c bit is sufficient for #overview, which now hides regular
level 1 while in the tutorial and hides all tutorial levels once exited.
Those will still appear in end-of-game disclosure.
This commit is contained in:
PatR
2023-07-17 14:27:28 -07:00
parent 536a4bd8b3
commit 8d60b92407
6 changed files with 39 additions and 15 deletions
+10 -1
View File
@@ -1,4 +1,4 @@
/* NetHack 3.7 dungeon.c $NHDT-Date: 1685180838 2023/05/27 09:47:18 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.185 $ */
/* NetHack 3.7 dungeon.c $NHDT-Date: 1689629244 2023/07/17 21:27:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.188 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -2933,6 +2933,15 @@ interest_mapseen(mapseen *mptr)
return TRUE;
if (mptr->flags.unreachable || mptr->flags.forgot)
return FALSE;
/* when in tutorial, show all tutorial levels visited whether interesting
or not and don't show any other levels; when outside tutorial, don't
show any tutorial levels even if they're considered interesting */
if (In_tutorial(&u.uz)) {
return In_tutorial(&mptr->lev);
} else {
if (In_tutorial(&mptr->lev))
return FALSE;
}
/* level is of interest if it has an auto-generated annotation */
if (mptr->flags.oracle || mptr->flags.bigroom || mptr->flags.roguelevel
|| mptr->flags.castle || mptr->flags.valley