livelog level entry events
Fix up the level descriptions used when logging an "entered new level" event. Most of the change is for adding an extra argument to calls to describe_level(). The curses portion is in a big chunk of old code suppressed by #if 0. I didn't notice that the level entry events are classified as LL_DEBUG until all the work was done. This promotes the entry events for the four Plane of <Element> levels from debug events to major ones instead. It doesn't do that for the Astral Plane because the entered-the-Astral- Plane achievement already produces a major event for that. Most other key level entry events are in a similar situation--or will become that way once another set of achievements eventually gets added--so there aren't any other event classification promotions.
This commit is contained in:
20
src/do.c
20
src/do.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 do.c $NHDT-Date: 1646136939 2022/03/01 12:15:39 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.295 $ */
|
||||
/* NetHack 3.7 do.c $NHDT-Date: 1646171623 2022/03/01 21:53:43 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.296 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1778,15 +1778,15 @@ goto_level(
|
||||
[TODO: if an achievement for receiving quest call from leader
|
||||
gets added, that should come after this rather than take place
|
||||
where the message is delivered above] */
|
||||
if (new)
|
||||
/* FIXME: this shows level number relative to the start of the
|
||||
branch (so "entered new level 3, Vlad's Tower" when going
|
||||
into the first level of that branch); it should be changed
|
||||
to show the level number that appears on the status lines;
|
||||
also in the endgame it shows arbitrary level number instead
|
||||
of elemental plane name */
|
||||
livelog_printf(LL_DEBUG, "entered new level %d, %s",
|
||||
dunlev(&u.uz), g.dungeons[u.uz.dnum].dname);
|
||||
if (new) {
|
||||
char dloc[QBUFSZ];
|
||||
/* Astral is excluded as a major event here because entry to it
|
||||
is already one due to that being an achievement */
|
||||
boolean major = In_endgame(&u.uz) && !Is_astralevel(&u.uz);
|
||||
|
||||
(void) describe_level(dloc, 2);
|
||||
livelog_printf(major ? LL_ACHIEVE : LL_DEBUG, "entered %s", dloc);
|
||||
}
|
||||
|
||||
assign_level(&u.uz0, &u.uz); /* reset u.uz0 */
|
||||
#ifdef INSURANCE
|
||||
|
||||
Reference in New Issue
Block a user